prettier: css module @value breaks when prettier puts each item on a new line
works:
@value fontStack: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
breaks:
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (11 by maintainers)
Commits related to this issue
- Experimental fix for css-modules @values Fixes #2355 — committed to azz/prettier by azz 7 years ago
CSS modules supports multiline
@values
now (PR here), but you need a wrapping parens:However, Prettier doesn’t seem to do this out of the box, so:
becomes:
which doesn’t work.
@vjeux Could we get Prettier to add the parens to
@values
if they get formatted to multiline? The original problem (multiline support) got added to CSS modules, but since Prettier is handling formatting it seems like it the parens should be handled here.Thanks for all the hard work!
I’m not seeing this anymore: playground
It still doesn’t add new lines, but it’s not mangling.
Becomes