From 78734c2698aaaf31a4fe724a81ff9c449ca1ec41 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Tue, 19 May 2020 20:21:29 +1000 Subject: [PATCH] doc: eliminate dead space in API section's sidebar This commit improves overall usability on desktop by removing the "dead" (non-interactive) regions between links in the API section's navigation. No visible changes have been made; this enhancement is purely tactile in nature. PR-URL: https://github.com/nodejs/node/pull/33469 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- doc/api_assets/style.css | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 5799a777353ba7..37e7376d0583f2 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -592,6 +592,50 @@ td > *:last-child { margin: -2px 3px 0 0; } +/* API reference sidebar */ +@media only screen and (min-width: 1025px) { + .apidoc #column2 > .line { + pointer-events: none; + } + .apidoc #column2 > :first-child, + .apidoc #column2 > ul, + .apidoc #column2 > ul > li { + margin: 0; + padding: 0; + } + .apidoc #column2 > :first-child > a[href] { + border-radius: 0; + padding: 1.25rem 1.4375rem .625rem; + display: block; + } + .apidoc #column2 > ul > li > a[href] { + padding: .5rem 1.4375rem; + padding-right: 0; + display: block; + } + .apidoc #column2 > ul > :first-child > a[href] { + padding-top: .625rem; + } + .apidoc #column2 > ul > :last-child > a[href] { + padding-bottom: .625rem; + } + .apidoc #column2 > ul:first-of-type > :last-child > a[href] { + padding-bottom: 1rem; + } + .apidoc #column2 > ul:nth-of-type(2) > :first-child > a[href] { + padding-top: .875rem; + } + .apidoc #column2 > ul:nth-of-type(2) > :last-child > a[href] { + padding-bottom: .9375rem; + } + .apidoc #column2 > ul:last-of-type > :first-child > a[href] { + padding-top: 1rem; + } + .apidoc #column2 > ul:last-of-type > :last-child > a[href] { + padding-bottom: 1.75rem; + } +} + @media only screen and (max-width: 1024px) { #content { overflow: visible;