]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Sidebar theming tweaks
authorMartijn Cuppens <martijn.cuppens@gmail.com>
Thu, 25 Jul 2019 06:18:36 +0000 (08:18 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 25 Jul 2019 07:25:39 +0000 (10:25 +0300)
site/layouts/partials/docs-sidebar.html
site/static/docs/4.3/assets/scss/_sidebar.scss

index 94b73094de4094c43dc4f985baa1f8a3e18bfb77..80b994799dbc3ba627ec472de9ee24e5cd511b0f 100644 (file)
@@ -1,4 +1,4 @@
-<nav class="collapse bd-links pb-3" id="bd-docs-nav" aria-label="Main navigation">
+<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Main navigation">
   {{- $url := split .Permalink "/" -}}
   {{- $page_slug := index $url (sub (len $url) 2) -}}
 
index 5a5e6076003c57cb4f19623992d6079e3b8f2edc..e8cc5bdab75e4e8c1220315f39f8a4c6ea78e0cd 100644 (file)
@@ -1,16 +1,12 @@
 // stylelint-disable declaration-no-important
 
-.bd-sidebar {
-  order: 0;
-}
-
 .bd-links {
   @include media-breakpoint-up(md) {
     @supports (position: sticky) {
       position: sticky;
       top: 5rem;
       z-index: 1000;
-      height: calc(100vh - 7rem);
+      height: calc(100vh - 5rem);
       overflow-y: auto;
     }
   }
   }
 }
 
-.bd-sidenav {
+:not(.active) > .bd-sidenav {
   display: none;
 }
 
 .bd-sidenav-group-link {
   padding: .25rem .625rem .25rem .5rem;
   font-weight: 600;
-  color: rgba(0, 0, 0, .65);
+  color: rgba($black, .65);
   @include border-radius(.25rem);
 
   > * { pointer-events: none; }
 
   &:hover,
   &:focus {
-    color: rgba(0, 0, 0, .85);
+    color: rgba($black, .85);
     text-decoration: none;
     background-color: rgba($bd-purple-bright, .1);
   }
     }
 
     > .bd-sidenav-group-link {
-      color: rgba(0, 0, 0, .85);
-    }
-
-    > .bd-sidenav {
-      display: block;
+      color: rgba($black, .85);
     }
   }
 }
     display: inline-block;
     padding: .25rem .5rem;
     @include font-size(.875rem);
-    color: rgba(0, 0, 0, .65);
+    color: rgba($black, .65);
     @include border-radius(.25rem);
 
     &:hover,
     &:focus {
-      color: rgba(0, 0, 0, .85);
+      color: rgba($white, .85);
       text-decoration: none;
       background-color: rgba($bd-purple-bright, .1);
     }
@@ -92,6 +84,6 @@
   > .active:hover > a,
   > .active:focus > a {
     font-weight: 600;
-    color: rgba(0, 0, 0, .85);
+    color: rgba($black, .85);
   }
 }