Created
February 4, 2021 09:25
-
-
Save voodoocode/abffd0b317df51c21b057856a095ba7d 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
$teaser-colors: ( | |
"123": ( | |
"selector": "#anchor-teaser123", | |
"type": "landingpageElement-anchor", | |
"bg-color": "green", | |
"text-color": "#efefef" | |
), | |
"456": ( | |
"selector": "#anchor-teaser456", | |
"type": "landingpageElement-anchor", | |
"bg-color": "red", | |
"text-color": "#c3c3c3" | |
), | |
"678": ( | |
"selector": "#benefit-teaser456", | |
"type": "landingpageElement-benefit", | |
"bg-color": "blue", | |
"text-color": "grey" | |
) | |
); | |
@each $key, $value in $teaser-colors { | |
$selector: map_get($value, "selector"); | |
$type: map_get($value, "type"); | |
#{$selector} { | |
color: unquote(map_get($value, "text-color")); | |
background-color: unquote(map_get($value, "bg-color")); | |
//example: how to react to special type | |
@if ($type == "landingpageElement-anchor") { | |
&:hover { | |
color: darken(unquote(map_get($value, "text-color")), 10); | |
} | |
} | |
} | |
} |
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
#anchor-teaser123 { | |
color: #000000; | |
background-color: green; | |
} | |
#anchor-teaser123:hover { | |
color: #000000; | |
} | |
#anchor-teaser456 { | |
color: #ffffff; | |
background-color: red; | |
} | |
#anchor-teaser456:hover { | |
color: #ffffff; | |
} | |
#benefit-teaser456 { | |
color: grey; | |
background-color: blue; | |
} |
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": "libsass/3.5.5", | |
"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