Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal depends on stylelint-config-standard 23.0.0. However, the latest version is 28.0.0: https://www.npmjs.com/package/stylelint-config-standard. Release notes: https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGEL...
Release notes snippet
stylelint-config-standard, which enforces Drupal's CSS style, has been upgraded from 23.0.0 to 28.0.0. Developers who relied on this ruleset may have to make minor tweaks to their CSS to comply with the new standards.
Comment | File | Size | Author |
---|---|---|---|
#25 | interdiff_23-25.txt | 477 bytes | bnjmnm |
#25 | 3308821-25.patch | 4.68 KB | bnjmnm |
#23 | 3308821-23.patch | 4.21 KB | bnjmnm |
#20 | 3308821-20-95x.patch | 5.62 KB | bnjmnm |
#20 | interdiff_18--20.txt | 1.71 KB | bnjmnm |
Comments
Comment #2
lauriiiComment #3
lauriiiHad to make couple of changes to CSS to make it comply with the new stylelint rules. The alpha function usage removal is the only functional change but that can be removed because it was only there for < IE 7 support.
Comment #5
lauriiiComment #6
nod_all good, lint still works, no change in the build.
Comment #7
bnjmnmComment #9
longwave9.5.x patch needs work for Seven:
Comment #11
bnjmnmCommitted to 10.1.x and cherry picked to 10.0.x. As mentioned in #9, a little more work is needed to port to 9.5.x
Comment #12
bnjmnmThe
alpha()
use is not needed for any browser currently supported by Drupal 9, so it can be removed here like it was in 10.Comment #13
nod_That doesn't work in IE11 though https://caniuse.com/css-not-sel-list
Comment #14
longwaveNW for #13.
Is there a CSS linter that can take browserslist config and tell us whether we are using unsupported CSS? (instead of autoprefixer, which would try to fix it for us)
Comment #15
longwaveTo answer my own question with 5 seconds of Google: should we consider adding https://github.com/ismay/stylelint-no-unsupported-browser-features to stylelint?
Comment #16
bnjmnmGood catch @nod_! I was focusing on the filter calls and not the other changes. That definitely won't fly in IE11.
Comment #17
lauriiiI think we would have to change this rule globally because it's not a great experience to have stylelint say something that we can't commit.
Comment #18
bnjmnmComment #19
longwaveI was about to say that it looks like this needs reverting as well:
But is PostCSS translating this to the correct syntax for us? In the built CSS this is present as:
Similarly in the interdiff in #16 note that the .pcss.css file changed, but the selectors in the .css file didn't change.
So if this is true, can we in fact use
:not()
with a selector list and PostCSS will translate it for us?Comment #20
bnjmnmGood catch @longwave!
Comment #21
longwaveComment #22
lauriii#19 is true for .pcss.css files but Stylelint applies on .css files too. I think we should still change the rule for 9.5.x to ensure that we don't accidentally add CSS that is not compatible with IE11.
Comment #23
bnjmnmI didn't set things up to get a nice interdiff, but the patch itself is likely easier to read as a whole vs the diff anyway.
Comment #24
longwaveHuh, we are already using the advanced syntax!
The line in question:
Comment #25
bnjmnmApparently I missed that running commit-code-check locally. Glad to see stylelint doing its job 😎
Comment #26
longwaveThanks! RTBC assuming bot agrees.
Comment #28
lauriiiCommitted 2a26adc and pushed to 9.5.x. Thanks!
Comment #29
longwaveAdded a release note snippet.