Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the differences between sass and css3

Shulou Source: shulou.com Published: 2022-06-01 14:50:56 11月07日 Update

This article mainly introduces the differences between sass and css3 related knowledge, the content is detailed and easy to understand, the operation is simple and fast, with a certain reference value, I believe you will gain after reading this sass and css3 article, let's take a look at it.

The difference between sass and css3: 1, sass is a css preprocessing language written by buby language, which does not use curly braces and semicolons, while css3 is an upgraded version of css technology, using curly braces and semicolons; 2, sass browsers can not directly identify parsing, need to be compiled by a compiler, and css3 can recognize.

The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.

What's the difference between sass and css3?

The difference between sass and css

CSS refers to cascading style sheets (Cascading Style Sheets)

CSS3 is an upgraded version of CSS (cascading style sheet) technology, which was developed in 1999. W3C completed the working draft of CSS3 on May 23,2001.It mainly includes box model, list module, hyperlink mode, language module, background and frame, text special effects, multi-column layout and so on.

Sass (Syntactically Awesome StyleSheets), a css preprocessing language written by buby, has a strict indentation style, which is very different from the css writing specification and does not use curly braces and semicolons.

Sass is an auxiliary tool to strengthen CSS and an extension of CSS. It adds advanced functions such as variable (variables), nested rules (nested rules), mixins (mixins), inheritance (extend), inline imports and other advanced functions based on CSS syntax, which make CSS more powerful and elegant. Using Sass and Sass style libraries such as Compass helps better organize and manage style files, as well as develop projects more efficiently, with the suffix .sass.

Css preprocessor

The css preprocessor uses a special language to style web pages, which is then compiled into normal css files for use by the project.

The benefits of using css preprocessing language: make css more concise, easy to modify, readable, adapt to the new strength, and easier to maintain code.

Summary:

Sass is a css preprocessing language, which is compiled to generate css

Sass does not use curly braces and semicolons, but uses indentation, and css uses curly braces and semicolons

Sass supports nesting, inheritance and other advanced features, but css does not.

Sass is more elegant and easier to maintain.

Sass browsers cannot directly recognize parsing and need to be compiled by a compiler

The file suffix for sass is .sass and the suffix for css file is .css.

Writing style:

/ / sass#sidebar width: 30% background-color: # faa / / css#sidebar {width: 30%; background-color: # faa;} this is the end of the article on "what's the difference between sass and css3". Thank you for reading! I believe you all have a certain understanding of the knowledge of "what is the difference between sass and css3". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Language preprocessing semicolon parenthesis style compilation file suffix module knowledge advanced elegant content function technology is made up of browser version article compiler Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno MariaDB Apple Shulou Technology