Skip to content

Commit 8cb4ad3

Browse files
committed
Fix text squeezing on large displays.
On large displays (with width >>14in), the padding kicks in. It is meant to shift the text towards the center while preserving the width of the main text (through the max-width property). However, the padding is part of the width, so it ends up reducing the usable text width. We could switch to controlling the margin, but then the thin left border also moves, which is unpleasant. I guess we could do that AND have the sidebar draw the border, but that's two steps. So anyway, this adjusts the max-width to take the padding into account.
1 parent ae4acf5 commit 8cb4ad3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/docs/_static/cloud.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ div.body {
106106
line-height: 1.5em;
107107
padding: 30px 20px;
108108
min-width: 0;
109-
max-width: 8in;
109+
max-width: calc(8in + max((100% - 14in) / 2, 8pt));
110110
border-left: 1px solid var(--color-fg-lines);
111-
padding-left: max(calc((100% - 14in) / 2), 8pt);
111+
padding-left: calc(max((100% - 14in) / 2, 8pt));
112112
}
113113

114114
div.sphinxsidebar {

0 commit comments

Comments
 (0)