Skip to content

Conversation

@5t3ph
Copy link
Contributor

@5t3ph 5t3ph commented Dec 16, 2025

Description

This is PR number 3 of 5

Updates remaining 2nd-gen component styles per new guidance and features

Motivation and context

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Validated on all supported browsers

Manual review test cases

  • visuals match S2 Token Specs
    • note: this update did not change any previously applied tokens, so you do not need to do a 1:1 comparison, just use the specs for a visual comparison
  • component responds to changing theme and scale contexts (via toolbar menus)
  • critical component parts are visible in forced-colors mode

@5t3ph 5t3ph added the Feature New feature or request label Dec 16, 2025
@5t3ph 5t3ph requested a review from a team as a code owner December 16, 2025 16:24
@5t3ph 5t3ph added CSS Processing 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. labels Dec 16, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2025

⚠️ No Changeset found

Latest commit: cbe7ab9

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

@5t3ph 5t3ph changed the title Seckles/feature/component styles (3/5) Feature: Update component styles with token(), new guidelines Dec 16, 2025
Copy link
Member

@cdransf cdransf left a comment

Choose a reason for hiding this comment

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

&.spectrum-Badge--notice {
--swc-badge-border-color: token('notice-visual-color');
}
:host([outline][variant='notice']) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this isn't necessarily a new way to write selectors in SWC, but seeing these side by side it feels really clean to read CSS selectors with the attributes vs. nesting & BEM class selectors. 👏

However, we're still using BEM selectors in a lot of places (like .spectrum-Badge--subtle and nested in that, &.spectrum-Badge--gray) and I'm not quite comprehending the logic of when one can be used vs. the other.

Is the thought that we can eventually remove the classMap()s in the template, or do those stick around? And would we definitely keep the .spectrum-Badge class? (I see that the code snippets in the RFC still have them.)

Note: I did peek at the 5th PR (#5944) and I see that the selectors do change a bit more, so maybe my questions here are a bit premature and I should wait until I'm reviewing that PR to try to make sense of patterns for writing CSS.

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

Labels

2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. CSS Processing Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants