-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reformat SASS files with prettier #29566
Conversation
@@ -7,15 +7,14 @@ | |||
z-index: z-index( 'root', '.popover' ); | |||
position: absolute; | |||
top: 0; | |||
left: 0 #{"/*rtl:ignore*/"}; | |||
right: auto #{"/*rtl:ignore*/"}; | |||
left: 0 #{'/*rtl:ignore*/'}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this is using interpolation to insert an actual comment for later processing by rtlcss. I don't think moving from " to ' has any effect.
The results of running prettier over all of the scss files in the repo.
40a0005
to
ae70049
Compare
Added #29604 as an optional add-on to this PR, which updates our stylelint rules a touch and runs |
Hrm, turns out prettier's SASS support has a few nasty bugs: Especially: The single line comment bug broke our z-index functions when i tried to apply prettier to it. :/ Maybe we don't want to use prettier for SASS just yet...? cc @sirreal @Automattic/team-calypso |
To repro the bugs in our codebase, run prettier against |
Closing in favor of #29697 |
Prettier tanks on: assets/stylesheets/shared/functions/_z-index.scss |
I spent some time hacking Prettier over the holidays, and came up with two fixes for SCSS formatting:
Some other bugs still remain, including some that break code rather than just formatting it incorrectly. The most severe is prettier/prettier#5603. There I posted an analysis of the causes, but a fix won't be easy. |
The results of running prettier over all of the scss files in the repo.
Changes proposed in this Pull Request
Testing instructions