[wp-trac] [WordPress Trac] #52623: Proposal: Add CSS variable for admin-bar height to core.
WordPress Trac
noreply at wordpress.org
Mon Mar 1 22:53:03 UTC 2021
#52623: Proposal: Add CSS variable for admin-bar height to core.
-------------------------+-----------------------
Reporter: nico23 | Owner: ryelle
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.8
Component: Themes | Version: trunk
Severity: minor | Resolution:
Keywords: has-patch | Focuses: ui, css
-------------------------+-----------------------
Changes (by ryelle):
* owner: (none) => ryelle
* status: new => assigned
* milestone: Awaiting Review => 5.8
Comment:
Thanks for kicking this off with your PR @nico23!
There's some ongoing [https://make.wordpress.org/core/2021/01/29
/introducing-css-custom-properties/ custom property discussion] regarding
colors, but I think this would be a good, self-contained use case to get
support for custom properties into core.
We do support IE11, so in addition to adding the variable, we'll want to
add a **PostCSS plugin for fallbacks**. There are two I know of, and both
have drawbacks.
- `postcss-custom-properties` is one option, but it doesn't support
properties that are updated in media queries.
- `postcss-css-variables` is another - this one does support media
queries, but it also has a bug where it generates duplicate styles, so
we'd need to also add `postcss-discard-duplicates`. This is the approached
[https://core.trac.wordpress.org/browser/trunk/src/wp-
content/themes/twentytwentyone/postcss.config.js that was used in Twenty
Twenty-One].
- Another suggestion?
It's possible we'll drop support for IE11 (see #49696), but the timeline
there is up in the air, so it's best to proceed assuming we need to
support it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52623#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list