From cb63b5c619205b31b0ac798bc660a6cd4bf77eb2 Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Mon, 4 Apr 2022 18:30:52 -0500 Subject: [PATCH] Restore two-column layout for very wide viewports --- datafiles/static/hackage.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/datafiles/static/hackage.css b/datafiles/static/hackage.css index 33499f155..8d5f1dc41 100644 --- a/datafiles/static/hackage.css +++ b/datafiles/static/hackage.css @@ -321,8 +321,11 @@ table.properties td, table.properties th { * = (100% - 40% ) * 60vw - 2em * = 60% * 60vw - 2em * = 36vw - 2em + * + * The 36vw only applies if the #content max-width of 1450px isn't hit. + * So we use min(...) for this special case. */ - width: calc(36vw - 2em); + width: calc(min(36vw, .6 * 1450px) - 2em); } } @@ -350,6 +353,7 @@ table.properties td, table.properties th { } #content { + /* keep this in sync with the calculation above */ max-width: 1450px; } }