[OCaml] Mobile-friendly clone of cgit.
fix prevent diff grid cells from wrapping on narrow displays
Use 1fr instead of minmax(max-content, 1fr) for the text column so the grid can shrink below content width. Add overflow-x: auto on .diff-text so long lines scroll horizontally within the cell rather than forcing the grid wider than the viewport.
lib/static/styles.css
@@ -502,7 +502,7 @@
502
502
503
503
.diff-lines {
504
504
display: grid;
505
Removed:
grid-template-columns: 4em 4em 1.25em minmax(max-content, 1fr);
505
Added:
grid-template-columns: 4em 4em 1.25em 1fr;
506
506
font-family: monospace;
507
507
grid-auto-rows: minmax(1.35em, auto);
508
508
}
@@ -527,6 +527,7 @@
527
527
.diff-text {
528
528
padding-right: 0.75em;
529
529
white-space: pre;
530
Added:
overflow-x: auto;
530
531
}
531
532
532
533
.diff-line.addition > * {