Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add refresh fonts #1030

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

maureenlholland
Copy link
Collaborator

@maureenlholland maureenlholland commented Mar 12, 2025

Description

This approach is the breaking change. It removes Zilla Slab token, font files, and mixin.

Fallback font adjustments used this tool: https://highperformancewebfonts.com/tools/fafofal/

Mozilla heading styles need

    font-variant-ligatures: none;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.1;

Mozilla body styles need

    font-variant-ligatures: none;
    line-height: 1.2;
  • I have documented this change in the design system.
  • I have recorded this change in CHANGELOG.md.

Related PR

Needs new Protocol Tokens package: mozilla/protocol-tokens#114 [WIP]

Issue

#1029

Testing

Run locally and check font updates in http://localhost:3000/docs/fundamentals/typography

Build package locally and update local package in Bedrock: mozilla/bedrock#16083
(After local install on Bedrock, I was manually moving the mozilla-protocol/core/package/protocol folder up to be directly inside core folder, there's probably a better way to do that)

Check Mozilla branded pages have correct font styling

Check Firefox branded pages have correct font styling

@maureenlholland
Copy link
Collaborator Author

CI will be broken until the new tokens are available from protocol-tokens package

descent-override: 25.6%;
line-gap-override: 0%;
size-adjust: 120.76%;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unadjusted
unadjusted-text

Adjusted
adjusted-text

descent-override: 30%;
line-gap-override: 0%;
size-adjust: 115.96%;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unadjusted
unadjusted-headline

Adjusted
adjusted-headline

@@ -23,6 +23,9 @@ h6 {

@supports (--css: variables) {
font-family: var(--title-font-family);
font-variant-ligatures: var(--title-font-ligatures);
font-weight: var(--title-font-weight);
Copy link
Collaborator Author

@maureenlholland maureenlholland Mar 18, 2025

Choose a reason for hiding this comment

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

This is problematic, it overrides the 700 font weight and makes the inherited 500 weight take effect. Needs a default fallback value or a Firefox-themed variable value

(pr)
Screenshot 2025-03-18 at 6 52 38 PM

(prod)
Screenshot 2025-03-18 at 6 50 05 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

default fallback value works as expected

default-fallback

- [breaking] Zilla Slab font is removed for Mozilla rebrand fonts
- [breaking] the font-mozilla mixin is removed in favor of more
explicit font-mozilla-text and font-mozilla-headline
This approach ensures we have a common default (bold) across all
themes that don't choose to set a custom font-weight
@maureenlholland maureenlholland marked this pull request as ready for review March 19, 2025 10:44
@maureenlholland
Copy link
Collaborator Author

maureenlholland commented Mar 19, 2025

This is ready for local code review and can be merged when updated with new tokens from Protocol Tokens PR: mozilla/protocol-tokens#114

DO NOT MERGE until tokens package is released and updated

@maureenlholland maureenlholland added Do Not Merge ⚠️ Do Not Merge Review: XS Code review time: 30 mins or less Needs:Review 👋 Ready for Developer Review labels Mar 19, 2025
@@ -23,6 +24,9 @@ h6 {

@supports (--css: variables) {
font-family: var(--title-font-family);
font-variant-ligatures: var(--title-font-ligatures);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mozilla/bedrock#15790 (comment)

just noticed this comment on another PR, maybe best to use none as default here as well


* [Download from Github](https://github.com/mozilla/zilla-slab/releases/latest)
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a repo https://github.com/mozilla/mozilla-type-family — however it still only houses pre-release versions.

Q: Is there any chance a prod-level asset will be provided at some point, perhaps adding more i18n support et al.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge ⚠️ Do Not Merge Needs:Review 👋 Ready for Developer Review Review: XS Code review time: 30 mins or less
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Refresh fonts
3 participants