quantum-css icon indicating copy to clipboard operation
quantum-css copied to clipboard

Wildcard inheritance

Open smikhalevski opened this issue 7 years ago • 0 comments

Support build inherited properties as:

.fz-l {
  &,* { font-size:large }
}
$wildcard-extend: (
    azimuth
    border-collapse
    border-spacing
    caption-side
    color
    cursor
    direction
    elevation
    empty-cells
    font-family
    font-size
    font-style
    font-variant
    font-weight
    font
    letter-spacing
    line-height
    list-style-image
    list-style-position
    list-style-type
    list-style
    orphans
    pitch-range
    pitch
    quotes
    richness
    speak-header
    speak-numeral
    speak-punctuation
    speak
    speech-rate
    stress
    text-align
    text-indent
    text-transform
    visibility
    voice-family
    volume
    white-space
    widows
    word-spacing
);

@mixin spread-properties($props, $value) {
  @each $prop in $props {
    @if (index($wildcard-extend, to_lower_case($prop))) {
      &, * {
        #{$prop}: $value;
      }
    }
    @else {
      #{$prop}: $value;
    }
  }
}

smikhalevski avatar Jan 29 '18 13:01 smikhalevski