less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17k stars 3.41k forks source link

Mixin with pseudo selector - 2 #3686

Closed AuracleTech closed 2 years ago

AuracleTech commented 2 years ago

I can't re-open the issue, but this is my issue as well. https://github.com/less/less.js/issues/3427

To put simply

.slot{ width:16px; height:16px; }
.slot:hover{ background:orange; }
.L_slot{ .slot; width:64px; height:64px; }

Expected result : .L_slot should have the .slot:hover, yet it does not acquire it. Also it is impossible to import from any other way.

AuracleTech commented 2 years ago

Found fix

Using nested mixins

.slot{ &:hover{background:orange;} border:1px solid gray; width:16px; height:16px; }

Things you gotta know to know I guess...