Replies: 3 comments
-
|
I'm in favour of this. I know a couple of the semantic names as they translate to pixel sizes now, but I always end up spending a lot of time rooting around in the Source docs to translate font sizes from a design into code, and it's definitely a pain point. |
Beta Was this translation helpful? Give feedback.
-
|
I would definitely prefer to see the actual values being used represented in the names - I've been caught out here a few times |
Beta Was this translation helpful? Give feedback.
-
|
I think this would be a really useful change - I have also found myself having to follow the flow outlined in bullet point 3 above which is quite time-consuming. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The typography API maps font families and font sizes to create more readable semantic names. For example:
can be achieved using:
Problems
There's a handful of problems with semantic font size and line height names:
headline.mediummean? When should we usemediumas opposed tolargeorsmall? The API doesn't provide enough context for the relative size names to be meaningful or useful.largeandxlarge, all names abovelargewould need to change.Proposal
Use an API that is closer to the way a designer thinks about typography.
Instead of:
We use:
It's slightly more verbose, but it saves going through the Source documentation every time we need to translate a design into code. We could define types to help with autocompletion.
Happy to hear any thoughts on this 👂
Beta Was this translation helpful? Give feedback.
All reactions