Skip to content

Extending placeholders within media queries silently fails #317

@keithamus

Description

@keithamus

Abstract

Extending a placeholder selector from within a media query in Sass 3.4.9 produces an error, but in Libsass 3.1.0 it produces undesirable output and does not fail.

Details

Given the following SCSS:

%foo {
  max-width: 80%;
} 

@media screen and (min-width: 300px) {
  body {
    @extend %foo;
  }
}

Expected

Sass 3.4.9 produces an error

You may not @extend an outer selector from within @media.
You may only @extend selectors within the same directive.
From "@extend %foo" on line 7.

Actual

In Libsass 3.1.0 the output is:

body {
  max-width: 80%; }

This is obviously very undesirable. Libsass should either throw a syntax error or output no content.


edit updated Jan 5th, 2015

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions