Skip to content

Commit

Permalink
Element styles: Add margin to h2 & h3 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle authored Apr 12, 2023
1 parent 048547d commit f1ffbca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ input[type="checkbox"] + label {
line-height: 1em; // stylelint-disable-line declaration-property-unit-allowed-list
}

// Headings.
// Add margin to default h2 & h3 (no font size changes).
.wp-site-blocks h2:not([class*="-font-size"], [style*="font-size"]) {
margin-top: var(--wp--preset--spacing--40);
}

.wp-site-blocks h3:not([class*="-font-size"], [style*="font-size"]) {
margin-top: var(--wp--preset--spacing--30);
}

// Line heights for custom sizes.
.has-extra-small-font-size {
line-height: var(--wp--custom--body--extra-small--typography--line-height);
Expand Down
18 changes: 0 additions & 18 deletions source/wp-content/themes/wporg-parent-2021/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,24 +642,6 @@
"fontSize": "var(--wp--preset--font-size--normal)"
}
},
"core/post-content": {
"elements": {
"h2": {
"spacing": {
"margin": {
"top": "var(--wp--preset--spacing--40)"
}
}
},
"h3": {
"spacing": {
"margin": {
"top": "var(--wp--preset--spacing--30)"
}
}
}
}
},
"core/post-date": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
Expand Down

0 comments on commit f1ffbca

Please sign in to comment.