From 48e6477b98b511fcb43faeecaa45c37c63f23b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Thu, 4 Apr 2019 16:49:29 +0200 Subject: [PATCH] Show the ToC on the left margin if enough space is available --- xep.xsl | 4 +++- xmpp.v2.css | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/xep.xsl b/xep.xsl index 53b5390a..bcc552e9 100644 --- a/xep.xsl +++ b/xep.xsl @@ -228,7 +228,9 @@ OR OTHER DEALINGS IN THE SOFTWARE. - + diff --git a/xmpp.v2.css b/xmpp.v2.css index 5546002d..0259a230 100644 --- a/xmpp.v2.css +++ b/xmpp.v2.css @@ -661,3 +661,39 @@ counter-increment: item; } } + +@media screen and ( min-width: 75em ) { + body { + margin-right: 0; + margin-left: auto; + max-width: 60em; + } + + nav#toc { + position: fixed; + left: 0; + top: 0; + bottom: 0; + width: 15em; + width: calc((100vw - 60em) - 2em); + padding: 0.5em; + overflow-y: scroll; + } + + nav#toc > h2 { + font-size: 128.57143%; + line-height: 1.16667; + margin: 0 0 1.16667em 0; + } +} + +@media screen and ( min-width: 90em ) { + body { + margin-left: auto; + margin-right: auto; + } + + nav#toc { + width: calc((100vw - 60em) / 2 - 2em); + } +}