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 new units to spacing scale #897

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Add new units to spacing scale #897

merged 2 commits into from
Nov 10, 2023

Conversation

jamesmockett
Copy link
Contributor

What are you changing?

Adds new spacing units to maintain parity with Figma.

Why?

The spacing scale has diverged from what the design team are working with in Figma so engineers are being given designs which use spacing units not available in source-foundations, forcing them to hardcode spacing values rather than use the system.

@jamesmockett jamesmockett requested review from a team as code owners November 10, 2023 15:24
Copy link

changeset-bot bot commented Nov 10, 2023

🦋 Changeset detected

Latest commit: 3965eba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/source-foundations Minor

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added the 📦 npm Affects a @guardian package on NPM label Nov 10, 2023
@jamesmockett jamesmockett linked an issue Nov 10, 2023 that may be closed by this pull request
@jamesmockett jamesmockett added the run_chromatic Runs chromatic when label is applied label Nov 10, 2023
@jamesmockett jamesmockett merged commit 1170784 into main Nov 10, 2023
23 checks passed
@jamesmockett jamesmockett deleted the jm/add-spacing-units branch November 10, 2023 16:20
jamesmockett added a commit that referenced this pull request May 31, 2024
## What are you changing?

- Use the common `Space` type in components that accept spacing values
as props.
- Fixes a bug where spacing styles are not applied if `space.0` is used
due to `0` being falsy.
- Update `Stack` stories to better show how spacing is applied.
- Expands `Inline` and `Stack` stories to include examples of _all_
spacing values.

<img width="654" alt="Screenshot 2024-05-08 at 15 00 27"
src="https://github.com/guardian/csnx/assets/1166188/658fe4a8-ed26-4d8b-a037-84927618290e">

## Why?

- It removes a small amount of duplication and avoids having to update
spacing values in multiple places. [New spacing values were added last
year](#897), but some components
still lack support for these as their types were not updated at the same
time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 npm Affects a @guardian package on NPM run_chromatic Runs chromatic when label is applied
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Source spacing tokens
2 participants