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

ボタンブロックの%サイズを指定したとき、width ではなく min-width にしたい #73

Closed
inc2734 opened this issue Nov 27, 2022 · 1 comment

Comments

@inc2734
Copy link
Owner

inc2734 commented Nov 27, 2022

25% なら 4個並びになるかなど要確認。

.wp-block-button__width-50 {
  width: calc(50% - var(--wp--style--block-gap, .5em)*0.5);
}

.wp-block-buttons>.wp-block-button.wp-block-button__width-25 {
    width: calc(25% - var(--wp--style--block-gap, .5em)*0.75);
}
@inc2734
Copy link
Owner Author

inc2734 commented Nov 28, 2024

もともとの width の設定を上書きするのはゲキムズなので、新たに min-width の設定を追加するのはどうか。

.wp-block-button .wp-block-button__link {
    width: 100%;
}

.wp-block-button {
    min-width: min(100%, 350px);
}

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

No branches or pull requests

1 participant