Repository navigation
Fix line break in CSS declaration with comma - #14208
Conversation
|
@mvorisek Please check discussion in #6024 and #6024 (comment) |
|
I support your #6024 (comment) as the wrapping rule should be easy to understand and not dependent on the content IMHO #13260 is not a solution too, as any list of CSS properties will not work with LESS/SASS as name can be anything |
|
But I agree line breaks in case like this seems unnecessary. |
This comment was marked as outdated.
This comment was marked as outdated.
|
implemented in 2nd/3rd commit, CSS declarations like thank you @fisker for guiding me into the right direction |
Co-authored-by: fisker Cheung <[email protected]>
|
Hi @fisker, can this PR be merged? |
|
Need more reviews. |
|
@prettier/core Need review. |
|
@fisker there are more review now, would it be possible to merge this PR so it can be part of the next release? |
| $font-family-rich: | ||
| // custom | ||
| "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", | ||
|
|
There was a problem hiding this comment.
Good catch, any idea how to fix it?
There was a problem hiding this comment.
Perfect, thank you ❤️
|
Thank you for your hard work! |
|
Excluded custom props for now, but it's wrong. Not sure how to fix, |
Can you link the fix PR/commit here? I am not entirely sure what the expected result should be for JSON, I would probably expect the same JSON format as in standard JSON/JS. |
|
Commit: 8ddaa4c
Should stay as-it-is. |
fix #2611 (comment) prettier PR: prettier/prettier#14208
|
This seems a bit too aggressive, see #15070. It’s pretty difficult to write a font-family without triggering this unnecessarily. |
|
We're using the postcss-modules plugin, which apparently doesn't support multiple lines for
Error: But with the inline format above, it works fine. Maybe this is something that the modules plugin needs to support? For now I just use |
Co-authored-by: fisker Cheung <[email protected]>
Description
Comma in CSS/LESS declaration/value is used to separate group of multiple values of the same meaning.
Currently line break is enforced in selectors like:
but not for CSS values like:
this PR fixes/unifies the behaviour by enforcing line break after comma in CSS declaration/value.
fix #6024, #7039, #8462
close #13260
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨