Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CORE/CODE configurable styles to BCB #3485

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions blank-canvas-blocks/assets/ponyfill.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions blank-canvas-blocks/experimental-theme.json
Original file line number Diff line number Diff line change
@@ -180,6 +180,18 @@
"left": "calc( 2 * var(--wp--custom--padding--horizontal) )"
}
},
"code": {
"color": {
"text": "inherit",
"background": "none"
},
"border": {
"radius": "0",
"color": "#cccccc",
"width": "2px",
"style": "solid"
}
},
"navigation": {
"mobile": {
"menu": {
11 changes: 7 additions & 4 deletions blank-canvas-blocks/sass/base/_alignment.scss
Original file line number Diff line number Diff line change
@@ -15,26 +15,29 @@ body {
// This is the default with of blocks on the page with not assign alignwide or alignfull
.wp-site-blocks *[class*="__inner-container"] > .wp-block-group,
.wp-site-blocks > *:not(.wp-block-post-content):not(.wp-block-template-part),
.wp-site-blocks .wp-block-post-content > * {
.wp-block-post-content > * {
max-width: var(--wp--custom--width--default);
margin-left: auto;
margin-right: auto;
padding: 0 var(--wp--custom--margin--horizontal);
padding-left: var(--wp--custom--margin--horizontal);
padding-right: var(--wp--custom--margin--horizontal);
}

// Align the block to be on the "wider" side of things
.wp-site-blocks *[class*="__inner-container"] > .alignwide,
.wp-site-blocks .alignwide {
.alignwide {
width: var(--wp--custom--width--wide);
max-width: 100%;
}

// The block should span the full width of the page
.wp-site-blocks *[class*="__inner-container"] > .alignfull,
.wp-site-blocks .alignfull {
.alignfull {
max-width: unset;
margin-left: unset;
margin-right: unset;
padding-left: unset;
padding-right: unset;
}

// Align Center
9 changes: 9 additions & 0 deletions blank-canvas-blocks/sass/blocks/_code.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// TODO: This shouldn't be necessary when either of these land: https://github.com/WordPress/gutenberg/pull/27582 || https://github.com/WordPress/gutenberg/issues/29778
.wp-block-code {
border-radius: var(--wp--custom--code--border--radius);
border-width: var(--wp--custom--code--border--width);
border-style: var(--wp--custom--code--border--style);
border-color: var(--wp--custom--code--border--color);
color: var(--wp--custom--code--color--text);
background-color: var(--wp--custom--code--color--background);
}
1 change: 1 addition & 0 deletions blank-canvas-blocks/sass/ponyfill.scss
Original file line number Diff line number Diff line change
@@ -20,3 +20,4 @@
@import "blocks/group";
@import "blocks/separator";
@import "blocks/video";
@import "blocks/code";