-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Card: adjust border radius size #40032
Conversation
Size Change: +8 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
Thank you for your review, @jasmussen ! The problem related to the Card content's "cutting" into the border (specifically for the Global Styles sidebar's preview box) should have been solved in #39980. With the changes from this PR applied, I can't reproduce the issue that you're describing (I tried on both my local machine and on gutenberg.run). Here are a few screenshots of what I see:
|
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.
Happy to land this as is! We can always revisit if the issue resurfaces. Thanks!
What?
Adjust the size of the
Card
's border radius, so that the rendered border gets a radius of2px
Why?
Since
Card
renders its border via thebox-shadow
prop instead of theborder
prop, in order to render the expected border radius, the actual value passed via CSS needs to be1px
smaller than the target radius.See #39980 (comment) for more context
How?
Subtract
1px
from the value used as theborder-radius
.Testing Instructions
Make sure the
Card
renders as expected in Storybook and in the Editor (for example, when used in the Global Styles sidebar for the styles preview box). In particular, make sure that the effective border radius rendered on screen is2px
, matching the rounded corners of the other components.Screenshots or screencast