Problem/Motivation
Our PostCSS results in strangely indented CSS.
See core/themes/olivero/css/layout/views.css for example:
.view > * {
margin-block-end: var(--sp2);
}
<code>
Should be
<code>
.view > * {
margin-block-end: var(--sp2);
}
Proposed resolution
Run stylelint fixer as part of our build on the resulting postcss code.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3314523
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3314523-9.5.x
changes, plain diff MR !2855
- 3314523-postcss-results-in
changes, plain diff MR !2849
Comments
Comment #3
alexpottComment #4
alexpottWe could remove the core/.stylelintignore but unfortunately the resulting CSS still doesn't pass our rules...
This is because the resulting CSS is like this:
The new line between the disable rule and the
_:-ms-fullscreen,is the problem. I think this is coming from the postcss processing.Comment #5
mherchelFWIW, those rulesets will be removed shortly.
Anyway, this looks great! In fact, its so great that I discovered a bug while spot checking the resulting CSS (see #3314574: Invalid PostCSS causes invalid CSS within new off-canvas CSS).
Thanks!
Comment #6
lauriiiCommitting this to 10.1.x would potentially make it slightly harder to backport CSS changes from 10.1.x. to 10.0.0. However, I'm wondering if we have to be concerned about backporting issues with CSS from 10.1.x to 10.0.x at this point? It seems like something we would have been worried about few months ago but I guess now most CSS changing issues would only go to 10.1.x. Thoughts?
Comment #7
alexpottThis is a whitespace change to generated CSS files I think this is fine to backport to 10.0.x - I also think we can backport this to 9.5.x too - obvs it will need a reroll for that branch :)
Comment #9
alexpottI created a MR for 9.5.x too
Comment #15
lauriiiCommitted MR #2849 b544664 and pushed to 10.1.x and cherry-picked to 10.0.x.
Committed MR #2855 c1a8f29 and pushed to 9.5.x. Thanks!