Skip to content

fix(typography): apply typography.sizes.base to the root font size - #3331

Open
Vidminas wants to merge 1 commit into
HugoBlox:mainfrom
Vidminas:fix/font-size-base-unused
Open

fix(typography): apply typography.sizes.base to the root font size#3331
Vidminas wants to merge 1 commit into
HugoBlox:mainfrom
Vidminas:fix/font-size-base-unused

Conversation

@Vidminas

Copy link
Copy Markdown

The typography partial emits --hb-font-size-base from typography.sizes.base, but no CSS consumed it, so the config option had no effect.

πŸš€ What type of change is this?

  • πŸ› Bug fix (A non-breaking change that fixes an issue)
  • ✨ New feature (A non-breaking change that adds functionality)
  • πŸ’… Style change (A change that only affects formatting, visuals, or styling)
  • πŸ“š Documentation update (Changes to documentation only)
  • 🧹 Refactor or chore (A code change that neither fixes a bug nor adds a feature)
  • πŸ’₯ Breaking change (A fix or feature that would cause existing functionality to not work as expected)

🎯 What is the purpose of this change?

typography.sizes.base is a dead config knob: the typography partial emits it as the custom
property --hb-font-size-base (functions/typography.html), and layout-utilities.css even
documents 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 element rem resolves to the
initial font-size, so the 1rem default respects the user's browser preference and any site that
doesn't set the knob renders exactly as before. Setting it now scales the whole rem-based type
scale as intended.

Verified on the academic-cv starter: with typography.sizes.base: "20px", the built page emits
--hb-font-size-base: 20px and the bundled _entry.css html rule reads
font-size: var(--hb-font-size-base, 1rem); with the knob unset it falls back to 1rem.


πŸ“Έ Screenshots or Screencast (if applicable)

n/a β€” behaviour is only observable when the knob is set (root font-size scales).


ℹ️ Documentation Check

  • No, this change does not require a documentation update.
  • Yes, I have updated the documentation accordingly (or will in a follow-up PR).

(The setting is already documented; this simply makes it functional.)


πŸ“œ Contributor Agreement

Thank you for your contribution!

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>
@Vidminas
Vidminas requested a review from gcushen as a code owner July 10, 2026 07:39
@netlify

netlify Bot commented Jul 10, 2026

Copy link
Copy Markdown

βœ… Deploy Preview for academic-demo canceled.

Name Link
πŸ”¨ Latest commit 76d7267
πŸ” Latest deploy log https://app.netlify.com/projects/academic-demo/deploys/6a50a1c97ba6c4000857c07b

@github-actions

Copy link
Copy Markdown
Contributor

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! ✨

@github-actions

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the stale label Aug 10, 2026
@Vidminas

Copy link
Copy Markdown
Author

This is still relevant, keep open ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant