facebookincubator / infima

A UI framework that provides websites with the minimal CSS and JS needed to get started with building a modern responsive beautiful website
https://infima.dev
MIT License
413 stars 55 forks source link

Variables with zero-value should include unit #274

Open fflaten opened 2 years ago

fflaten commented 2 years ago

Zero-valued variables should always include a unit to be compatible with min/max/calc functions. Ex. --ifm-footer-padding-horizontal: 0 set in a default media-query will not work atm. Overriding to 0px fixes it.

slorber commented 2 years ago

seems correct: no unit seems to make it hard to use in CSS functions.

We could always include a unit for consistency.

Also worth taking a look at the direction of CSS, maybe this will be easier in the future?

For example https://www.bram.us/2022/07/08/the-future-of-css-variable-units-powered-by-custom-properties/