我已經使用.scss腳本爲網站的CSS編寫了幾個Ruby應用程序。但我遇到了一個新的使用.sass代替的ruby應用程序。 有沒有任何優點或事情要注意這一變化?sass和scss有區別嗎?
1
A
回答
3
它們在功能上等同,但語法不同。從SASS homepage:
[...],它們之間不存在區別。使用你喜歡的語法。
0
SASS和SCSS是一樣的東西,但是有兩種不同的語法。
1
薩斯是讓一個更清潔的方式SCSS:
..Older syntax is known as the indented syntax (or just 「.sass」). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. Files in the indented syntax use the extension .sass.
SCSS
$blue: #3bbfce;
$margin: 16px;
.content-navigation {
border-color: $blue;
color:
darken($blue, 9%);
}
.border {
padding: $margin/2;
margin: $margin/2;
border-color: $blue;
}
薩斯
$blue: #3bbfce
$margin: 16px
.content-navigation
border-color: $blue
color: darken($blue, 9%)
.border
padding: $margin/2
margin: $margin/2
border-color: $blue
相關問題
- 1. css,scss,sass和更少有什麼區別?
- 2. css @import和SASS/SCSS @import有什麼區別?
- 3. 終端中的sass和scss命令有何區別
- 4. css和scss有什麼區別?
- 5. 有什麼區別&和@在SASS
- 6. SCSS/SASS - 使用BEM與SASS和屬性
- 7. sass update和sass手錶有什麼區別
- 8. 產生SASS/SCSS
- 9. ^2和^ 2L有區別嗎?
- 10. MsgBox和MessageBox.Show有區別嗎?
- 11. _xx.html和xx.html有區別嗎?
- 12. gluLookAt()和glFrustum()有區別嗎?
- 13. LDAP和CRL有區別嗎?
- 14. SSLv3和TLS1.0有區別嗎?
- 15. GLubyte和GL_UNSIGNED_BYTE有區別嗎?
- 16. Rect3D.SizeX和Rect3D.Size.X有區別嗎?
- 17. int *和Type *有區別嗎?
- 18. DictionarySectionHandler和NameValueSectionHandler有區別嗎?
- 19. 「Build」和CI有區別嗎?
- 20. YARN和MR2有區別嗎?
- 21. - 有區別嗎?
- 22. 有區別嗎?
- 23. SCSS(sass)的計算:#{}
- 24. UTC和Etc/UTC時區有區別嗎?
- 25. 是否有可能棄用sass/scss mixin?
- 26. scss/sass簡碼或簡化
- 27. Susy - sass,而不是SCSS
- 28. SASS/SCSS內容功能
- 29. 如何使用SASS/SCSS
- 30. SASS/SCSS @mixin使用參數
@downvoter,敢解釋一下嗎? – Lucero