fix(typography): apply typography.sizes.base to the root font size - #3331
fix(typography): apply typography.sizes.base to the root font size#3331Vidminas wants to merge 1 commit into
Conversation
The typography partial emits `--hb-font-size-base` from `typography.sizes.base`,
but no CSS consumed it, so the config option had no effect (a dead knob).
Consume it on the root element: `html { font-size: var(--hb-font-size-base,
1rem) }`. On the root element `rem` resolves to the initial font-size, so the
1rem default respects the user's browser preference and unset configs render
exactly as before; setting a value now scales the whole rem-based type scale.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
β Deploy Preview for academic-demo canceled.
|
|
Wow, your first PR! Welcome to the community! π Thank you for this contribution to open source and open research. It makes a huge impact for the thousands of innovators building with Hugo Blox. If you're wondering about next steps, please read our Contributor Guide for coding standards, how to run the project locally, and how to get help. We hope this is just the start of your journey with us. Let's build the future together! Join us on Discord to connect with the team and community. Awesome work, we'll take a look soon! β¨ |
|
This PR is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help. If you feel that the PR is still relevant in the latest release, consider making the PR easier to review and finding developers to help review the PR. Please be mindful that although we encourage PRs, we cannot expand the scope of the project in every possible direction. There will be requests that don't make the roadmap. This PR will automatically close soon if no further activity occurs. Thank you for your contributions. |
|
This is still relevant, keep open ^ |
The typography partial emits
--hb-font-size-basefromtypography.sizes.base, but no CSS consumed it, so the config option had no effect.π What type of change is this?
π― What is the purpose of this change?
typography.sizes.baseis a dead config knob: the typography partial emits it as the customproperty
--hb-font-size-base(functions/typography.html), andlayout-utilities.cssevendocuments it, but no CSS ever consumes it, so setting it does nothing.
Fix. Consume it on the root element in
framework/base.css:html { font-size: var(--hb-font-size-base, 1rem); }. On the root elementremresolves to theinitial font-size, so the
1remdefault respects the user's browser preference and any site thatdoesn't set the knob renders exactly as before. Setting it now scales the whole rem-based type
scale as intended.
Verified on the
academic-cvstarter: withtypography.sizes.base: "20px", the built page emits--hb-font-size-base: 20pxand the bundled_entry.csshtmlrule readsfont-size: var(--hb-font-size-base, 1rem); with the knob unset it falls back to1rem.πΈ Screenshots or Screencast (if applicable)
n/a β behaviour is only observable when the knob is set (root font-size scales).
βΉοΈ Documentation Check
(The setting is already documented; this simply makes it functional.)
π Contributor Agreement
Thank you for your contribution!