Skip to content

Commit

Permalink
Used editor-left mixin for .editor-header styles.
Browse files Browse the repository at this point in the history
This change removes duplicate code and solves a bug related with resizing to small screen expanding WordPress menu and then resizing back to big screen.
  • Loading branch information
jorgefilipecosta committed Dec 27, 2017
1 parent b24170a commit e63deab
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions editor/edit-post/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,9 @@
@include break-medium() {
top: $admin-bar-height;
}

@include break-large() {
left: $admin-sidebar-width;
}
}

.sticky-menu .editor-header { /* Sticky is when on smaller breakpoints, nav menu is manually opened */
@include break-medium() {
left: $admin-sidebar-width;
}
}

.auto-fold .editor-header { /* Auto fold is when on smaller breakpoints, nav menu auto colllapses */
@include break-medium() {
left: $admin-sidebar-width-collapsed;
}

@include break-large() {
left: $admin-sidebar-width;
}
}

/* Sidebar manually collapsed */
.folded .editor-header {
left: 0;

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

/* Mobile menu opened */
.auto-fold .wp-responsive-open .editor-header {
left: $admin-sidebar-width-big;
right: -$admin-sidebar-width-big;
}
@include editor-left('.editor-header');

.editor-header__settings {
display: inline-flex;
Expand Down

0 comments on commit e63deab

Please sign in to comment.