-
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
Using extend inside a ruleset argument for a mixin #2748
Comments
The h1 { font-size: 3em; }
@media print {
div-phablet {
&:extend(h1);
}
} compiles into (live example):
Example without media: h1 { font-size: 3em; }
div-phablet {
&:extend(h1);
} compiles into (live example) h1, div-phablet {
font-size: 3em;
} If your |
This does not look like a valid syntax to me to begin with. .phablet({
&:extend(h1);
}); |
@woble He defined detached ruleset in a mixin parameter. It works and is just shorter equivalent for:
|
@SomMeri This is unfortunate news :(. Luckily there are other ways to accomplish what I need. |
I'm using LESS v2.5.3.
I am trying to extend an element rule inside a ruleset in a mixin as follows:
The
.phablet
mixin is a mixin that does a min-width media query for phablets. Based on my limited knowledge from reading #1048 it seems like this should work (the font-size should be set to 3em on.phablets
. The less compiles fine, but nothing is output, so the font-size remains at 1.5em. Am I doing something wrong?EDIT: Note this is a somewhat contrived example. In my own code
h1s
have a bunch of media queries associated with them, and what I would like to do is use the.phablet
mixin to reset.hero-title
to use those media queries.The text was updated successfully, but these errors were encountered: