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

feat: add grid gap property for more flexibility #732

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

melaniebmn
Copy link
Collaborator

@melaniebmn melaniebmn commented Jan 14, 2025

Summary | Résumé

Changes

Adding new gap, gap-tablet, and gap-desktop properties to the grid component that will allow users to change the value of the grid gap depending on the viewport and adhere to the vertical rhythm of the new typography.

The allowed spacing values for each of the new gap properties are:

150 | 175 | 200 | 225 | 250 | 300 | 350 | 400 | 450 | 500 | 550 | 600 | 650 | 700 | 750 | 800

Additionally, I manually updated the grid readme to include all grid props. It was previously only loading the grid-col props. The new readme can be found here.

How to test

The new properties can be tested by adding gap, gap-tablet, or gap-desktop to the grid component with any of the above spacing values. Here is an example that can be used to test:

<gcds-grid
    columns-desktop="1fr 1fr 1fr"
    columns-tablet="1fr 1fr"
    columns="1fr"
    gap="150"
    gap-tablet="350"
    gap-desktop="500"
>
    <p>Content</p>
    <p>Content</p>
    <p>Content</p>
</gcds-grid>

Zenhub ticket

This is the Zenhub ticket for the change.

✅ Token package update required

The token package has been updated to it's latest version 2.1.0.

Copy link
Collaborator

@ethanWallace ethanWallace left a comment

Choose a reason for hiding this comment

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

It's looking good! Can you add the new gap props to storybook?

As for the readme, we may have to split the grid-col component out into it's own directory since the build command will just reset it to the way it was before.

@melaniebmn
Copy link
Collaborator Author

@ethanWallace apologies, the stories completely slipped my mind.

I will separate gcds-grid-col into its own directory in a separate PR.

Copy link
Collaborator

@ethanWallace ethanWallace left a comment

Choose a reason for hiding this comment

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

LGTM!

@melaniebmn melaniebmn merged commit 2af7915 into main Jan 15, 2025
3 checks passed
@melaniebmn melaniebmn deleted the update-allowed-grid-spacing branch January 15, 2025 22:05
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