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

【どうしよう】コアブロックのナビゲーションメニューの縦並び時の不具合修正 #245

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
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),
mtdkei marked this conversation as resolved.
Show resolved Hide resolved
& .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.