Drupal core uses https://github.com/browserslist/caniuse-lite to inform PostCSS what CSS properties to transpile.
This is currently out of date. Safari 16 and IOS 16 were released earlier this month. Because Drupal 10 only supports the last two versions of each of these (see https://www.drupal.org/docs/system-requirements/browser-requirements), PostCSS no longer needs to transpile CSS Logical Properties, which are used throughout Olivero, and other places in core CSS.
This should result in a substantially smaller CSS payload 🙌
Task
According to https://stackoverflow.com/questions/57352794/how-do-i-update-browserslist, we need to run a simple
npx browserslist@latest --update-db.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screenshot-20220929222207-793x985.png | 184.66 KB | longwave |
| #8 | Screenshot-20220929220632-373x149.png | 8.57 KB | longwave |
| #8 | Screenshot-20220929220619-444x363.png | 55.38 KB | longwave |
Issue fork drupal-3312481
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:
- 3312481-update-cores-browserlist
changes, plain diff MR !2817
Comments
Comment #3
mherchelChanges made. Lets see if tests pass :)
Comment #4
longwave86 files +875 -3764Nice diff!
Assuming this works I think this means we can have a followup to use CSS Logical Properties everywhere in core, and we should be able to drop all our
[dir="rtl"]CSS?Comment #5
mherchelPretty much yes! There are some places where we still need to use the
dirattribute, for example with something liketransform: translateX(50px)etc. But those are few!Comment #6
longwaveDoes this need manual testing, or can we trust that
browserslistandcaniuse-liteare correct? The code changes look fine, as it is just a dependency update and a CSS rebuild.Comment #7
mherchelI personally don't think this needs manual testing, but it obviously doesn't hurt. If we do testing, the main things to check are Olivero, and the off-canvas tray in RTL. We'd specifically want to test earlier versions of Safari (I don't have any old versions).
That all being said, I'm confident in the automated changes and don't believe it warrants manual testing.
Comment #8
longwaveDId some manual testing using Browserstack in Safari 15, Olivero and the settings tray look great in both LTR and RTL languages and I found no issues.
I also went back to Safari 14 to see how broken things are; while there are some margin/padding issues visible in Olivero it's not unusable:
Therefore as this works as designed in Safari 15 (the oldest version we support) then this is RTBC.
Comment #9
longwaveMR needs rebasing following #3281341: Olivero's blockquote pseudo-element decoration *sometimes* does not display properly
Comment #10
mherchelJust brought it up to date. Thanks!
Comment #11
longwaveComment #12
alexpottI think we should be highlighting in a release note and change record. For D10 themes and modules this is something very nice and we should be promoting it.
Also can we get a followup to enforce the use of logical properties in core css?
Committed and pushed 98ccdcd7f7 to 10.1.x and 9ab4dbb25b to 10.0.x. Thanks!
Comment #15
mherchel#3312966: Enforce the use of CSS Logical Properties in core opened as a followup.
Comment #16
mherchelCreated a change record at https://www.drupal.org/node/3312967.
This is still unpublished. Let me know if there's anything else that needs to be done, and feel free to publish it when you feel it's ready.
Comment #17
longwaveThe CR looks perfect to me, so I published it.