Skip to content

Commit 86a5116

Browse files
committed
Bundled Themes: Prevent pre from overflowing container.
Update CSS to set `overflow-x: auto` on `pre` elements in Twenty Twenty Two and Twenty Twenty Five. Props pateljaymin, jaiminp, nikunj8866, sabernhardt, rollybueno, joedolson. Fixes #63875. git-svn-id: https://develop.svn.wordpress.org/trunk@60921 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e18685c commit 86a5116

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/wp-content/themes/twentytwentyfive/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
5959
.more-link {
6060
display: block;
6161
}
62+
63+
/*
64+
* Prevents unnecessary scrollbars while handling long lines of preformatted text.
65+
* https://core.trac.wordpress.org/ticket/63875
66+
*/
67+
:where(pre) {
68+
overflow-x: auto;
69+
}

src/wp-content/themes/twentytwentytwo/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,12 @@ body > .is-root-container > .wp-block-template-part > .wp-block-cover,
159159
.wp-block-post-comments ol.commentlist li.comment:not(:last-child) {
160160
margin-bottom: 1rem;
161161
}
162+
163+
/*
164+
* Prevents unnecessary scrollbars while handling long lines of preformatted text.
165+
* https://core.trac.wordpress.org/ticket/63875
166+
*/
167+
168+
:where(pre) {
169+
overflow-x: auto;
170+
}

0 commit comments

Comments
 (0)