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

Twenty Twenty One Blocks: Migrate Preformatted Block styles #98

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 11 additions & 1 deletion twentytwentyone-blocks/assets/css/blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,14 @@ h1.wp-block-site-title a:not(:hover):not(:focus):not(:active) {

.wp-block-social-links.is-style-twentytwentyone-social-icons-color .wp-social-link {
background: none;
}
}


/*--------------------------------------------------------------
# Preformatted Text
--------------------------------------------------------------*/

pre.wp-block-preformatted {
overflow-x: auto;
white-space: pre;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these rules should be added to the Gutenburg block itself.

}
12 changes: 11 additions & 1 deletion twentytwentyone-blocks/assets/css/style-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,14 @@

.wp-block[data-align="full"] {
max-width: inherit;
}
}

/*--------------------------------------------------------------
# Preformatted Text
--------------------------------------------------------------*/

pre.wp-block-preformatted {
overflow-x: auto;
white-space: pre !important;
font-size: var(--wp--preset--font-size--extra-small);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could live in theme.json, once the block supports it. You can see how I did that for the code block: WordPress/gutenberg#27294

}