WordPress / wporg-main-2022

A block-based child theme for WordPress.org, plus local environment
64 stars 26 forks source link

Styles: Remove or update workaround for CSS4 selectors #465

Open ryelle opened 1 month ago

ryelle commented 1 month ago

In #111, CSS was added to fix the layout for browsers that don't support :where selectors.

https://github.com/WordPress/wporg-main-2022/blob/baeab7fcf44f9225714c1e94ad5586df3dfdfbb1/source/wp-content/themes/wporg-main-2022/src/style/style.scss#L639-L663

Since then, GB has continued to use :where frequently, though we haven't updated any other CSS, nor have we added this to any of the other child themes. :where has strong support now:

Baseline Widely available This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2021. — MDN

Additionally the styles added by our workaround are impacting other layout options, like aligning content left.

With workaround, centered Without workaround, left
Screen Shot 2024-07-06 at 12 10 48 Screen Shot 2024-07-06 at 12 10 54

I think it would be safe to remove this CSS, though if we need to still support non-:where browsers, we should find a way to update the code (and do we need to add this workaround to other places?)