Skip to content

Commit

Permalink
Fix content breaking out of main container (#84)
Browse files Browse the repository at this point in the history
* Remove unnecessary width from label

This was creating an overflow to the right on Chrome

* Wrap text when it breaks out of the blocks container

* Force `pre` blocks to scroll to retain code formatting
  • Loading branch information
ryelle authored Apr 14, 2023
1 parent f1ffbca commit 28564c6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
display: flex;
flex-direction: column;
min-height: calc(100vh - var(--wp-global-header-offset, 0px) - var(--local-header-height, 0px));
overflow-wrap: break-word;

> main,
> article {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import "post-excerpt";
@import "post-navigation-link";
@import "post-title";
@import "preformatted";
@import "pullquote";
@import "query-pagination";
@import "quote";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.wp-block-preformatted {
white-space: pre;
overflow-x: scroll;
overflow-wrap: normal;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
margin-top: var(--wp--custom--margin--baseline);

> label {
width: 100%;
margin-bottom: calc(var(--wp--custom--form--padding) / 2);
font-size: var(--wp--custom--form--typography--font-size);
color: var(--wp--custom--form--color--label);
Expand Down

0 comments on commit 28564c6

Please sign in to comment.