Skip to content

Commit

Permalink
Fix styles for Windows high contrast mode
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Sep 26, 2024
1 parent b7f087e commit 753edcf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/edit-post/src/components/layout/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.edit-post-meta-boxes-main {
filter: drop-shadow(0 -1px rgba($color: #000, $alpha: 0.133)); // 0.133 = $gray-200 but with alpha.
// Windows High Contrast mode will show this outline, but not the shadow.
outline: 1px solid transparent;
background-color: $white;
clear: both; // This is seemingly only needed in case the canvas is not iframe’d.
display: flex;
Expand Down Expand Up @@ -44,6 +46,9 @@
inset: var(--wp-admin-border-width-focus);
@include button-style__focus();
}
> svg {
fill: currentColor;
}
}

.is-resizable.edit-post-meta-boxes-main & {
Expand All @@ -58,6 +63,9 @@
&::before {
content: "";
background-color: $gray-300;
// Windows High Contrast mode will show this outline, but not the background-color.
outline: 2px solid transparent;
outline-offset: -2px;
position: absolute;
inset-block: calc(50% - #{$grid-unit-05} / 2) auto;
transform: translateX(-50%);
Expand Down

0 comments on commit 753edcf

Please sign in to comment.