diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 04858e448da7f..1473cf5f5df40 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -19,6 +19,7 @@ - `Navigator`: warn if a screen's `path` doesn't follow a URL-like scheme ([#65231](https://github.com/WordPress/gutenberg/pull/65231)). - `Modal`: Decrease close button size and remove horizontal offset ([#65131](https://github.com/WordPress/gutenberg/pull/65131)). +- `Card`: Adopt radius scale ([#65053](https://github.com/WordPress/gutenberg/pull/65053)). ### Bug Fixes diff --git a/packages/components/src/card/card/component.tsx b/packages/components/src/card/card/component.tsx index 8fefc33bd4802..e459f9abb9275 100644 --- a/packages/components/src/card/card/component.tsx +++ b/packages/components/src/card/card/component.tsx @@ -34,7 +34,7 @@ function UnconnectedCard( size, ...otherProps } = useCard( props ); - const elevationBorderRadius = isRounded ? CONFIG.cardBorderRadius : 0; + const elevationBorderRadius = isRounded ? CONFIG.radiusLarge : 0; const cx = useCx(); diff --git a/packages/components/src/card/styles.ts b/packages/components/src/card/styles.ts index fa70b19054e2f..df0fe4eb7ed72 100644 --- a/packages/components/src/card/styles.ts +++ b/packages/components/src/card/styles.ts @@ -12,7 +12,7 @@ import { COLORS, CONFIG } from '../utils'; // (as opposed to the `border` property), the value of the border radius needs // to be adjusted by removing 1px (this is because the `box-shadow` renders // as an "outer radius"). -const adjustedBorderRadius = `calc(${ CONFIG.cardBorderRadius } - 1px)`; +const adjustedBorderRadius = `calc(${ CONFIG.radiusLarge } - 1px)`; export const Card = css` box-shadow: 0 0 0 1px ${ CONFIG.surfaceBorderColor }; diff --git a/packages/components/src/card/test/__snapshots__/index.tsx.snap b/packages/components/src/card/test/__snapshots__/index.tsx.snap index cc1a754e1d37c..e9073edba3e3e 100644 --- a/packages/components/src/card/test/__snapshots__/index.tsx.snap +++ b/packages/components/src/card/test/__snapshots__/index.tsx.snap @@ -8,8 +8,8 @@ Snapshot Diff: @@ -1,8 +1,8 @@