github.com/rabbouni145/gg@v0.47.1/docs/content/en/hugo-pipes/scss-sass.md (about) 1 --- 2 title: SASS / SCSS 3 description: Hugo Pipes allows the processing of SASS and SCSS files. 4 date: 2018-07-14 5 publishdate: 2018-07-14 6 lastmod: 2018-07-14 7 categories: [asset management] 8 keywords: [] 9 menu: 10 docs: 11 parent: "pipes" 12 weight: 30 13 weight: 02 14 sections_weight: 02 15 draft: false 16 --- 17 18 19 Any SASS or SCSS file can be transformed into a CSS file using `resources.ToCSS` which takes two arguments, the resource object and a map of options listed below. 20 21 ```go-html-template 22 {{ $sass := resources.Get "sass/main.scss" }} 23 {{ $style := $sass | resources.ToCSS }} 24 ``` 25 26 ### Options 27 targetPath [string] 28 : If not set, the resource's target path will be the asset file original path with its extension replaced by `.css`. 29 30 outputStyle [string] 31 : Default is `nested`. Other available output styles are `expanded`, `compact` and `compressed`. 32 33 precision [int] 34 : Precision of floating point math. 35 36 enableSourceMap [bool] 37 : When enabled, a source map will be generated. 38 39 includePaths [string slice] 40 : Additional SCSS/SASS include paths. Paths must be relative to the project directory. 41 42 ```go-html-template 43 {{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/myscss")) }} 44 {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }} 45 ```