Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
reading : https://www.joshwcomeau.com/css/surprising-truth-about-pixels-and-accessibility/
When values and units are fully determined by designers and/or design tools we take away control from developers.
In some cases this is fine as developers (will soon) have tools to manipulate values in native CSS. (e.g.
calc
or relative color syntax).But some units are different.
px
vs.rem
is meaningful and they aren't equivalent.Developers should have the freedom and tools to convert values from design tokens to the correct unit for each rule and property.
Without a conversion mechanic designers and developers will have to declare each value twice, once for each unit.
Alternatively designs and developers do nothing and settle on inaccessible results :/
I hope this won't explode later into a lot of conversions.
But I think it will be fine as I can only think of
rem
vs.px
having this complexity.If there are more units please let me know.