feat: implement ActionButton core tokens#1430
Conversation
BREAKING CHANGE: .spectrum-ActionButton-icon is now required
they now live in components/coretokens/custom.css
7646821 to
3be0152
Compare
|
won't this break High Contrast mode? |
|
@jnurthen yes, it will have to be re-implemented with the new approach. I'll take a stab at doing so in this PR. |
I have a draft PR (#1431) with a bunch of high contrast changes including some for actionbutton which are much better than the original WHCM changes. Would be a better starting point to re-implement than the original version. |
|
@jnurthen ok, I will pull changes from your draft PR. I already fixed it up with the existing WHCM, just one thing I had a Q about. |
|
@lazd We should also validate whether core tokens will resolve adobe/spectrum-web-components#2229 |
|
Oh, yes please 🙏🏼 I think this could be achieved by not actually applying color to the icon content by default and instead using |
Westbrook
left a comment
There was a problem hiding this comment.
Highly yak shaving, but possible community alignment questions.
- Do we like
custombeing the "public" API as opposed to the Spectrum brand? - Is there be benefit from leveraging the
_syntax to imply privacy of the defaults? I've seen a couple of projects pick up this pattern, but not sure it's a "best practice" by any means.
background-color: var(
--_highcontrast-actionbutton-background-color-default, /* WHCM is "private" */
var(--spectrum-actionbutton-background-color-default), /* public API is Spectrum branded */
var(--_actionbutton-background-color-default) /* default is "private" and unbranded */
);
Separately, we should make sure that the highcontrast usage gets into the core tokens API so that it easy to mechanically generate https://css-tricks.com/using-property-for-css-custom-properties/ so we can animate on these things if the need/x-browser support arises.
I haven't vetted the naming convention with the rest of the team yet, but I can explain why I chose I'm open to changing it though!
Hmm, we could consider it, though it "undocumented" generally means the same thing, and we'll only be documenting the
I would like to see a |
|
I don't have a strong preference between the two suggested prefixes ( IMO the word Curious to hear what others think, and happy to side with the majority opinion or a better recommendation. |
|
I'm inclined to stick with the naming convention as-is, it feels the most true to what it's doing and most readable. @GarthDB, can you weigh in? |
a9bf4a3 to
642f528
Compare
|
@lazd I think we covered it in meetings. Custom isn't my favorite, but it's functional and I don't have a better recommendation. |
re-organize vars, use alias for static focus-ring color, remove duplication
|
Design verification was completed, @badimon and friends actually went through line-by-line and looked at the custom property definition and were able to use that as the data for their verification. This PR is ready to get merged! |
BREAKING CHANGE: .spectrum-ActionButton-icon is now required on icons BREAKING CHANGE: .spectrum--express must be added to support Express ActionButton
BREAKING CHANGE: .spectrum-ActionButton-icon is now required on icons BREAKING CHANGE: .spectrum--express must be added to support Express ActionButton
BREAKING CHANGE: .spectrum-ActionButton-icon is now required on icons BREAKING CHANGE: .spectrum--express must be added to support Express ActionButton

Description
This implements core tokens in ActionButton. This is a BREAKING CHANGE because a class is now required on ActionButton's icon.
To-do list
[ ] Explore adding a copy Button for custom property API