Created
March 6, 2024 11:29
-
-
Save spazione/c8284771bb42db2c03e31fd1e9c0acbd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
@use "sass:map"; | |
$headingSettings: ( | |
prefix: 'heading', | |
vars: ( | |
h1: ( | |
font-size: '10', | |
line-height: '10', | |
font-weight: '10', | |
margin: '1rem 0', | |
), | |
display-1: ( | |
font-size: '10', | |
line-height: '10', | |
font-weight: '10', | |
margin: '1rem 0', | |
), | |
), | |
); | |
@mixin inject-headings($collection, $father: "") { | |
@each $key, $keys in $collection { | |
@if $key == "vars" or $key == "prefix" { | |
$new-father: #{$father} !global; | |
$prefix-icon: map.get($collection, prefix) !global; | |
} @else { | |
$new-father: #{$father}-#{$key} !global; | |
} | |
@if $key != "prefix" { | |
@if type-of($keys) == "map" { | |
@include inject-headings($keys, $new-father); | |
} @else if type-of($keys) != "map" { | |
:where(.#{$prefix-icon}-#{$father}) { | |
@each $value in $keys { | |
#{$key}: #{$value}; | |
} | |
} | |
} | |
} | |
} | |
} | |
@include inject-headings($headingSettings) |
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
:where(.heading--h1) { | |
font-size: 10; | |
} | |
:where(.heading--h1) { | |
line-height: 10; | |
} | |
:where(.heading--h1) { | |
font-weight: 10; | |
} | |
:where(.heading--h1) { | |
margin: 1rem 0; | |
} | |
:where(.heading--display-1) { | |
font-size: 10; | |
} | |
:where(.heading--display-1) { | |
line-height: 10; | |
} | |
:where(.heading--display-1) { | |
font-weight: 10; | |
} | |
:where(.heading--display-1) { | |
margin: 1rem 0; | |
} |
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
{ | |
"sass": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment