Skip to content

Headings mixin generates an error #182

Description

@marcinkrawiec

The headings mixin seems to be broken (inuit v5.0, fetched yesterday). The following code:

@include headings(1,6) {
    color: #aaa;
}

generates an error:

error scss/screen.scss (Line 40 of scss/inuit.css/generic/_mixins.scss: Invalid CSS after "": expected selector_comma_sequence, was ", h1, h2, h3, h...")

As you can see there is a comma at the beginning instead of the first heading selector.

Probably it should be something like that:

@mixin headings($from: 1, $to: 6){
    @if $from >= 1 and $to <= 6{
        $heading-selector: (unquote("h#{$from}"));
        @for $i from ($from+1) through $to {
            $heading-selector: $heading-selector, unquote("h#{$i}")
        }
        #{$heading-selector}{
            @content
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions