Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error report: Extend inside directives #2058

Closed
vecerek opened this issue May 11, 2016 · 1 comment
Closed

Error report: Extend inside directives #2058

vecerek opened this issue May 11, 2016 · 1 comment

Comments

@vecerek
Copy link

vecerek commented May 11, 2016

According to the Sass language specification, the use of @extend within @media (or other CSS directives) may only extend selectors that appear within the same directive block. However, if the referenced selector by the @extend is also present in the outer scope, it fails applying the @extend rule and throws an error message.

An example SCSS code:

@media print {
  .selector { // this should be matched - it is in the same directive
    color: black;
  }
  .screenClass{
    @extend .selector;
  }
}
.selector {
  color: red;
}

The error message received:

You may not @extend an outer selector from within @media.
You may only @extend selectors within the same directive.
From "@extend .selector" on line 6.
@chriseppstein
Copy link

Duplicate of #1050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants