說明網址
Sass 編譯的風格總共有四種:
Sass 編譯的風格總共有四種:
- nested (預設的樣式) : 巢狀顯示
- expanded : 不要巢狀
- compact : 簡潔樣式,縮進成一行
- compressed :壓縮模式
實測:
(結果我把圖都截下來之後才看到手冊寫的說明 Orz...)




Gruntfile.js 的 output style 的寫法,設定寫在 style 選項的值。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg : grunt.file.readJSON('package.json'), | |
sass:{ | |
dist: { | |
options:{ | |
style: 'expanded' | |
}, | |
files:{ | |
'style.css': 'style.sass', | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.registerTask('default',['sass']); | |
} |
沒有留言:
張貼留言
若你看的文章,時間太久遠的問題就別問了,因為我應該也忘了... XD