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
I have spotted a possible improvement to the extend (and possibly the mixin) feature that can be made. Actually it would allow using an existing css framework and any markup. I tried to solve this in other preprocessor too, but I think LESS is the closest to the best solution. I wouldn't call it a bug, however one may think that the existing feature should work this way.
I am experimenting with a dropdown feature distilled from w3css.
Here is my css used for dropdown and the target html markup:
I intentionally placed the &:extend(.dropdown-content all); above &:extend(.dropdown all); as I think it makes the solution easier:
When the processor reaches an extend keyword, it would traverse not only the code in the less file, but also the generated part of the file (or the structure that is already generated) and it would process the extend also in the generated selectors of the past extends.
What do you think?
The text was updated successfully, but these errors were encountered:
If I understand it right (see below) this is a "combinatorial explosion" already considered at #1952 (and earlier in #1641).
It would be more readable if you'd reduce the example to as minimal snippet as possible concentrating on the feature itself (Otherwise it's a bit difficult to break through all these long and similar selectors to get what it's about. Usually things like a, .b, .c work the best).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have spotted a possible improvement to the extend (and possibly the mixin) feature that can be made. Actually it would allow using an existing css framework and any markup. I tried to solve this in other preprocessor too, but I think LESS is the closest to the best solution. I wouldn't call it a bug, however one may think that the existing feature should work this way.
I am experimenting with a dropdown feature distilled from w3css.
Here is my css used for dropdown and the target html markup:
I would do this .less code:
The resulting .css:
Actually it almost correctly replaces all
.dropdown-content
reference except for this part:It should read:
I intentionally placed the
&:extend(.dropdown-content all);
above&:extend(.dropdown all);
as I think it makes the solution easier:When the processor reaches an
extend
keyword, it would traverse not only the code in the less file, but also the generated part of the file (or the structure that is already generated) and it would process the extend also in the generated selectors of the past extends.What do you think?
The text was updated successfully, but these errors were encountered: