Skip to content

Instantly share code, notes, and snippets.

@MichaelZaporozhets
Last active May 24, 2021 06:44
Show Gist options
  • Save MichaelZaporozhets/32afd7a16269b989798fdf5726a5d5a7 to your computer and use it in GitHub Desktop.
Save MichaelZaporozhets/32afd7a16269b989798fdf5726a5d5a7 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
$theme: 'Dark';
$cumulus-Color: (
"[Global] Color / Primary / Orange": (
"name": "[Global] Color / Primary / Orange",
"component": "Color",
"data": rgba(254, 139, 22, 1),
"theme": "Global",
"category": "Primary",
"instance": "Orange",
"description": "Primary Orange Color",
"id": "235:9",
"type": "COMPONENT",
"value": rgba(254, 139, 22, 1)
),
"[Global] Color / Seconary / Neon Pink": (
"name": "[Global] Color / Seconary / Neon Pink",
"component": "Color",
"data": rgba(255, 70, 146, 1),
"theme": "Global",
"category": "Seconary",
"instance": "Neon Pink",
"description": "?",
"id": "235:11",
"type": "COMPONENT",
"value": rgba(255, 70, 146, 1)
),
"[Dark] Color / Brand": (
"mapTo": "[Global] Color / Primary / Orange"
),
"[Light] Color / Brand": (
"mapTo": "[Global] Color / Seconary / Neon Pink"
)
);
;
@function getColor($name) {
$item: map-get($cumulus-Color, "[#{$theme}] Color / #{$name}");
$mapToName: map-get($item, 'mapTo');
$resolvedItem: map-get($cumulus-Color, $mapToName);
@return map-get($resolvedItem, 'value');
}
h1 {
color: getColor('Brand');
}
h1 {
color: #fe8b16;
}
{
"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