Skip to content

Fix Hugo theme tokens and typography for #8562 - #8596

Merged
sarajkrishnasingh merged 2 commits into
layer5io:hugofrom
Aadiverse07:feature/8562-sistent-tokens
Dec 1, 2026
Merged

sarajkrishnasingh merged 2 commits into
layer5io:hugofrom
Aadiverse07:feature/8562-sistent-tokens

Conversation

@Aadiverse07

@Aadiverse07 Aadiverse07 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Layer5 Issue #8562: Sistent Design Tokens and Site Fonts

Summary

This PR refines the Hugo site's CSS theme foundation to align its light and dark presentation with the Sistent design system. It addresses Issue #8562.

Problem

Dark-theme button variants used hardcoded #04201b text color on Keppel (#00D3A9) background (2.64:1), failing WCAG AA 1.4.3. The ghost-button hover text color needed restoration to preserve its intended appearance. Hardcoded hex values in token-definition blocks and terminal UI required mapping to Sistent design tokens.

Changes

  • Aligns the Hugo site's light and dark theme styling with the design tokens documented in hugo/DESIGN.md.
  • Organizes palette, surface, border, and typography values around the approved theme-token definitions.
  • Updates component styling to use the appropriate theme tokens instead of independent hardcoded color values.
  • Corrects dark-theme button, selection, link, and text styling to improve readability and contrast.
  • Refines terminal styling through the approved terminal color tokens.
  • Restores the ghost-button hover text color to preserve its intended appearance.

Design and accessibility

  • Preserves separate light- and dark-theme token definitions.
  • Keeps remaining hexadecimal values within the permitted token-definition blocks.
  • Applies relevant WCAG 2.1 AA contrast requirements to text and applicable UI components.
  • Retains the existing Hugo typography and font configuration; this PR does not introduce the existing @font-face declarations or add font files. Existing font work is from PR [header] feat: Hugo desktop header and mega-menu parity (#8564) #8585.

Validation

  • make build — 120 pages generated successfully.
  • make test — 132 pass, 1 pre-existing fail (migrate-mdx: <Link>: non-literal expression for "to" in programs/hack/index.mdx), 1 skipped. The migrate-mdx failure is pre-existing and consistent across all investigations (Linux: 134/134 per manifest; macOS: 132 pass/1 fail/1 skipped). Unrelated to [Hugo] Phase 2 · Sistent design tokens and site fonts → CSS custom properties #8562 design-token or font work.
  • CSS audit — remaining hexadecimal values are confined to the permitted token-definition blocks.
  • Layout audit — no unintended hardcoded hexadecimal colors in hugo/layouts/.
  • Ghost-button hover — color: var(--color-text) restored in .btn-ghost:hover, .btn--ghost:hover rule.

Scope

  • Updates the approved theme-token and contrast implementation in hugo/assets/css/main.css.
  • Restores the reviewer-requested ghost-button hover color.
  • Does not introduce unrelated repository cleanup.
  • Does not duplicate existing font declarations or font files.

References

Signed-off-by: Aadi <devrajsingh883@gmail.com>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65da5cdd-2ee6-415e-8e60-01fdb7308e09

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Hugo preview removed because the pull request was closed.

@sarajkrishnasingh sarajkrishnasingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, focused follow-up to #8585 for #8562. The contrast fixes are exactly right: dark-theme buttons on Keppel were failing WCAG AA at 2.64:1, and swapping the seven #04201b literals for var(--on-accent), plus the dark-theme :where() overrides for .btn and .btn-default, closes that gap cleanly. The .btn-invert change from --color-primary to --color-active is the right call too: in dark theme --color-primary is white, so Keppel text on a white background was failing, and the dark --color-active background fixes it. Tokenizing the four terminal hex values without changing their values keeps the terminal looking identical while moving everything behind custom properties. I verified --color-link and --on-accent are defined in both themes, so the --color-brand to --color-link swaps in the FAQ, position-apply, and nav links are safe.

Two things to check before merge. First, I left one inline suggestion on the ghost button hover: the rule lost its color line, so a ghost button on hover now takes the generic white text on --color-active. If that was not intentional, the suggestion restores it. Second, the PR description says it adds the 12 @font-face rules, but those are already on the hugo branch from #8585; this PR's actual change is the token and contrast work, so a quick edit to the description would help reviewers read the diff as it is. The font files do live in root static/fonts/ on this branch, so please confirm in the preview that /fonts/qanelas-soft/... resolves once published, since that depends on the Hugo mount configuration.

Checks are green across the board: DCO, triage, build, and verify-urls all successful. The one pre-existing migrate-mdx failure in make test is unrelated to this CSS-only change. No test coverage is needed for a website styling change.

Comment thread hugo/assets/css/main.css Resolved
Signed-off-by: Aadi <devrajsingh883@gmail.com>
@Aadiverse07

Copy link
Copy Markdown
Contributor Author

Thank you again @sarajkrishnasingh for your valuable feedback! I've implemented the suggested changes:

  • Restored color: var(--color-text); in the ghost-button hover rule to preserve the intended text appearance.
  • Updated the PR description to accurately reflect the scope of this PR and clarify that the existing font declarations were introduced in [header] feat: Hugo desktop header and mega-menu parity (#8564) #8585.
  • Verified the changes and confirmed that all GitHub checks are passing.

Could you please take another look and re-review the updated PR when you get a chance?
Thanks again for your guidance !

@sarajkrishnasingh sarajkrishnasingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround, Aadi. Both points from my last review are addressed: the ghost-button hover color is restored exactly as suggested (color: var(--color-text) in commit 12c4ec9), and the description now correctly credits the font work to #8585 instead of claiming it here. I also checked the preview myself and /fonts/qanelas-soft/QanelasSoftBold.otf resolves with a 200, so the font mount is fine.

The contrast fixes still read well, the thread is resolved, and checks are green on the new head (build, verify-urls, triage, DCO). Approving and merging.

@sarajkrishnasingh
sarajkrishnasingh merged commit 5521830 into layer5io:hugo Dec 1, 2026
6 checks passed
@Aadiverse07

Copy link
Copy Markdown
Contributor Author

A big thank you to @sarajkrishnasingh for taking the time to review our contribution and providing such thoughtful, constructive feedback. Your suggestions helped us improve the final implementation.
Glad to share that PR #8596 has now been approved and successfully merged into hugo! Really appreciate your guidance and support throughout the process.
Looking forward to contributing more to Layer5! 🤍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants