Skip to content
This repository was archived by the owner on Oct 20, 2026. It is now read-only.

Purple: Use spacers instead of padding in FAQ accordion panels - #383

Merged
iamtakashi merged 1 commit into
trunkfrom
purple/faq-panel-spacers
Jul 30, 2026
Merged

iamtakashi merged 1 commit into
trunkfrom
purple/faq-panel-spacers

Conversation

@iamtakashi

Copy link
Copy Markdown
Contributor

Problem

On the front end every closed FAQ question showed a gap between the heading and its bottom border; the editor showed none. Closed accordion panels keep their own padding visible: both core's closed state and the theme's first-paint collapse rule (height: 0 + overflow clip) hide content only, and the panel padding is a serialized inline style that no stylesheet rule can cleanly override. This is core behavior, already tracked upstream as WordPress/gutenberg#80776 (reproduced on vanilla Gutenberg), so no new upstream issue was filed.

Changes

patterns/about-faq-question-list.php: the five answer panels drop their padding-bottom: spacing-30 in favor of blockGap: 0 plus a trailing spacing-30 spacer, the same convention the product filter panels already use. Spacers are content, so the collapsed state clips them; each panel holds a single paragraph, so the open-state spacing is byte-identical to before.

Testing

  1. FAQ pattern on the front end: closed questions sit tight on their borders (no gap below the heading), matching the editor.
  2. Open a question: the answer keeps its 30px bottom spacing before the border.
  3. Behavior is correct both before hydration (theme collapse rule) and after (core hidden), and unchanged for no-JS visitors (all panels open, spacing intact).

🤖 Generated with Claude Code

Closed accordion panels keep their own padding visible: core's
closed state and the theme's first-paint collapse rule both hide
content only, and the padding is an inline style no stylesheet
rule can cleanly beat (upstream: WordPress/gutenberg#80776). The
FAQ answers' bottom padding therefore rendered as a gap under
every closed question on the front end, while the editor, which
hides panels outright, showed none.

Convert the five panels to the convention the filter sidebars
already use: blockGap 0 with a trailing spacing-30 spacer. Spacers
are content, so the collapsed state clips them, and the open
spacing is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@iamtakashi
iamtakashi merged commit f6a6a67 into trunk Jul 30, 2026
@iamtakashi
iamtakashi deleted the purple/faq-panel-spacers branch July 30, 2026 16:46
gigitux pushed a commit to woocommerce/woocommerce that referenced this pull request Oct 15, 2026
…/faq-panel-spacers

Purple: Use spacers instead of padding in FAQ accordion panels
gigitux pushed a commit to woocommerce/woocommerce that referenced this pull request Oct 15, 2026
…oo-themes#383)

Closed accordion panels keep their own padding visible: core's
closed state and the theme's first-paint collapse rule both hide
content only, and the padding is an inline style no stylesheet
rule can cleanly beat (upstream: WordPress/gutenberg#80776). The
FAQ answers' bottom padding therefore rendered as a gap under
every closed question on the front end, while the editor, which
hides panels outright, showed none.

Convert the five panels to the convention the filter sidebars
already use: blockGap 0 with a trailing spacing-30 spacer. Spacers
are content, so the collapsed state clips them, and the open
spacing is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gigitux pushed a commit to woocommerce/woocommerce that referenced this pull request Oct 15, 2026
…/faq-panel-spacers

Purple: Use spacers instead of padding in FAQ accordion panels
gigitux pushed a commit to woocommerce/woocommerce that referenced this pull request Oct 15, 2026
…oo-themes#383)

Closed accordion panels keep their own padding visible: core's
closed state and the theme's first-paint collapse rule both hide
content only, and the padding is an inline style no stylesheet
rule can cleanly beat (upstream: WordPress/gutenberg#80776). The
FAQ answers' bottom padding therefore rendered as a gap under
every closed question on the front end, while the editor, which
hides panels outright, showed none.

Convert the five panels to the convention the filter sidebars
already use: blockGap 0 with a trailing spacing-30 spacer. Spacers
are content, so the collapsed state clips them, and the open
spacing is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gigitux pushed a commit to woocommerce/woocommerce that referenced this pull request Oct 15, 2026
…/faq-panel-spacers

Purple: Use spacers instead of padding in FAQ accordion panels
gigitux pushed a commit to woocommerce/woocommerce that referenced this pull request Oct 16, 2026
…oo-themes#383)

Closed accordion panels keep their own padding visible: core's
closed state and the theme's first-paint collapse rule both hide
content only, and the padding is an inline style no stylesheet
rule can cleanly beat (upstream: WordPress/gutenberg#80776). The
FAQ answers' bottom padding therefore rendered as a gap under
every closed question on the front end, while the editor, which
hides panels outright, showed none.

Convert the five panels to the convention the filter sidebars
already use: blockGap 0 with a trailing spacing-30 spacer. Spacers
are content, so the collapsed state clips them, and the open
spacing is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gigitux pushed a commit to gigitux/woocommerce that referenced this pull request Oct 16, 2026
…oo-themes#383)

Closed accordion panels keep their own padding visible: core's
closed state and the theme's first-paint collapse rule both hide
content only, and the padding is an inline style no stylesheet
rule can cleanly beat (upstream: WordPress/gutenberg#80776). The
FAQ answers' bottom padding therefore rendered as a gap under
every closed question on the front end, while the editor, which
hides panels outright, showed none.

Convert the five panels to the convention the filter sidebars
already use: blockGap 0 with a trailing spacing-30 spacer. Spacers
are content, so the collapsed state clips them, and the open
spacing is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant