@function with sass

Scss allows you to define a function by itself:

@function grid-width($n) { @return $n * $grid-width + ($n - 1) * $gutter-width; } 

Can I write the same thing in Sass (indented syntax)?

+4
source share
1 answer

OK, well, I fed it to sass-convert and got

 @function grid-width($n) @return $n * $grid-width + ($n - 1) * $gutter-width 
+8
source

Source: https://habr.com/ru/post/1382335/


All Articles