This moves the heading margin from theme.json, where it only applied to real content (articles in docs), but not content from patterns (the page content on the main site). Now the margin is applied to all h2s and h3s without custom font sizes (if a font size is added and a margin is necessary, it can be added in the editor too).
Ran blink-diff across screenshots. The first screenshot is trunk, the last is this PR, and the middle highlights differences. The only difference is the spacing on About - Philosophy & About - Requirements.
How to test the changes in this Pull Request:
Pull down the branch and build the styles yarn workspaces run build
Spin up a child theme site (see step 5 in docs setup or main setup for testing with a real child theme) or push to a sandbox.
Any pages with plain h2 & h3 should have spacing, for example articles on Documentation or pages in the About section
The spacing does not affect other existing pages (generally because they've got custom font sizes)
This moves the heading margin from
theme.json
, where it only applied to real content (articles in docs), but not content from patterns (the page content on the main site). Now the margin is applied to allh2
s andh3
s without custom font sizes (if a font size is added and a margin is necessary, it can be added in the editor too).See https://github.com/WordPress/wporg-main-2022/issues/246 This is an alternative to https://github.com/WordPress/wporg-main-2022/pull/251, assuming these values should cascade to all pages on the site. If the margins should only apply to the current pages, the in-content approach of 251 makes more sense, but since the same values are used on Documentation, I thought it should be provided by the parent theme.
Screenshots
Ran
blink-diff
across screenshots. The first screenshot istrunk
, the last is this PR, and the middle highlights differences. The only difference is the spacing on About - Philosophy & About - Requirements.How to test the changes in this Pull Request:
yarn workspaces run build