Skip to content

Commit ddfa0ae

Browse files
committed
feat: add word wrap styling for code blocks without language specification
1 parent b90d6bb commit ddfa0ae

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Web/wwwroot/css/site.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,18 @@ pre[class*="language-"] {
412412
transition: border-color 0.3s ease;
413413
}
414414

415+
/* Word wrap for code blocks without language specification */
416+
pre:not([class*="language-"]) {
417+
position: relative;
418+
margin: 1.5rem 0;
419+
border-radius: 0.5rem;
420+
border: 1px solid var(--border-color);
421+
padding: 1.25rem !important;
422+
white-space: pre-wrap; /* Since this is not a language-specific block, enable wrapping */
423+
word-wrap: break-word; /* Allow breaking of words */
424+
transition: border-color 0.3s ease;
425+
}
426+
415427
/* Code styling with Consolas fonts */
416428
pre[class*="language-"] code,
417429
code[class*="language-"],

0 commit comments

Comments
 (0)