oyejorge / less.php

less.js ported to PHP.
http://lessphp.typesettercms.com
Apache License 2.0
657 stars 2 forks source link

Interpolation names replace colors names with css color hex #347

Closed minimit closed 7 years ago

minimit commented 7 years ago

As title, this: @colors: white #ffffff; .color { .for(@colors); .-each(@value) { @name: extract(@value, 1); &-@{name} { color: extract(@value, 2) !important; } } }

Exports this: .color-#fff { color: #fff !important; }

Should export this instead: .color-white { color: #fff !important; }

I also tried with this old less.js fix that had the same problem, but it doesn't work: https://github.com/less/less.js/issues/864

seven-phases-max commented 7 years ago

use @colors: ~'white' #ffffff; instead.

minimit commented 7 years ago

Perfect it works well