Last active
January 22, 2019 15:08
-
-
Save Kcko/39f2f5bc3a0135ea3f08 to your computer and use it in GitHub Desktop.
Maps v SCSS - náhrada za seznamy (lists)
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
$sizes: ( | |
xxs: .2cm, | |
xs: .4cm, | |
s: .6cm, | |
m: .7cm, | |
l: .8cm, | |
); | |
@each $s, $h in $sizes | |
{ | |
&--#{$s} | |
{ | |
td | |
{ | |
height: #{$h}cm; | |
} | |
} | |
} |
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
$colors: ( | |
blue: #008eff, | |
white: #fff, | |
gray: #808080, | |
black: #464646, | |
orange: #ff9100, | |
); | |
@function color($key) { | |
@if map-has-key($colors, $key) { | |
@return map-get($colors, $key); | |
} | |
@warn "Unknown `#{$key}` in $colors."; | |
@return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment