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

Selector Rewriting #2620

Closed
chriseppstein opened this issue Apr 11, 2016 · 1 comment
Closed

Selector Rewriting #2620

chriseppstein opened this issue Apr 11, 2016 · 1 comment

Comments

@chriseppstein
Copy link

Should the new module system have a selector rewriting capability?

#2024

@nex3
Copy link
Contributor

nex3 commented Apr 15, 2016

I think this falls under the "extend-only imports" non-goal. If we had that, you'd be able to write something like

// _button.scss
.buttonComponent {
  // ...
}
// app.scss
@use "button" extend-only;

.btn {
  @extend .buttonComponent;
}

and get the behavior you want.

Alternately, if you just want to scope the existing selectors, you can do that in the current proposal:

// _button.scss
.buttonComponent {
  // ...
}
// app.scss
@use "button" mixin;

.btn {
  @include button;
}

Either way, I don't think the proposal should be extended to include specific support for this use case.

@nex3 nex3 changed the title Selector Rewriting Apr 13, 2018
@nex3 nex3 changed the title [Module system] Selector Rewriting Jul 6, 2018
@nex3 nex3 closed this as completed Sep 11, 2018
@nex3 nex3 transferred this issue from another repository Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants