You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue depends on #1177 and probably a few others - of course I don't want every selector between ._t-140px and ._t-8px but if mixins could be extended, I wouldn't have a problem with writing the font classes manually (which would prevent them from being output in the generated CSS).
Any thoughts on the best way to implement a system like this, or should I adjust my approach?
The problem of course is that two separate stylesheets need to be built. It works, but I'd like to avoid a build script dependency.
What if reference-type @import files could be compiled independently? It'd require that the referenced build be able to compile without requiring other sibling imports as dependencies.
Another useful case where this comes up is when generating grid system classes. Ideally, you should be able to use the grid classes directly in your html or extend them in your LESS.
I've been working on porting over the Foundation 4 grid to LESS and it works well, except I can't extend the grid classes. I can use a mixin instead, but it will result in a ton of repeated code.
👍 to this. Currently working on a project using FontAwesome and it would be great to be able to extend their @{fa-css-prefix}{} classes for use in CKEditor.
^ I'm just trying to slightly sort all these "extend dynamically generated selector" issues by adding a bit more specific names to them (the problem is that most of such tickets cover 2-3 quite unrelated extend issues together and thus overlapping by 1-2 of those with each other but with no clear point which one could be merged with which another :)
@seven-phases-max I wanted to fix it in a general way - if a selector includes interpolation, attempt re-parsing it. I haven't given it a go yet though. Was thinking to pull selector parsing into its own class.
@lukeapage OK, I was just thinking of maybe merging all these into one issue with minimal and simplified example for each "sub-issue" for easier tracking. But probably it's not worth that (yet at least).
Activity
radium-v commentedon Sep 11, 2013
Most likely related to #1196.
A workaround for the future is to build the mixin to a separate, temporary stylesheet and then include it as a reference import.
First, build
type.lessThen, build
box.lessOutputs:
The problem of course is that two separate stylesheets need to be built. It works, but I'd like to avoid a build script dependency.
What if reference-type
@importfiles could be compiled independently? It'd require that the referenced build be able to compile without requiring other sibling imports as dependencies.theoephraim commentedon Nov 19, 2013
+1
Another useful case where this comes up is when generating grid system classes. Ideally, you should be able to use the grid classes directly in your html or extend them in your LESS.
I've been working on porting over the Foundation 4 grid to LESS and it works well, except I can't extend the grid classes. I can use a mixin instead, but it will result in a ton of repeated code.
A simplified example of how I'd like it to work:
This should ideally make the .my-classname class show up with the small-3 and medium-5 classes within their respective media queries.
Craga89 commentedon Jan 8, 2014
👍 to this. Currently working on a project using FontAwesome and it would be great to be able to extend their
@{fa-css-prefix}{}classes for use in CKEditor.seven-phases-max commentedon Jan 8, 2014
Just in case for the FA there's "FA specific" workaround (the second example).
Craga89 commentedon Jan 9, 2014
Great! I worked around it like so, should anyone stumble on this:
Unfortunately I had to repeat the styles of the
~{fa-css-prefix}{}class, but other than that it works great.[-]Extend dynamically-generated selectors[/-][+]Extend dynamically-generated selectors (interpolated identifier + concatenated identifier)[/+]seven-phases-max commentedon Sep 18, 2014
^ I'm just trying to slightly sort all these "extend dynamically generated selector" issues by adding a bit more specific names to them (the problem is that most of such tickets cover 2-3 quite unrelated
extendissues together and thus overlapping by 1-2 of those with each other but with no clear point which one could be merged with which another :)lukeapage commentedon Sep 18, 2014
@seven-phases-max I wanted to fix it in a general way - if a selector includes interpolation, attempt re-parsing it. I haven't given it a go yet though. Was thinking to pull selector parsing into its own class.
seven-phases-max commentedon Sep 18, 2014
@lukeapage OK, I was just thinking of maybe merging all these into one issue with minimal and simplified example for each "sub-issue" for easier tracking. But probably it's not worth that (yet at least).
lukeapage commentedon Sep 18, 2014
Great, sounds good, didn't mean to sound anti what you were doing, was just
replying quickly.
seven-phases-max commentedon Sep 18, 2014
Merging to #2200.
[-]Extend dynamically-generated selectors (interpolated identifier + concatenated identifier)[/-][+]Extend dynamically-generated selectors[/+]