Skip to content

LibSass supports cross-media @extend #712

@KittyGiraudel

Description

@KittyGiraudel

I feel kind of dirty reporting this, because this is not actually a bug per se... It turns out LibSass does support something Ruby Sass doesn't. Moreover, this feature has been asked for years in Sass, so I'm quite confused about the way to go here... Should this be removed? I'll leave you the only judge of this.

Test:

.selector {
  content: selector;
}

@media print {
  .other-selector {
    @extend .selector;
  }
}

Expect:

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

Result:

.selector,
.other-selector {
    content: selector;
}

Ref: http://sass-compatibility.github.io/#cross_media_extend.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions