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(Token): Migrate to CSS modules behind feature flag Pt 2 #5271

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

Conversation

randall-krauskopf
Copy link
Collaborator

@randall-krauskopf randall-krauskopf commented Nov 13, 2024

Related To: https://github.com/github/primer/issues/4367

This PR is part 2 of breaking apart a larger PR into grokkable parts.

Apologies for the larger PR but there was an odd interplay with the specificity across the various components that made it hard to break this PR into smaller chunks

Copy link

changeset-bot bot commented Nov 13, 2024

🦋 Changeset detected

Latest commit: fa175a2

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Nov 13, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5271 November 13, 2024 00:22 Inactive
Copy link
Contributor

github-actions bot commented Nov 13, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 103.79 KB (+0.22% 🔺)
packages/react/dist/browser.umd.js 104.13 KB (+0.24% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-5271 November 13, 2024 00:40 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 13, 2024
packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
padding-left: var(--base-size-4) !important;
}

.AvatarContainer[data-size='small'] {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.AvatarContainer[data-size='small'] {
.AvatarContainer:where([data-size='small']) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @jonrohan, I'll get these changes in. Quick question though, why is :where preferred over the bare attribute selector?

Copy link
Member

Choose a reason for hiding this comment

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

Where will reduce the specificity on the attribute selector and make it easier to override the styles in dotcom. We try and add it whenever the attribute lands on the same dom node where we add the passed in className

packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Show resolved Hide resolved
@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/353365

@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants