@@ -385,22 +385,65 @@ $color-control-label-height: 20px;
385385}
386386
387387// Emulate the fullscreen editing inside the editor.
388+ // Most of this can be removed when the iframe lands.
389+
390+ // When not fullscreen.
388391.wp-block-navigation__responsive-container.is-menu-open {
389392 position : fixed ;
393+ top : $admin-bar-height-big + $header-height + $block-toolbar-height + $border-width ;
394+
395+ @include break-medium () {
396+ top : $admin-bar-height + $header-height + $border-width ;
397+ }
390398
391- // Handle top position.
392- // For now, the editing of menu items in the mobile view only happens <600px.
393- // That means we only have to consider the big adminbar height (<783px).
394- // And in that view we also know that the toolbar is stacked.
395- body .admin-bar & {
399+ // Navigation sidebar rules.
400+ @include break-medium () {
401+ left : $admin-sidebar-width-collapsed ;
402+ }
403+ @include break-large () {
404+ left : $admin-sidebar-width ;
405+ }
406+ }
407+
408+ .has-fixed-toolbar .wp-block-navigation__responsive-container.is-menu-open {
409+ @include break-medium () {
410+ top : $admin-bar-height + $header-height + $block-toolbar-height + $border-width ;
411+ }
412+ }
413+
414+ .is-mobile-preview .wp-block-navigation__responsive-container.is-menu-open ,
415+ .is-tablet-preview .wp-block-navigation__responsive-container.is-menu-open {
416+ top : $admin-bar-height + $header-height + $block-toolbar-height + $border-width ;
417+ }
418+
419+ .is-sidebar-opened .wp-block-navigation__responsive-container.is-menu-open {
420+ right : $sidebar-width ;
421+ }
422+
423+ // When fullscreen.
424+ .is-fullscreen-mode {
425+ .wp-block-navigation__responsive-container.is-menu-open {
426+ left : 0 ; // Unset the value from non fullscreen mode.
396427 top : $admin-bar-height-big + $header-height + $block-toolbar-height + $border-width ;
397428
398429 @include break-medium () {
399430 top : $header-height + $border-width ;
400431 }
401432 }
433+
434+ .has-fixed-toolbar .wp-block-navigation__responsive-container.is-menu-open {
435+ @include break-medium () {
436+ top : $header-height + $block-toolbar-height + $border-width ;
437+ }
438+ }
439+
440+ .is-mobile-preview .wp-block-navigation__responsive-container.is-menu-open ,
441+ .is-tablet-preview .wp-block-navigation__responsive-container.is-menu-open {
442+ top : $header-height + $block-toolbar-height + $border-width ;
443+ }
402444}
403445
446+
404447// Without this, the block cannot be selected, nor does the right container get focus.
405448// @todo: this is disruptive. Ideally we can retire a few of the containers,
406449// so focus is applied naturally on the block container.
0 commit comments