Fix false positives for functions inside of math functions in length-zero-no-unit #5204
Labels
good first issue
is good for newcomers
status: ready to implement
is ready to be worked on by someone
type: bug
a problem with a feature or rule
This test exercises exactly what it shouldn't happen:
https://github.com/tomyo/stylelint/blob/eb419ef754ac442f9f3b9f7164fccb938b99adb3/lib/rules/length-zero-no-unit/__tests__/index.js#L332
Why?
It converts this:
Into this:
If
--foo
is not defined, the fallback value0
is used, resulting incalc(0 + 10px);
which is invalid.13.12.0
No unit strips should happen inside level 4 math functions, just for safety.
In the link to the test I gave, something like this is what I would expect instead:
The text was updated successfully, but these errors were encountered: