-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Allow include tag names like H1, H2, ... as mixins #1011
Comments
We already have a issue about whether we should continue to allow using I'm -1 I think. |
P.s. in your use case couldn't you just swap things round and put the rules |
Actually it's more complex with special syntax for mixins. You has to remember special syntax and supply it vs. beeng just able to use anything as mixin instantly. So, it's actually a simplification and making the syntax more consistent.
No, big part of rules defined in vendor css file (in Twitter Bootstrap CSS Framework) - so I has to change vendor css file or copy-paste it - it's not good. I just want to alter it a little - with mixins it's easy. |
@alexeyPetrushin Take a look at this SO answer, it might show you a way to solve your problem. |
+1 |
Lets move the discussion to #1048 |
moved to #1048 |
What do You think about allowing to use tag elements like H1, H2, .... as mixins?
Use Case
I'm using Twitter Bootstrap and create header for page. Currently, because I can't reuse styles from
H1
element I has to put extra stuff into HTML and code looks like that:But if it would be possible to reuse styles on
H1
the HTML code could be more clean:At fist I though to post an issue to Twitter Bootstrap project and ask them to create alias for every tag name (like
.h1
forH1
), but then realized that it would be better if LESS allow to use tags as mixins.What do You think?
The text was updated successfully, but these errors were encountered: