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

[ グリッドカラムカードアイテムボディ ] ブロックテーマでレイアウト制御のUIが出てしまうが不要では? #1986

Open
kurudrive opened this issue Apr 19, 2024 · 2 comments
Assignees

Comments

@kurudrive
Copy link
Member

kurudrive commented Apr 19, 2024

スクリーンショット 2024-04-20 2 34 30

■ 関連情報

#1851

https://www.vektor-inc.co.jp/post/wp-64-layout-allowediting/

画像の配置不具合に関しては、そもそもCSSで body に対して display:grid; 指定がまずいのでは?

@kurudrive
Copy link
Member Author

@mtdkei
Copy link
Contributor

mtdkei commented Jul 3, 2024

@kurudrive
#1851 の issue元の#1798 の現象を確認したところ、レイアウト制御を入れることになった流れがわかりました。

Issue元ではLightningの時には現象は起きず、X-T9の時だけ起きます。
Lighitnigでは

.wp-block-image.aligncenter {
    margin-right: auto;
    margin-left: auto;
}

で画像の中央寄せを実現しているのに対し、X-T9では

body .is-layout-constrained > .aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
}

で画像に限らず要素の中央寄せ中寄せを実現しています。

この影響で、X-T9に複雑なグリッドカラムカードのような複雑な構造の中に中央寄せされた画像を入れると

body .is-layout-constrained > .aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
}

に当てはまらず左寄せになってました。レイアウト制御を入れるとグリッドカラムカードアイテムボディに is-layout-constrained が入るようになり、上記のCSSに当てはまるようになり中央寄せになります。

上記が原因の場合、どちらかといえばX-T9の問題のように思えました。
ただ、テーマによって上記のようなことも起こるかもしれないので #1851 が再発しないようにするには、Ligthningのようなcssをグリッドカラムカードのアイテムボディに入れてもいいのかもしれません。
どう思われますか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants