Closed vanderlee closed 7 years ago
I suppose you have to use ~'!important'
there. The same issue is in the reference less.js
compiler (obviously the problem is in the exceptional !
symbol not fitting into the "ordinal" value syntax).
Compatibility with less.js would have preference over compatibility with leago/lessphp.
Is this an issue worth reporting to less.js; the "ordinal" !important
syntax seems reasonable to me, or should this be considered expected behaviour?
Is this an issue worth reporting to less.js;
To be honest, it would make sense only if you can do a PR with a corresponding fix. Curiously there was already the same error later fixed and then broken again.
The way I read it, they've made a conscious decission to put !important
outside the parenthesis, and with good reasons. I think a fix in lessc.inc.php
should be pretty easy (str_replace('!important)
, ') !important', $css)` should do), and fixes the compatibility issue. I'll see if I can add this fix and unittest for it soon.
Trying to move from leafo/lessphp and encountered just one inconsistency.
The following fragment (simplified for readability) compiles in leafo, not in oyejorge:
If I remove the
!important
, it compiles, but obviously without the!important
that I need. If I move it after the mixin call (like so:.box-shadow(0 4px 16px rgba(0,0,0,.5)) !important;
), it works as intended.So it's fixed pretty easily, but still; an inconsistency which may make porting a bit more difficult and which might be fixed in less.php itself or in the
lessc.inc.php
file.Using v1.7.0.10