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

WIP: Web typography presets #1211

Closed
wants to merge 8 commits into from
Closed

WIP: Web typography presets #1211

wants to merge 8 commits into from

Conversation

jamesmockett
Copy link
Contributor

@jamesmockett jamesmockett commented Feb 16, 2024

What are you changing?

Implements updated typography presets for web. This is a draft and only includes presets for headline styles.

Each preset is defined as an individual token:

"headlineMedIta24": {
  "$value": {
    "fontFamily": "{typography.fontFamily.headline}",
    "fontSize": "{typography.fontSize.24}",
    "lineHeight": "{typography.lineHeight.tight}",
    "fontWeight": "{typography.fontWeight.medium}",
    "fontStyle": "italic"
  }
}

These can then be used via the typography export:

const headline = css`
  ${typography.headlineMedIta24};
`;

Each preset encapsulates a complete typographic style so there are no options.

Copy link

changeset-bot bot commented Feb 16, 2024

⚠️ No Changeset found

Latest commit: e43e354

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Tip

Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.

@github-actions github-actions bot added the 📦 npm Affects a @guardian package on NPM label Feb 16, 2024
@jamesmockett jamesmockett added 🙅 Do not merge 🎨 Design System and removed 📦 npm Affects a @guardian package on NPM labels Feb 16, 2024
@jamesmockett jamesmockett self-assigned this Feb 16, 2024
@github-actions github-actions bot added the 📦 npm Affects a @guardian package on NPM label Feb 20, 2024
@jamesmockett
Copy link
Contributor Author

Closing as this has served its purpose of being a place to try out ideas and get feedback. Now we've established an approach to implementing the new presets this will be done in a series of smaller, incremental PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Design System 🙅 Do not merge 📦 npm Affects a @guardian package on NPM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant