-
Notifications
You must be signed in to change notification settings - Fork 239
(3/5) Feature: Update component styles with token(), new guidelines #5942
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
base: seckles/feature/context-toolbar
Are you sure you want to change the base?
(3/5) Feature: Update component styles with token(), new guidelines #5942
Conversation
|
cdransf
left a comment
There was a problem hiding this 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']) { |
There was a problem hiding this comment.
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.
Description
This is PR number 3 of 5
Updates remaining 2nd-gen component styles per new guidance and features
Motivation and context
token()feature provided in (1/5) Feature: Token Processing and token() #5940swc, complete docs #5944)Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases