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.

Issue fork drupal-3312481

Command icon 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:

Comments

mherchel created an issue. See original summary.

mherchel’s picture

Issue summary: View changes
Status: Active » Needs review

Changes made. Lets see if tests pass :)

longwave’s picture

86 files +875 -3764
Nice 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?

mherchel’s picture

Pretty much yes! There are some places where we still need to use the dir attribute, for example with something like transform: translateX(50px) etc. But those are few!

longwave’s picture

Does this need manual testing, or can we trust that browserslist and caniuse-lite are correct? The code changes look fine, as it is just a dependency update and a CSS rebuild.

mherchel’s picture

I 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.

longwave’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new55.38 KB
new8.57 KB
new184.66 KB

DId 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.

longwave’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
mherchel’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

Just brought it up to date. Thanks!

longwave’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Version: 10.1.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: +10.0.0 release highlights, +Needs change record, +Needs followup

I 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!

  • alexpott committed 98ccdcd on 10.1.x
    Issue #3312481 by mherchel, longwave: Update core's browserlist
    

  • alexpott committed 9ab4dbb on 10.0.x
    Issue #3312481 by mherchel, longwave: Update core's browserlist
    
    (cherry...
mherchel’s picture

mherchel’s picture

Created 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.

longwave’s picture

The CR looks perfect to me, so I published it.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.