Skip to content

Commit 6d2f012

Browse files
etmartinkazooJuanVqz
authored andcommitted
[ci-skip] Fix Horizontal Scroll on Mobile:
On mobile devices, when reading the Rails Guides I noticed horizontal scroll. This can be fixed with a few small CSS tweaks around absolute width in .code, white-space: normal, overflow: scroll and white-space: pre respectively. Co-authored-by: Juan Vasquez <[email protected]>
1 parent bf80199 commit 6d2f012

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

guides/assets/stylesrc/components/_code-container.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ dl dd .interstitial {
4444
padding-left: 1em !important; // remove if icon is restored
4545
direction: ltr !important;
4646
text-align: left !important;
47+
width: 100%;
48+
white-space: normal;
4749

4850
pre {
4951
margin: 0;
50-
overflow: visible; // allows for the blue highlight to be seen
52+
overflow: scroll;
53+
white-space: pre;
5154
}
5255

5356
button.clipboard-button {

0 commit comments

Comments
 (0)