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

Support for !important @extend #12

Closed
minimit opened this issue Jun 7, 2020 · 2 comments
Closed

Support for !important @extend #12

minimit opened this issue Jun 7, 2020 · 2 comments

Comments

@minimit
Copy link

minimit commented Jun 7, 2020

Is it possible to support !important in extend compiled? I know the @extend specifications don't specify it..

.btn {
  @extend .btn-setup !important;
}

.btn-setup {
  background: red;
}

Result

.btn {
  background: red !important;
}

.btn-setup {
  background: red;
}
@minimit
Copy link
Author

minimit commented Jun 7, 2020

@jonathantneal Thanks for your work , i've seen you need to do a rewrite of the plugin. any info? I've read the discussion about @apply in css drafts and right now I can't find any really good postcss mixins (I like the less mixins they work pretty much like this plugin).

@romainmenke
Copy link
Member

hi @minimit,

This is beyond the scope of this plugin and against the core concept.

@extend as a feature is purely : "act as if element with class .foo also matches class .bar".

Modifying the declarations by making them important goes against the fundamentals of the feature.

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