Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Use of Sass's @extend directive inside media queries leads to sadness. #6

@mysterycommand

Description

@mysterycommand

Hi, I just wanted to point out that in the Sass version of the grid, the @extend directive is used inside "IE fixes" and the min-width: 40em media query. Because of the way Sass handles @extend this results in the .huge declaration being converted to:

.huge, .ie h1, h1 {
  /* 42px / 48px  */
  font-size: 2.625em;
  line-height: 1.143em;
}

… which I don't think is what's intended. Less has a slightly simpler mixin syntax, but I think this is what you want:

@mixin huge {
    /* 42px / 48px  */
    font-size: #{42 / $em}em;
    line-height: ($line *2) / 42  * 1em;
}
.huge { @include huge; }

… then, in the IE-specific, and media query declarations, you'd use the same, @include huge; … this produces a CSS document that looks more like the GGS.css that's included in the source.

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