What are the differences between sass and scss
This article mainly explains "what are the differences between sass and scss". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the difference between sass and scss".
Sass, also known as indentation syntax, is similar to the programming language of Ruby.
It comes from another preprocessor called Haml, which is inspired by the simplicity of Haml and is designed and written by Ruby developers, so Sass stylesheets use syntax similar to Ruby. no
Sass is suitable for those who like the simplicity similar to CSS. It uses line indentation to specify blocks instead of parentheses and semicolons, so there are parentheses, no semicolons, and strict indentation. Files in sass syntax use the extension .sass.
Example:
/ / Variable
! primary-color=hotpink
/ / Mixin
= border-radius (! radius)
-webkit talk bordercolor radiusproof radius
-mozvillborderfills radiusproof radius
Bordercolor radiussensitive radius.myripelement
Colorable color
Width=100%
Overflow=hidden.my-other-element
+ border-radius (5px)
As we can see, this is a considerable change compared to regular CSS! The variable flag is "!" No "$", assign the symbol "=" instead of ":", which is a little strange!
But this is what Sass looked like before the release 3. 0 in May 2010, after which SassyCSS introduced a new syntax called scss. This syntax is designed to narrow the gap between Sass and CSS by introducing CSS-friendly syntax.
Thank you for your reading, the above is the content of "what is the difference between sass and scss". After the study of this article, I believe you have a deeper understanding of the difference between sass and scss, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!