Kcko
2/19/2015 - 2:28 PM

Maps v SCSS - náhrada za seznamy (lists)

Maps v SCSS - náhrada za seznamy (lists)

$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;
}
        $sizes: (
            xxs: .2cm,
            xs: .4cm,
            s: .6cm,
            m: .7cm,
            l: .8cm,
        );

        @each $s, $h in $sizes
        {
            &--#{$s}
            {
                td
                {
                    height: #{$h}cm; 
                }
            }
        }