fix narrow desktop main content

Commit
924f40a1d396032d69cf0da00724a31a6bdf2670
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/web/assets/hito.css
index 282c06ed..e8473c3e 100644..100644
@@ -204,6 +204,15 @@
204 204 animation: page-enter 220ms ease both;
205 205 }
206 206
207 Added: /* Keep the desktop masthead and navigation wide, while giving reading content
208 Added: a shorter line length. Mobile keeps the full page-surface width below. */
209 Added: @media (min-width: 42.0625rem) {
210 Added: .page-surface {
211 Added: max-width: 60rem;
212 Added: margin-inline: auto;
213 Added: }
214 Added: }
215 Added:
207 216 h1,
208 217 h2 {
209 218 max-width: 38rem;
test/test_web.ml
index c1e33fac..23961185 100644..100644
@@ -125,6 +125,19 @@
125 125
126 126 let route_tests =
127 127 [
128 Added: ( "web.layout",
129 Added: [
130 Added: ( "the desktop main surface is narrower than the shell",
131 Added: `Quick,
132 Added: fun () ->
133 Added: let c = client () in
134 Added: let stylesheet = body (get c "/assets/hito.css") in
135 Added: Alcotest.(check bool)
136 Added: "desktop page surface cap" true
137 Added: (contains ~substring:"@media (min-width: 42.0625rem)" stylesheet
138 Added: && contains ~substring:"max-width: 60rem" stylesheet
139 Added: && contains ~substring:"margin-inline: auto" stylesheet) );
140 Added: ] );
128 141 ( "web.auth",
129 142 [
130 143 ( "an unauthenticated visit to the overview redirects to sign-in",