diff --git a/docs-viewer/Main.hs b/docs-viewer/Main.hs index d13dd8a..3a836f0 100644 --- a/docs-viewer/Main.hs +++ b/docs-viewer/Main.hs @@ -542,7 +542,8 @@ declaration mo member d = else H.div_ [ P.class_ "args" ] [ H.div_ [ P.class_ "arg" ] [ H.code_ [ P.class_ "arg-type", prop "innerHTML" t ] [] - , doc "doc arg-doc" ad + -- a cell even without a doc: the grid's rows stay in step + , H.div_ [ P.class_ "doc arg-doc", prop "innerHTML" ad ] [] ] | (t, ad) <- declArgs d ] , doc "doc" (declDoc d) diff --git a/docs-viewer/static/docs.css b/docs-viewer/static/docs.css index 34e2b74..25d391a 100644 --- a/docs-viewer/static/docs.css +++ b/docs-viewer/static/docs.css @@ -491,6 +491,13 @@ pre { margin: 0; } .arg-doc { padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 14px; } .arg-doc p { margin: 0; } .arg:last-child .arg-type, .arg:last-child .arg-doc { border-bottom: 0; } +/* narrow: each doc under its type, so a long type does not push it off */ +@media (max-width: 820px) { + .args { grid-template-columns: minmax(0, 1fr); } + .arg-type { border-bottom: 0; } + .arg-doc:empty { display: none; } + .arg:not(:last-child) .arg-type:has(+ .arg-doc:empty) { border-bottom: 1px solid var(--border); } +} .subs { margin: 6px 0 12px; } .subs-title, .instances summary {