Skip to content

Commit

Permalink
Use default WP font and spacing sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
stian-overasen committed Jun 25, 2024
1 parent 0668cb7 commit ef6279a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 58 deletions.
2 changes: 1 addition & 1 deletion packages/themes/block-theme/includes/block-margin.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function do_override_custom_block_margin_config( array $config, $root_selector )
'size' => '1rem',
'selectors' => [],
],
'50' => [
'50' => [ // Medium.
'size' => '1.5rem',
'selectors' => [],
],
Expand Down
7 changes: 2 additions & 5 deletions packages/themes/block-theme/src/blocks/core/columns.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
.wp-block-column.has-background,
.wp-block-columns.has-background {
padding: var(--wp--preset--spacing--40);
}

.wp-block-columns.has-background,
.wp-block-columns.alignwide.has-background {
padding: var(--wp--preset--spacing--40);
padding: var(--wp--preset--spacing--50);
}
7 changes: 2 additions & 5 deletions packages/themes/block-theme/src/blocks/core/group.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
.wp-block-group.has-background {
padding: var(--wp--preset--spacing--40);
}

.wp-block-group.has-background,
.wp-block-group.has-background.alignwide {
padding: var(--wp--preset--spacing--40);
padding: var(--wp--preset--spacing--50);
}

.wp-block-group.has-background.alignfull {
Expand Down
4 changes: 2 additions & 2 deletions packages/themes/block-theme/src/blocks/core/heading.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
.wp-block-heading.has-background,
.wp-block-post-title.has-background,
.wp-block-query-title.has-background {
padding: var(--wp--preset--spacing--40);
padding: var(--wp--preset--spacing--50);
}

.wp-block-heading.has-background.alignwide,
.wp-block-post-title.has-background.alignwide,
.wp-block-query-title.has-background.alignwide {
padding: var(--wp--preset--spacing--40);
padding: var(--wp--preset--spacing--50);
}

.wp-block-heading.has-background.alignfull,
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/block-theme/src/blocks/core/media-text.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.wp-block-media-text,
.wp-block-media-text.has-media-on-the-right {
gap: var(--wp--preset--spacing--60);
gap: var(--wp--preset--spacing--50);
grid-template-columns: 1fr 1fr;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/themes/block-theme/src/blocks/core/paragraph.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
p.has-background {
padding: var(--wp--preset--spacing--40);
padding: var(--wp--preset--spacing--50);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.wp-block-post-excerpt.has-background {
padding: var(--wp--preset--spacing--40);
padding: var(--wp--preset--spacing--50);
}
52 changes: 10 additions & 42 deletions packages/themes/block-theme/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"typography": {
"customFontSize": false,
"defaultFontSizes": false,
"defaultFontSizes": true,
"dropCap": false,
"fluid": false,
"fontStyle": false,
Expand All @@ -95,47 +95,15 @@
"fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\""
}
],
"fontSizes": [
{
"fluid": false,
"name": "Small",
"size": "0.875rem",
"slug": "small"
},
{
"fluid": {
"min": "1rem",
"max": "1.125rem"
},
"name": "Medium",
"size": "1rem",
"slug": "medium"
},
{
"fluid": {
"min": "1.5rem",
"max": "2.0rem"
},
"name": "Large",
"size": "2.0rem",
"slug": "large"
},
{
"fluid": {
"min": "2.5rem",
"max": "3.0rem"
},
"name": "Extra Large",
"size": "3rem",
"slug": "x-large"
}
]
"fontSizes": []
},
"spacing": {
"defaultSpacingSizes": true,
"customSpacingSize": false,
"margin": false,
"padding": false,
"blockGap": true
"blockGap": true,
"spacingSizes": []
}
},
"styles": {
Expand Down Expand Up @@ -192,8 +160,8 @@
"padding": {
"top": "var(--wp--preset--spacing--20)",
"bottom": "var(--wp--preset--spacing--20)",
"left": "var(--wp--preset--spacing--20)",
"right": "var(--wp--preset--spacing--20)"
"left": "var(--wp--preset--spacing--30)",
"right": "var(--wp--preset--spacing--30)"
}
}
},
Expand All @@ -210,17 +178,17 @@
"blocks": {
"core/buttons": {
"spacing": {
"blockGap": "var(--wp--preset--spacing--30)"
"blockGap": "var(--wp--preset--spacing--50)"
}
},
"core/columns": {
"spacing": {
"blockGap": "var(--wp--preset--spacing--60)"
"blockGap": "var(--wp--preset--spacing--50)"
}
},
"core/group": {
"spacing": {
"blockGap": "var(--wp--preset--spacing--60)"
"blockGap": "var(--wp--preset--spacing--50)"
}
},
"core/button": {
Expand Down

0 comments on commit ef6279a

Please sign in to comment.