Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix the border radius in the site editor. #27986

Merged
merged 2 commits into from
Jan 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
// Everything else.
// 2px outside.
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
border-radius: $radius-block-ui - $border-width; // Border is outset, so so subtract the width to achieve correct radius.
border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius.

// Windows High Contrast mode will show this outline.
outline: 2px solid transparent;
Expand Down Expand Up @@ -185,7 +185,7 @@

// 2px outside.
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
border-radius: $radius-block-ui - $border-width; // Border is outset, so so subtract the width to achieve correct radius.
border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius.

// Show a light color for dark themes.
.is-dark-theme & {
Expand All @@ -201,6 +201,7 @@
left: $border-width;
right: $border-width;
bottom: $border-width;
border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius.
}

&:focus {
Expand All @@ -219,6 +220,7 @@
right: $border-width;
bottom: $border-width;
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color);
border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius.
}
}

Expand Down Expand Up @@ -589,7 +591,7 @@

// Block UI appearance.
box-shadow: 0 0 0 $border-width $gray-900;
border-radius: $radius-block-ui - $border-width; // Border is outset, so so subtract the width to achieve correct radius.
border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius.
background-color: $white;

// When button is focused, it receives a box-shadow instead of the border.
Expand Down