From 2ae67d683e0ba6a7ee7f2655908b9e96b135e124 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 18 Jul 2019 16:28:12 +0200 Subject: [PATCH] css: highlight active documentation entries the same as sections. For Python code, many names will have just the entry without any detailed docs and it's hard to see where on the page it is if it's not selected. The same works for Doxygen, of course. --- css/m-dark+documentation.compiled.css | 12 ++++++++++++ css/m-dark.documentation.compiled.css | 12 ++++++++++++ css/m-documentation.css | 15 +++++++++++++++ css/m-light+documentation.compiled.css | 12 ++++++++++++ css/m-light.documentation.compiled.css | 12 ++++++++++++ 5 files changed, 63 insertions(+) diff --git a/css/m-dark+documentation.compiled.css b/css/m-dark+documentation.compiled.css index a1f0bbba..f1f2ebbc 100644 --- a/css/m-dark+documentation.compiled.css +++ b/css/m-dark+documentation.compiled.css @@ -2612,6 +2612,18 @@ span.m-doc-wrap { dl.m-doc dd { margin-bottom: 0.5rem; } +dl.m-doc dd { + margin-left: 0; + padding-left: 2.5rem; +} +dl.m-doc dt:target, dl.m-doc dt:target + dd { + margin-left: -1.0rem; + border-left-style: solid; + border-left-width: 0.25rem; + border-color: #a5c9ea; +} +dl.m-doc dt:target { padding-left: 0.75rem; } +dl.m-doc dt:target + dd { padding-left: 3.25rem; } ul.m-doc { list-style: none; margin-left: 1.0375rem; diff --git a/css/m-dark.documentation.compiled.css b/css/m-dark.documentation.compiled.css index 1f7867e6..105f52b0 100644 --- a/css/m-dark.documentation.compiled.css +++ b/css/m-dark.documentation.compiled.css @@ -75,6 +75,18 @@ span.m-doc-wrap { dl.m-doc dd { margin-bottom: 0.5rem; } +dl.m-doc dd { + margin-left: 0; + padding-left: 2.5rem; +} +dl.m-doc dt:target, dl.m-doc dt:target + dd { + margin-left: -1.0rem; + border-left-style: solid; + border-left-width: 0.25rem; + border-color: #a5c9ea; +} +dl.m-doc dt:target { padding-left: 0.75rem; } +dl.m-doc dt:target + dd { padding-left: 3.25rem; } ul.m-doc { list-style: none; margin-left: 1.0375rem; diff --git a/css/m-documentation.css b/css/m-documentation.css index c25e85e0..6cea1aae 100644 --- a/css/m-documentation.css +++ b/css/m-documentation.css @@ -71,9 +71,24 @@ span.m-doc-wrap { white-space: pre-line; max-width: 100%; /* otherwise horizontal scrollbars, wtf */ } + +/* Highlight the doc entries the same way as sections */ dl.m-doc dd { margin-bottom: 0.5rem; } +dl.m-doc dd { + margin-left: 0; + padding-left: 2.5rem; +} +dl.m-doc dt:target, dl.m-doc dt:target + dd { + margin-left: -1.0rem; + border-left-style: solid; + border-left-width: 0.25rem; + border-color: var(--article-heading-color); +} +dl.m-doc dt:target { padding-left: 0.75rem; } +dl.m-doc dt:target + dd { padding-left: 3.25rem; } + ul.m-doc { list-style: none; margin-left: 1.0375rem; diff --git a/css/m-light+documentation.compiled.css b/css/m-light+documentation.compiled.css index 3eba5412..17112d37 100644 --- a/css/m-light+documentation.compiled.css +++ b/css/m-light+documentation.compiled.css @@ -2545,6 +2545,18 @@ span.m-doc-wrap { dl.m-doc dd { margin-bottom: 0.5rem; } +dl.m-doc dd { + margin-left: 0; + padding-left: 2.5rem; +} +dl.m-doc dt:target, dl.m-doc dt:target + dd { + margin-left: -1.0rem; + border-left-style: solid; + border-left-width: 0.25rem; + border-color: #cb4b16; +} +dl.m-doc dt:target { padding-left: 0.75rem; } +dl.m-doc dt:target + dd { padding-left: 3.25rem; } ul.m-doc { list-style: none; margin-left: 1.0375rem; diff --git a/css/m-light.documentation.compiled.css b/css/m-light.documentation.compiled.css index 7b2a7775..29d4c8b2 100644 --- a/css/m-light.documentation.compiled.css +++ b/css/m-light.documentation.compiled.css @@ -75,6 +75,18 @@ span.m-doc-wrap { dl.m-doc dd { margin-bottom: 0.5rem; } +dl.m-doc dd { + margin-left: 0; + padding-left: 2.5rem; +} +dl.m-doc dt:target, dl.m-doc dt:target + dd { + margin-left: -1.0rem; + border-left-style: solid; + border-left-width: 0.25rem; + border-color: #cb4b16; +} +dl.m-doc dt:target { padding-left: 0.75rem; } +dl.m-doc dt:target + dd { padding-left: 3.25rem; } ul.m-doc { list-style: none; margin-left: 1.0375rem; -- 2.30.2