Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion packages/block-library/src/code/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
}
},
"supports": {
"anchor": true
"anchor": true,
"fontSize": true
}
}
10 changes: 7 additions & 3 deletions packages/block-library/src/code/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Provide a minimum of overflow handling.
.wp-block-code code {
white-space: pre-wrap;
overflow-wrap: break-word;
.wp-block-code {
font-size: var(--wp--preset--font-size--extra-small, 0.9em);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👋 we shouldn't have used a CSS Custom Property here, explained the rationale, and prepared a bugfix at #27672


code {
white-space: pre-wrap;
overflow-wrap: break-word;
}
}
1 change: 0 additions & 1 deletion packages/block-library/src/code/theme.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.wp-block-code {
font-family: $editor-html-font;
font-size: 0.9em;
color: $gray-900;
padding: 0.8em 1em;
border: 1px solid $gray-300;
Expand Down