Skip to content

Commit cfce342

Browse files
authored
fix: Linewrap lines > 72ch in htmlized view (ietf-tools#4974)
* fix: Linewrap lines > 72ch in htmlized view * fix: Make Safari break long words (URLs) * Use same fix as martinthomson/rfc-txt-html@d242f1f
1 parent faf68bc commit cfce342

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

ietf/static/css/document_html.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ $tooltip-margin: inherit !default;
166166

167167
.rfcmarkup {
168168

169+
pre {
170+
width: 72ch;
171+
white-space: pre-wrap;
172+
}
173+
169174
h1,
170175
h2,
171176
h3,

ietf/static/css/document_html_txt.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
margin-bottom: var(--line);
4444
margin-left: 3ch;
4545

46+
/* Really long lines can wrap when all else fails.
47+
* This won't affect <pre> or <table>, or cases where soft-wrapping occurs.
48+
* Mostly this exists so that long URLs wrap properly in Safari, which
49+
* doesn't break words at '/' like other browsers. */
50+
overflow-wrap: break-word;
51+
4652
h1, h2, h3, h4, h5 {
4753
font-weight: bold;
4854
font-size: inherit;

0 commit comments

Comments
 (0)