-
-
Save Adrian1907/a472ba8e5e8c28a345353d1448df8eb5 to your computer and use it in GitHub Desktop.
Sass (SCSS) Colors Maps. `map-get`
This file contains hidden or 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
| $colors: ( | |
| red: ( | |
| base : #FF4E4E, | |
| dark : #FF0005 | |
| ), | |
| dark: ( | |
| base : #212121, | |
| normal : #333333, | |
| light : #E0E0E0 | |
| ) | |
| ); |
This file contains hidden or 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
| @function palette($palette, $tone: 'base', $default: $colors) { | |
| @return map-get(map-get($default, $palette), $tone); | |
| } |
This file contains hidden or 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
| body { | |
| background-color: palette(red, dark); | |
| color: palette(dark); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment