joelniklaus HF Staff commited on
Commit
2b161d7
·
1 Parent(s): b354c96

wrap lines in plain text blocks for readability

Browse files
Files changed (1) hide show
  1. app/src/styles/components/_code.css +11 -0
app/src/styles/components/_code.css CHANGED
@@ -53,6 +53,17 @@ section.content-grid pre code {
53
  min-width: 100%;
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
56
  /* Wrap long lines only on small screens to prevent layout overflow */
57
  @media (--bp-content-collapse) {
58
 
 
53
  min-width: 100%;
54
  }
55
 
56
+ /* Plain-text blocks: always wrap lines (prompts, prose, etc.) */
57
+ .astro-code[data-language="text"] {
58
+ white-space: pre-wrap;
59
+ overflow-wrap: anywhere;
60
+ word-break: break-word;
61
+ }
62
+
63
+ .astro-code[data-language="text"] .line {
64
+ display: block;
65
+ }
66
+
67
  /* Wrap long lines only on small screens to prevent layout overflow */
68
  @media (--bp-content-collapse) {
69