Skip to content

Commit 6deecae

Browse files
committed
Let long lines in highlighted code blocks scroll horizontally
.prose .highlight clips (overflow: hidden) to keep its rounded corners, so lines wider than the column were cut off. Scroll the wrapper Chroma renders around the line-number table instead; the copy button stays put.
1 parent aab0840 commit 6deecae

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • themes/powershell-community/layouts/_default

‎themes/powershell-community/layouts/_default/baseof.html‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@
180180
read as a wall of whitespace. */
181181
.prose .highlight { margin: 1.25rem 0; border-radius: 0.5rem; overflow: hidden; }
182182
.prose .highlight pre { margin: 0; padding: 0.85rem 1rem; border-radius: 0; line-height: 1.5; }
183+
/* The block itself clips to keep its rounded corners and the copy button
184+
in place, so long lines scroll inside the wrapper Chroma puts around the
185+
line-number table. */
186+
.prose .highlight > div { overflow-x: auto; }
183187

184188
.hero-pattern {
185189
background: linear-gradient(135deg, #0078D4 0%, #00BCF2 100%);

0 commit comments

Comments
 (0)