original )
Difference Between SASS and SCSS
SASS (Syntactically Awesome Style Sheets) is a style sheet language designed by Hampton Catlin and developed by Chris Eppstein and Natalie Weizenbaum. It is a preprocessor scripting language that will be compiled or interpreted as CSS. Sass Script itself is a scripting language. Its typing rules are dynamic.
SCSS is often referred to as Sassy CSS. It was introduced as the main syntax of SASS (Syntactically Awesome Style Sheets), and it builds on the existing CSS syntax. It uses semicolons and parentheses, such as CSS (Cascading Style Sheets). SCSS is a superset of CSS, that is, all CSS features will be available in SCSS and include some features of SASS (Syntactically Awesome Style Sheets). SCSS makes any CSS terminology valid.
9 major differences:
Difference 1
SASS is Syntactically Awesome Style Sheets, an extension of CSS that provides features such as nesting rules, inheritance, and Mixins, while SCSS is Sassy Cascaded Style Sheets, similar to CSS, filling in the gaps and incompatibility between CSS and SASS. It is licensed under the MIT license. It first appeared in 2006.
Difference 2
SASS is easier to use and has simpler syntax, so there is no need to use semicolons, curves, braces, etc., while SCSS is fully compatible with CSS, and the file extension is .scss type.
Difference 3
SASS has the best coding standards and good official documents, while SCSS is easier to learn and develop code.
Difference 4
SASS is based on javascript and supports different language extensions. It has its own syntax, open source CSS preprocessor and advanced features such as control and instructions and its libraries.
Difference 5
SASS is more difficult to integrate with existing CSS projects by rewriting code, while SCSS is easier to integrate with existing code bases by sampling to add new code instead of rewriting existing code bases.
Difference 6
SASS is easier to use, read, and write, while SCSS is more logical and complex in terms of implementing code.
Difference 7
SASS variables will start with the dollar ($) symbol, and SCSS has a modular function, which can organize the code in a more modular way by using some kind of comments.
Difference 8
SASS has advanced syntax functions, and its files have a .sass extension, while SCSS has the function similar to that every valid CSS file is an SCSS file.
Difference 9
SASS is similar to Ruby. Ruby is required for installation, and there is no strict code indentation. SCSS is similar to CSS and can be used easily without any additional installation or configuration.
Difference 10
SASS has local and global variables that can be used in different places in the CSS file, while SCSS has different variables, such as color variables, which can be used later in the style sheet.
Difference 11
SASS has a nesting function, CSS selectors can be nested and displayed in HTML, and it is difficult to maintain long hierarchical nested CSS, while SCSS can handle multiple classes and different nested styles.
Difference 12
SASS has a document style, which is better than CSS, and has operation functions for color, attribute, and parameter lists, while SCSS syntax has margins, list styles, padding, display, etc.
Difference 13
SASS has control instructions, functional instructions, Mixins and has expandable features, while SCSS can be used with SASS to express similar features of CSS.
Difference 14
After the initial development, SASS expanded to SassScript. It supports cross-platform operating systems. It is affected by CSS, LESS, YAML, etc. The file extensions of this SASS are .scss and .sass, and its official implementation is also an open source project developed using Ruby.
in conclusion
Both SASS and SCSS are CSS preprocessors. They are very useful and can be included in a CSS-based UI (User Interface) or front-end framework to simplify development. These SASS and SCSS frameworks provide powerful features in terms of high-level CSS features when using powerful CSS features programmatically. SASS is a CSS extension, most of which will be extended, and SCSS is a superset of CSS, in which all the functions of CSS will be in SCSS. The choice of preprocessor depends on the functions and features required to make the application work efficiently by making trade-offs in an effective way.
Compared with SCSS, SASS is easier to use and requires less syntax or configuration. It is recommended for larger applications that require faster development scope and easier development of complex components, while SCSS can be used to optimize Mixin features. , And many other effective techniques.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。