[wp-trac] [WordPress Trac] #52564: Twenty Twenty-One has unit-less CSS variable unfit for calc() (was: Twenty Twenty has unit-less CSS variable unfit for calc())
WordPress Trac
noreply at wordpress.org
Thu Feb 18 16:33:48 UTC 2021
#52564: Twenty Twenty-One has unit-less CSS variable unfit for calc()
---------------------------+---------------------
Reporter: nico23 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.7
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: css
---------------------------+---------------------
Changes (by ryelle):
* keywords: => needs-patch
* milestone: Awaiting Review => 5.7
Comment:
How interesting! A unitless value is allowed in calc for multiplication
and division, but [https://www.w3.org/TR/css-values-4/#ref-for-typedef-
number-token%E2%91%A4 not in addition/subtraction]. Always something new
to learn with CSS :)
The value is 0 by default for logged out users who don't have an admin
bar, so you don't need to pass through a default in `var`. You're right
that the usage in the theme doesn't work, but it doesn't actually cause a
bug. That said, we **should** fix it - the `:root` value should get
changed to `0px` so all instances of this variable use the same unit.
Targeting this to 5.7 since it would be a quick fix if someone can write a
patch soon.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52564#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list