In #3312481: Update core's browserlist we updated the browserlist database which determines what CSS properties PostCSS will transpile. With this update, Drupal core is not transpiling any logical properties.
However, there are certain properties which our supported browsers do not support, including flow relative properties such as `float: inline-end`, and `clear: inline-start`. You can see current browser support for these properties at https://caniuse.com/mdn-css_properties_clear_flow_relative_values.
The Chromium issue to implement this is at https://bugs.chromium.org/p/chromium/issues/detail?id=850004. I can’t find the webkit issue.
I created an upstream bug for PostCSS Logical at https://github.com/csstools/postcss-plugins/issues/632
Edit after the fact
This will likely never be fixed within PostCSS. I created an issue upstream at https://github.com/csstools/postcss-plugins/issues/958, where I discovered that PostCSS Logical doesn't compile to both RTL and LTR anymore. You have to pick one or the other (this is new to version 8 of PostCSS Logical). This doesn't affect Drupal except within the float
and clear
properties. We'll have to manually add the dir
attributes when using those.
Task
It'd be nice if either 1) this could be fixed upstream or 2) we could set PostCSS Logical to always transpile these values. But, for now, I think we need to change the float
values to use non-logical CSS properties. This should be an easy task, as they're only used in a few places within Olivero.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3313146_5.patch | 12.01 KB | andy-blum |
|
Comments
Comment #2
mherchelComment #3
mherchelComment #4
mherchelPatch posted. This affects both the Olivero theme and Workspaces module.
Comment #5
andy-blumCode changes look good, but the CSS failed linting due some indentation problems. Fixed those and adding a new patch.
Comment #6
ckrinaI just tested it and LGTM!
Comment #7
alexpottThis makes me sad as logical properties are so nice... but hey ho...
Committed and pushed 33c59bbc68 to 10.1.x and 7e8c3b8bb1 to 10.0.x. Thanks!
Comment #10
Wim LeersShouldn't this update https://www.drupal.org/node/3312967? 🤔
Comment #11
mherchelYou're right. Change record is updated!
Comment #12
mherchelApplying credit to @ckrina who reviewed the patch.
Comment #14
mherchelAdding note to IS about upstream issue:
Comment #15
mherchelNote here for posterity: Browsers now support flow relative logical properties. See https://caniuse.com/mdn-css_properties_clear_flow_relative_values