Skip to content

Commit 0f8e092

Browse files
committed
Make AI overview block fill width inside flex/grid Group blocks
When hamelp/ai-overview is placed in a WP Group block using flex layout (e.g. alongside an "AIは間違うことがあります" disclaimer), the block root collapsed to its intrinsic content width because flex Groups default their children to size-to-content rather than stretch. Add width:100% (plus box-sizing:border-box) to the .hamelp-ai-overview root so the form, input-row and textarea inherit full width; no-op in normal block flow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCRKyC4sroy5Xk144DGJdS
1 parent aab62be commit 0f8e092

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/blocks/ai-overview/style.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
*/
1616

1717
:where(.hamelp-ai-overview) {
18+
// Fill the available width in every layout context. WordPress flex Group
19+
// blocks default their children to size-to-content (align-items is not
20+
// `stretch`), which otherwise collapses the block to its intrinsic width when
21+
// placed alongside e.g. a disclaimer paragraph. width:100% keeps it full-width
22+
// in flex/grid parents while remaining a no-op in normal block flow.
23+
width: 100%;
24+
box-sizing: border-box;
1825
// Theme-aware tokens (override these from your theme to re-skin the block).
1926
--hamelp-accent: var(--wp--preset--color--primary, #1571da);
2027
--hamelp-on-accent: var(--wp--preset--color--base, #fff);

0 commit comments

Comments
 (0)