Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve mobile inserter and post settings #1089

Merged
merged 5 commits into from
Jun 9, 2017
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions editor/assets/stylesheets/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $z-layers: (
'.editor-visual-editor__block {core/image aligned left or right}': 10,
'.editor-visual-editor__block-controls': 1,
'.components-form-toggle__input': 1,
'.editor-sidebar': 19,
'.editor-header': 20,
'.editor-post-visibility__dialog': 30,
'.editor-post-schedule__dialog': 30,
Expand Down
6 changes: 6 additions & 0 deletions editor/header/mode-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
z-index: z-index( '.editor-mode-switcher .dashicon' );
margin-left: -24px;
margin-top: -1px;

display: none;

@include break-small {
display: block;
}
}

&:hover,
Expand Down
38 changes: 33 additions & 5 deletions editor/inserter/style.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.editor-inserter {
display: inline-block;
position: relative;
background: none;
border: none;
padding: 0;
font-family: $default-font;
font-size: $default-font-size;
line-height: $default-line-height;
z-index: z-index( '.editor-inserter' );

@include break-medium {
position: relative;
}
}

.editor-inserter__toggle {
Expand All @@ -31,13 +34,22 @@
}

.editor-inserter__menu {
width: 280px;
box-shadow: $shadow-popover;
border: 1px solid $light-gray-500;
position: absolute;
left: -122px;
background: $white;

left: 0;
right: 0;

// inserter becomes popup
@include break-medium {
width: 280px;
left: -122px;
right: auto;
height: auto;
}

&.is-top {
bottom: 42px;

Expand Down Expand Up @@ -66,7 +78,11 @@
}

&.is-bottom {
top: 42px;
top: $admin-bar-height-big + $item-spacing -1px;

@include break-medium {
top: $admin-bar-height + $item-spacing;
}

.editor-inserter__arrow {
top: -10px;
Expand Down Expand Up @@ -110,10 +126,22 @@
position: absolute;
width: 0;
z-index: z-index( '.editor-inserter__arrow' );

display: none;

@include break-medium {
display: block;
}
}

.editor-inserter__content {
max-height: 50vh;
height: calc( 100vh - #{ $admin-bar-height-big + $header-height + $icon-button-size } );

@include break-medium {
height: auto;
max-height: 50vh;
}

overflow: auto;
box-shadow: inset 0 -5px 5px -4px rgba( $dark-gray-900, .1 );

Expand Down
29 changes: 27 additions & 2 deletions editor/sidebar/style.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
.editor-sidebar {
position: fixed;
position: sticky;
z-index: z-index( '.editor-sidebar' );
right: 0;
top: $admin-bar-height-big + $header-height;
bottom: 0;
width: $sidebar-width;
border-left: 1px solid $light-gray-500;
background: $light-gray-300;

@include break-small() {
position: fixed;
}

@include break-medium() {
top: $admin-bar-height + $header-height;
}
Expand All @@ -27,7 +32,27 @@

/* Visual and Text editor both */
.editor-layout.is-sidebar-opened .editor-layout__content {
margin-right: $sidebar-width;
margin-left: -200%;
float: left;
height: 0;

@include break-small() {
margin-left: auto;
float: none;
height: auto;
}

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

.editor-layout.is-sidebar-opened {
overflow: hidden;

@include break-small() {
overflow: auto;
}
}

.editor-layout.is-sidebar-opened .editor-sidebar {
Expand Down