Skip to content

Commit

Permalink
Add outer padding.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellr committed Dec 17, 2021
1 parent 403e2e1 commit e899aa5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
41 changes: 40 additions & 1 deletion tt1-blocks/assets/css/style-shared.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,43 @@ a:hover {
*/
.site-header h1.wp-block-site-title a:not(:hover):not(:focus):not(:active) {
text-decoration: underline;
}
}

/*
* Alignment styles.
* These rules are temporary, and should not be relied on or
* modified too heavily by themes or plugins that build on
* Twenty Twenty-Two. These are meant to be a precursor to
* a global solution provided by the Block Editor.
*
* Relevant issues:
* https://github.com/WordPress/gutenberg/issues/35607
* https://github.com/WordPress/gutenberg/issues/35884
*/

.wp-site-blocks,
body > .is-root-container,
.edit-post-visual-editor__post-title-wrapper,
.wp-block-group.alignfull,
.is-root-container .wp-block[data-align="full"] > .wp-block-group {
padding-left: var(--wp--custom--spacing--outer);
padding-right: var(--wp--custom--spacing--outer);
}

.wp-site-blocks .alignfull,
.is-root-container .wp-block[data-align="full"] {
margin-left: calc(-1 * var(--wp--custom--spacing--outer)) !important;
margin-right: calc(-1 * var(--wp--custom--spacing--outer)) !important;
width: unset;
}

/* Blocks inside columns don't have negative margins. */
.wp-site-blocks .wp-block-columns .wp-block-column .alignfull,
.is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"],
/* We also want to avoid stacking negative margins. */
.wp-site-blocks .alignfull:not(.wp-block-group) .alignfull,
.is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] {
margin-left: auto !important;
margin-right: auto !important;
width: inherit;
}
3 changes: 2 additions & 1 deletion tt1-blocks/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
"spacing": {
"unit": "20px",
"horizontal": "25px",
"vertical": "30px"
"vertical": "30px",
"outer": "20px"
},
"font-weight":{
"light": "300",
Expand Down

0 comments on commit e899aa5

Please sign in to comment.