Warn on unitless zero values in theme.json #57641
Labels
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
When themes declare a global padding (styles.spacing.padding) in theme.json as 0 without a unit, it results in a display issue in the overlay menu on small screen resolutions.
There's some work done in #53725 to better address padding, but it doesn't solve for the "unitless zero" case. This isn't something that can be solved easily, if at all, the
calc
css function is typed and so needs the type passing in.Given the issue can't be addressed in code, it would be good to help theme authors be more aware of this problem
What is your proposed solution?
When theme.json is parsed - a warning/error could be emitted when a unit-less value is encountered in global padding (and possibly other places).
The text was updated successfully, but these errors were encountered: