Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the differences between sass and scss

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report