Skip to content

Commit

Permalink
Use shadows instead of borders on interface skeleton (WordPress#61835)
Browse files Browse the repository at this point in the history
* use shadows instead of borders

* fix shadow overlap with header

* transparent outline for high contrast windows

* consistent fullscreen mode/site icon
  • Loading branch information
richtabor authored and carstingaxion committed Jun 4, 2024
1 parent 64bb4fb commit aae4472
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
background: $gray-900;
color: $white;
border-radius: 0;
height: $header-height + $border-width;
height: $header-height;
width: $header-height;
position: relative;
margin-bottom: - $border-width;

&:active {
color: $white;
Expand Down
4 changes: 1 addition & 3 deletions packages/edit-site/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,13 @@
position: relative;
color: $white;
border-radius: 0;
height: $header-height + $border-width;
height: $header-height;
width: $header-height;
margin-bottom: - $border-width;
overflow: hidden;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid transparent;

&:hover,
&:active {
Expand Down
12 changes: 9 additions & 3 deletions packages/interface/src/components/interface-skeleton/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,32 @@ html.interface-interface-skeleton__html-container {
}

.interface-interface-skeleton__sidebar {
border-top: $border-width solid $gray-200;
overflow: hidden;

@include break-medium() {
border-left: $border-width solid $gray-200;
box-shadow: -$border-width $border-width 0 0 rgba($color: #000, $alpha: 0.133); // 0.133 = $gray-200 but with alpha.
outline: 1px solid transparent; // Shown for Windows 10 High Contrast mode.
}
}

.interface-interface-skeleton__secondary-sidebar {
border-top: $border-width solid $gray-200;
right: 0;

@include break-medium() {
border-right: $border-width solid $gray-200;
box-shadow: $border-width $border-width 0 0 rgba($color: #000, $alpha: 0.133); // 0.133 = $gray-200 but with alpha.
outline: 1px solid transparent; // Shown for Windows 10 High Contrast mode.
}
}

.interface-interface-skeleton__header {
flex-shrink: 0;
height: auto; // Keep the height flexible.
border-bottom: $border-width solid $gray-200;
box-shadow: 0 $border-width 0 0 rgba($color: #000, $alpha: 0.133); // 0.133 = $gray-200 but with alpha.
z-index: z-index(".interface-interface-skeleton__header");
color: $gray-900;
outline: 1px solid transparent; // Shown for Windows 10 High Contrast mode.
}

.interface-interface-skeleton__footer {
Expand Down

0 comments on commit aae4472

Please sign in to comment.