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: spacing token classes #99

Merged
merged 3 commits into from
Jan 28, 2025
Merged

feat: spacing token classes #99

merged 3 commits into from
Jan 28, 2025

Conversation

emilyjablonski
Copy link
Contributor

@emilyjablonski emilyjablonski commented Jan 21, 2025

Issue Overview

This PR addresses #100

Description

In the process of uptaking seeds in core, we're having to add classes to module files just to add a single style like a bottom margin. These are the only kinds of styles we're experiencing this with. These new classes use both our semantic and global tokens for seeds spacings.

I don't think we generally want to follow this pattern to avoid where we can the inline messiness we experienced with Tailwind, but I think for now just spacings would be really helpful.

How Can This Be Tested/Reviewed?

I have self-assigned a followup ticket to add this into Zeroheight documentation after merge: #101

Checklist:

  • I have added QA notes to the issue with applicable URLs
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have made corresponding changes to the documentation (TBD!)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have exported any new components
  • My commit message(s) and PR title are polished in the conventional commit format, and any breaking changes are indicated in the message and are well-described

Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for storybook-ui-seeds ready!

Name Link
🔨 Latest commit d625c56
🔍 Latest deploy log https://app.netlify.com/sites/storybook-ui-seeds/deploys/679113c04c990e000936c4a5
😎 Deploy Preview https://deploy-preview-99--storybook-ui-seeds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@jaredcwhite jaredcwhite left a comment

Choose a reason for hiding this comment

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

I think this will be a big help! 👏🏻

I'd love to group chat a bit about what kinds of spacings we want to support. I might suggest we only support logical margins and paddings, and not left/top/right/bottom.

I think we might want gap utilities as well.

I also wonder about things like mbl and if we could try m-bl or even margin-bl…I know it's more verbose but it's also more readable.

I really like https://nordhealth.design/css/#spacing-utilities when it comes to prior art, and that might be a good discussion starting point.

src/global/spacing.scss Outdated Show resolved Hide resolved
@emilyjablonski
Copy link
Contributor Author

emilyjablonski commented Jan 22, 2025

@jaredcwhite That all sounds great - in between this PR and the ticket refining I've been doing, I did come across tickets where we need to support RTL for Arabic, and that might require changing every spacing style we have to the logical versions, like margin-inline-start vs margin-left - which we'd have to do retroactively. I'll go ahead and update the styles here!

@jaredcwhite
Copy link
Collaborator

That all looks good to me!

Any opinion on gap? (that could also just be a later PR too)

@emilyjablonski
Copy link
Contributor Author

@jaredcwhite I would be down for gap! If it's all good, a separate PR is my preference, or as the need comes up in core? Hoping to pull these into the new listing design PR this week :)

@emilyjablonski emilyjablonski merged commit d04e9d7 into main Jan 28, 2025
5 checks passed
Copy link

🎉 This PR is included in version 1.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants