oficiodesign / initial-css

MIT License
4 stars 1 forks source link

Allow heading alternation #129

Closed robsonsobral closed 1 year ago

robsonsobral commented 2 years ago

Just to make things easier.

@mixin headings ($which-ones: 'all') {
  $selector: null;

  @if $which-ones == 'odd' {
    $selector: 'h1, h3, h5, legend, caption, details > summary';
  } @else if $which-ones == 'even' {
    $selector: 'h2, h4, h6, fieldset fieldset legend';
  } @else {
    $selector: 'h1, h2, h3, h4, h5, h6, legend, caption, details > summary';
  }

  #{$selector} {
    @content;
  }
}