Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
33 changes: 24 additions & 9 deletions assets/_scss/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,22 @@
}
}

:where(.wp-block-navigation .wp-block-navigation__submenu-container) {
& .wp-block-navigation-itema:not(.wp-element-button),
& .wp-block-navigation-submenu a:not(.wp-element-button),
& .wp-block-navigation-submenu button.wp-block-navigation-item__content,
& .wp-block-pages-list__item button.wp-block-navigation-item__content {
padding: .5em 1em;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtdkei これって、他のセレクタからの padding:0.8em 指定に負けて効いてなくないです(・・?

}
}

/******************************************************
* Navigation Modal Styles
*/
.has-modal-open {
:where(.wp-block-navigation__container, .wp-block-page-list) {
--wp--style--block-gap: 0;

gap: 0;
&,
li,
li .wp-block-navigation-item__content {
Expand Down Expand Up @@ -187,34 +196,40 @@
*/
.wp-block-navigation.is-vertical {
:where(.wp-block-navigation__container, .wp-block-page-list) {
--wp--style--block-gap: 0;
gap: 0;
// --wp--style--block-gap: 0;
// gap: 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtdkei @sysbird
うーむ、難しいところですね...。
これ解除すると既存のサイトのメニューの gap が広がっちゃうのよね...。
アップデートで既存サイトの表示が変わらない事は非常に注意しないといけないので、

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とりあえず gap が効かない問題はこのブランチから切り離して、別の issue / プルリク とした方が良いかなと思います(・w・

width: 100%;
}

.wp-block-navigation-item {
> .wp-block-navigation-item {
width: 100%;
display: block;
box-sizing: border-box;

a {
> a {
padding: 0;
}
}

.wp-block-navigation-item {
display: flex;
position: relative;
}

.wp-block-navigation__submenu-container {
display: block;
height: auto;
width: 100%;
position: relative;
position: absolute;
opacity: 1;
visibility: visible;
background: none;
visibility: hidden;
color: initial;
transition: opacity .1s linear;
}

@media (min-width: 782px) {
.has-child .wp-block-navigation__submenu-container {
left: 0;
}
}
}
}
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ GitHub : https://github.com/vektor-inc/x-t9

== Changelog ==

[ Design Tuning ] Adjustment when using submenus in core block navigation.
[ Bug Fix ] Fixed a bug where the core block navigation's gap was not being applied.

1.20.0
[ Specification Change ] TGM load from composer

Expand Down Expand Up @@ -418,4 +421,4 @@ Source: https://github.com/adobe-fonts/source-serif

Block Pattern Images:

All photos were taken by Vektor,Inc.
All photos were taken by Vektor,Inc.