Skip to content

Commit

Permalink
Add box-sizing. (#44580)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndiego authored and michalczaplinski committed Oct 3, 2022
1 parent 50bb90d commit 2159bbb
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packages/block-library/src/code/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// Provide a minimum of overflow handling and ensure the code markup inherits
// the font-family set on pre.
.wp-block-code code {
display: block;
font-family: inherit;
overflow-wrap: break-word;
white-space: pre-wrap;
.wp-block-code {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

// Provide a minimum of overflow handling and ensure the code markup inherits
// the font-family set on pre.
code {
display: block;
font-family: inherit;
overflow-wrap: break-word;
white-space: pre-wrap;
}
}

0 comments on commit 2159bbb

Please sign in to comment.