Open jethrolarson opened 7 years ago
A bug where using stylefmt with stylelint causes calc expressions to break
Which rule, if any, is this issue related to?
length-zero-no-unit
What CSS is needed to reproduce this issue?
.foo { --x: 0px; left: calc(300px - var(--x)); }
stylelint configuration:
extends: stylelint-config-standard
stylefmt 5.3.2
How are you running stylelint: CLI, PostCSS plugin, Node API?
CLI with stylefmt -r 'app/**/*.scss' 'app/**/*.css'
stylefmt -r 'app/**/*.scss' 'app/**/*.css'
What did you expect to happen?
Fixing the warning to be safe since it's in the recommended list
What actually happened (e.g. what warnings or errors you are getting)?
Styles get fixed to
.foo { --x: 0; left: calc(300px - var(--x)); }
calc sees different units on left and right hand side of the operator and returns a 0.
I think that this rule should be removed from the recommended list since it is not safe to fix.
A bug where using stylefmt with stylelint causes calc expressions to break
length-zero-no-unit
stylelint configuration:
stylefmt 5.3.2
CLI with
stylefmt -r 'app/**/*.scss' 'app/**/*.css'
Fixing the warning to be safe since it's in the recommended list
Styles get fixed to
calc sees different units on left and right hand side of the operator and returns a 0.
I think that this rule should be removed from the recommended list since it is not safe to fix.