Skip to content

Instantly share code, notes, and snippets.

@voodoocode
Created February 4, 2021 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voodoocode/c639daa9cf7c91b8edfdd93a53a6ee19 to your computer and use it in GitHub Desktop.
Save voodoocode/c639daa9cf7c91b8edfdd93a53a6ee19 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
$teaser-colors: (
"123": (
"selector": "#anchor-teaser123",
"type": "landingpageElement-anchor",
"bg-color": "green",
"text-color": "#ffffff"
),
"456": (
"selector": "#anchor-teaser456",
"type": "landingpageElement-anchor",
"bg-color": "red",
"text-color": "#000000"
),
"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");
$text-color: unquote(map_get($value, "text-color"));
$bg-color: unquote(map_get($value, "bg-color"));
#{$selector} {
color: $text-color;
background-color: $bg-color;
@if ($type == "landingpageElement-anchor") {
&:hover {
color: lighten($text-color, 10);
}
}
}
}
#anchor-teaser123 {
color: #ffffff;
background-color: green;
}
#anchor-teaser123:hover {
color: white;
}
#anchor-teaser456 {
color: #000000;
background-color: red;
}
#anchor-teaser456:hover {
color: #1a1a1a;
}
#benefit-teaser456 {
color: grey;
background-color: blue;
}
{
"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