| 1 | # sass layer format |
| 2 | |
| 3 | Code |
| 4 | format(core) |
| 5 | Output |
| 6 | [1] "@function my_invert($color, $amount: 100%) {\n $inverse: change-color($color, $hue: hue($color) + 180);\n @return mix($inverse, $color, $amount);\n }\n$color: blue !default;\nbody { background-color: $color; color: my_invert($color); }" |
| 7 | |
| 8 | --- |
| 9 | |
| 10 | Code |
| 11 | core |
| 12 | Output |
| 13 | /* Sass Bundle */ |
| 14 | @function my_invert($color, $amount: 100%) { |
| 15 | $inverse: change-color($color, $hue: hue($color) + 180); |
| 16 | @return mix($inverse, $color, $amount); |
| 17 | } |
| 18 | $color: blue !default; |
| 19 | body { background-color: $color; color: my_invert($color); } |
| 20 | /* *** */ |
| 21 | |
| 22 | # sass_layer_file() basically works |
| 23 | |
| 24 | Code |
| 25 | str(sass_layer_file(f)) |
| 26 | Output |
| 27 | List of 1 |
| 28 | $ layers:List of 1 |
| 29 | ..$ :List of 7 |
| 30 | .. ..$ functions : chr [1:7] "@function color-contrast($color) {" " @return if(" " red($color) * 0.299 + green($color) * 0.587 + blue($color) * 0.114 > 186," " black, white" ... |
| 31 | .. ..$ defaults : chr [1:2] "$body-color: color-contrast($body-bg) !default;" "" |
| 32 | .. ..$ mixins : chr [1:4] "@mixin body-color {" " color: $body-color" "}" "" |
| 33 | .. ..$ rules : chr [1:3] "body {" " @include body-color;" "}" |
| 34 | .. ..$ declarations : NULL |
| 35 | .. ..$ html_deps : NULL |
| 36 | .. ..$ file_attachments: chr(0) |
| 37 | .. ..- attr(*, "class")= chr [1:2] "sass_layer" "list" |
| 38 | - attr(*, "class")= chr "sass_bundle" |
| 39 |