Skip to content

Commit

Permalink
multiple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 25, 2019
1 parent d086076 commit e4efe7b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $z-layers: (

// Show sidebar above wp-admin navigation bar for mobile viewports:
// #wpadminbar { z-index: 99999 }
".edit-post-sidebar": 100000,
".edit-post-editor-regions__sidebar": 100000,
".edit-widgets-sidebar": 100000,
".edit-post-layout .edit-post-post-publish-panel": 100001,
// For larger views, the wp-admin navbar dropdown should be at top of
Expand Down
36 changes: 22 additions & 14 deletions packages/edit-post/src/components/editor-regions/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
// On Mobile keep a margin for the header and admin header
// as both of these are fixed
top: 0;
@include break-small() {
@include break-medium() {
margin-top: 0;

// On Desktop position the container as fixed to avoid scroll bleed.
position: fixed;
top: $admin-bar-height-big;
top: $admin-bar-height;
left: 0;
right: 0;
bottom: 0;
Expand All @@ -22,13 +22,6 @@
top: 0;
}
}

@include break-medium() {
top: $admin-bar-height;
.is-fullscreen-mode & {
top: 0;
}
}
}
@include editor-left(".edit-post-editor-regions");

Expand All @@ -37,7 +30,7 @@
display: flex;

// On Mobile the header is fixed to keep HTML as scrollable.
@include break-small() {
@include break-medium() {
overflow: auto;
}
}
Expand All @@ -46,29 +39,43 @@
flex-grow: 1;

// On Mobile the header is fixed to keep HTML as scrollable.
@include break-small() {
@include break-medium() {
overflow: auto;
}
}

.edit-post-editor-regions__sidebar {
width: auto; // Keep the sidebar width flexible.
flex-shrink: 0;
position: fixed !important; // Need to override the default relative positionning
z-index: z-index(".edit-post-editor-regions__sidebar");
top: 0;
right: 0;
bottom: 0;
left: 0;

&:empty {
display: none;
}

// On Mobile the header is fixed to keep HTML as scrollable.
@include break-small() {
@include break-medium() {
overflow: auto;
border-left: $border-width solid $light-gray-500;
position: relative !important;
z-index: initial;
}
}

.edit-post-editor-regions__header {
flex-shrink: 0;
height: auto; // Keep the height flexible.
border-bottom: $border-width solid $light-gray-500;

// On Mobile the header is sticky.
position: sticky;
top: 0;
@include break-small() {
@include break-medium() {
// Cancel the fixed positionning used in mobile.
position: initial;
overflow: auto;
Expand All @@ -79,10 +86,11 @@
height: auto; // Keep the height flexible.
flex-shrink: 0;
overflow: auto;
border-top: $border-width solid $light-gray-500;

// On Mobile the footer is hidden
display: none;
@include break-small() {
@include break-medium() {
display: block;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
.edit-post-header-toolbar__block-toolbar {
// Stack toolbar below Editor Bar.
position: absolute;
top: $header-height;
top: $header-height + 1px;
left: 0;
right: 0;
background: $white;
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/components/header/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.edit-post-header {
height: $header-height;
padding: $grid-size-small 2px;
border-bottom: $border-width solid $light-gray-500;
background: $white;
display: flex;
flex-wrap: wrap;
Expand Down
1 change: 0 additions & 1 deletion packages/edit-post/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
height: $footer-height;
padding: 0 $grid-size;
align-items: center;
border-top: $border-width solid $light-gray-500;
font-size: $default-font-size;
}
}
Expand Down
7 changes: 4 additions & 3 deletions packages/edit-post/src/components/sidebar/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.edit-post-sidebar {
z-index: z-index(".edit-post-sidebar");
width: $sidebar-width;
border-left: $border-width solid $light-gray-500;
background: $white;
color: $dark-gray-500;

Expand All @@ -12,6 +9,10 @@
-webkit-overflow-scrolling: touch;
}

@include break-medium() {
width: $sidebar-width;
}

> .components-panel {
border-left: none;
border-right: none;
Expand Down
1 change: 1 addition & 0 deletions packages/edit-post/src/components/text-editor/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.edit-post-text-editor {
position: relative;
width: 100%;

// Always show outlines in code editor
Expand Down

0 comments on commit e4efe7b

Please sign in to comment.