-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix(button): use appropriate tokens for radii in buttons #3197
Conversation
🦋 Changeset detectedLatest commit: 88f8930 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
🚀 Deployed on https://pr-3197--spectrum-css.netlify.app |
e1ba0e6
to
5cc966e
Compare
File metricsSummaryTotal size: 4.31 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailsbutton
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
5cc966e
to
8f31d7e
Compare
✨ We don't have 1:1 value matches between the two token types (hence the usage of calc) but the resulting value should be approximately the same and behave as expected. |
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 think this method, using the calculated value as we're now using in S2, should work just fine. We'll just need to make sure to confirm the VRTs. And adjust the changelog a little (see suggestion).
Some thoughts that I wanted to mention, but I don't think are an issue:
--spectrum-button-height
not defined by default without a size, but this does not seem to be an issue since medium appears to require the medium class (and seems to be that way in web components as well); this component hasn't received the medium as default reorganization that other components have gotten yet, so the button without the medium class is missing a lot and isn't fully formed anyway.- Since there's a
calc
, I know when this rebases with foundations we'll need to move this property to a different location. But I think it's okay where it is now.
"@spectrum-css/button": minor | ||
--- | ||
|
||
Replaces all of occurrences of --spectrum-component-pill-edge-to-text-_ (intended to be used as padding) in the button component with the appropriate corner-radius-_ tokens. |
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.
Replaces all of occurrences of --spectrum-component-pill-edge-to-text-_ (intended to be used as padding) in the button component with the appropriate corner-radius-_ tokens. | |
Replaces the use of `--spectrum-component-pill-edge-to-text-*` tokens within the `border-radius` of the button component, as those tokens are intended to be used as padding. The border radius is now a calculated value, using half of `--spectrum-button-height`. |
c9f311e
to
88f8930
Compare
Description
Replaces all of occurrences of
--spectrum-component-pill-edge-to-text-*
(intended to be used as padding) in the button component with the appropriatecorner-radius-*
tokens.How and where has this been tested?
Verified locally in Storybook.
Validation steps
button
component.border-radius
regressions.Regression testing
Validate:
Screenshots
To-do list