Replies: 5 comments
-
I don't get your question... I don't see something wrong with Dawn's codebase... 👀 |
Beta Was this translation helpful? Give feedback.
-
@galenking Since the browser's base font size is typically 16, multiplying that by 0.625 gives you a base font size of 10, which is a nice round number to base all other font sizes off of using rems. I assume that's why they did this. |
Beta Was this translation helpful? Give feedback.
-
If I'm not wrong, Dawn has this relationship for the base font-size, 1rem = 10px. So, 1px = 0.1rem. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
The deep "why" is not actually formally documented as 62.5% for the html font-size rule is from the inital commit going through the blame history. The newcalculation is explained in the blame's commit's pull request #688 (Add typography heading and body font size scale setting #688)
Not a perfect explanation since it's not clear WHAT&WHY Yes, typographic and other design guideline/opinions should be publicly declared and documented outside of an issue/pull-request and private figma files A baseline for comparison of what |
Beta Was this translation helpful? Give feedback.
-
Just in case part of the question is about the source location of that rule in theme.liquid: Should typography, colors, etc be their own files (asset or snippet)? Especially now with the inline_asset filter finally being a reality https://shopify.dev/docs/api/liquid/filters/inline_asset_content |
Beta Was this translation helpful? Give feedback.
-
Is there anyone on the Shopify Dawn team who was part of the original typography design for Dawn? Is it just me or is the CSS unusually complex for the typography?
For example, why is the base font size specified with a calculation in the head of theme.liquid? https://github.com/Shopify/dawn/blame/afa073abd018f78e1b9883dd1fba1b5364b1e28a/layout/theme.liquid#L229
Is that because it needed to pull from the theme settings? Surely there’s a more elegant way to do this.
Beta Was this translation helpful? Give feedback.
All reactions