Extend dynamically generated selectors (summary).
See original GitHub issueThis ticket is to replace (mostly for the sake of clear minimal examples): #1325 #1539 #1597
It includes two distinct sub-features that require internal selector re-parsing:
[1]. Extend interpolated selector:
@var: a;
@{var} {
color: red;
}
b:extend(a) {}
Expected result:
a, b {
color: red;
}
[2]. Extend concatenated selector:
a {
&b {
color: blue;
}
}
c:extend(ab) {}
Expected result:
ab, c {
color: blue;
}
Related but pretty much independent feature of using a variable as an extend
argument,
i.e. :extend(@{var})
, is clearly specified in #1485 and not included here.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:3
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Using dynamic selectors in Optimizely Web
To see the selector ID of any element, navigate to the Editor and click the element. The ID will be displayed in the...
Read more >Dynamic Selectors - Philip Walton
Summary. All component libraries that use preprocessors should offer the option of dynamic selectors. It allows for a short and simple name for ......
Read more >SCSS dynamic selectors - Stack Overflow
1. Using a placeholder selector and @extend : @media screen and (max-width: 768px) { %mq-768 { /* ... */ } } .row, .column,...
Read more >Sass: @extend
Sass's @extend rule solves this. It's written @extend <selector> , and it tells Sass that one selector should inherit the styles of another....
Read more >Advanced Selector Techniques | Guides | Docs - TestCafe
You can extend the Selector class with custom properties and methods. This is necessary to implement framework-specific API and retrieve DOM element ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🆙
I can imagine that this requires fundamental changes to some internals, but it should really be higher priority. 👍