[wp-trac] [WordPress Trac] #52564: Twenty Twenty has unit-less CSS variable unfit for calc()

WordPress Trac noreply at wordpress.org
Thu Feb 18 15:34:33 UTC 2021


#52564: Twenty Twenty has unit-less CSS variable unfit for calc()
---------------------------+------------------------------
 Reporter:  nico23         |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  css
---------------------------+------------------------------

Comment (by joyously):

 CSS variables work best with no units, because you can't manipulate them
 like strings. And because of that, it's best if they are percentages.
 But you can use a unitless variable in calc(), by multiplying by the unit,
 like `1px` or `1rem` or `1%`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52564#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list