mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-10 22:24:19 +01:00
191 lines
3.3 KiB
SCSS
191 lines
3.3 KiB
SCSS
// scss-lint:disable VendorPrefix
|
|
|
|
//
|
|
// Side navigation
|
|
//
|
|
|
|
.bd-toc {
|
|
position: sticky;
|
|
top: 4rem;
|
|
max-height: calc(100vh - 4rem);
|
|
padding-top: 1.5rem;
|
|
padding-bottom: 1.5rem;
|
|
overflow-y: auto;
|
|
font-size: .85rem;
|
|
}
|
|
|
|
.section-nav {
|
|
padding-left: 0;
|
|
border-left: 1px solid #eee;
|
|
|
|
ul {
|
|
padding-left: 1rem;
|
|
|
|
ul {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.toc-entry {
|
|
display: block;
|
|
|
|
a {
|
|
display: block;
|
|
padding: .25rem 1.5rem;
|
|
color: #99979c;
|
|
|
|
&:hover {
|
|
color: $brand-primary;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.bd-sidebar {
|
|
background-color: #f5f5f5;
|
|
border-right: 1px solid rgba(0,0,0,.1);
|
|
|
|
@include media-breakpoint-up(md) {
|
|
position: sticky;
|
|
top: 4rem;
|
|
max-height: calc(100vh - 4rem);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
@include media-breakpoint-up(xl) {
|
|
max-width: 320px;
|
|
}
|
|
}
|
|
|
|
.bd-links {
|
|
margin-right: -15px;
|
|
margin-left: -15px;
|
|
}
|
|
|
|
.bd-search {
|
|
position: relative; // To contain the Algolia search
|
|
padding-top: 1rem;
|
|
padding-bottom: 1rem;
|
|
}
|
|
|
|
// Docsearch overrides
|
|
//
|
|
// `!important` indicates overridden properties.
|
|
.algolia-autocomplete {
|
|
// Menu container
|
|
.ds-dropdown-menu {
|
|
width: 100%;
|
|
min-width: 0 !important;
|
|
max-width: none !important;
|
|
box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
|
|
|
|
// Caret
|
|
&::before {
|
|
left: 1rem !important;
|
|
}
|
|
}
|
|
|
|
// Section header
|
|
.algolia-docsearch-suggestion--subcategory-column {
|
|
float: none !important;
|
|
width: auto !important;
|
|
padding: 0 !important;
|
|
text-align: left !important;
|
|
}
|
|
|
|
.algolia-docsearch-suggestion--content {
|
|
float: none !important;
|
|
width: auto !important;
|
|
padding: 0 !important;
|
|
|
|
// Vertical divider between column header and content
|
|
&::before {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
.ds-suggestion {
|
|
.algolia-docsearch-suggestion--subcategory-column {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
.algolia-docsearch-footer {
|
|
display: none !important;
|
|
}
|
|
|
|
.algolia-docsearch-suggestion--highlight {
|
|
color: #5f2dab;
|
|
background-color: rgba(154, 132, 187, .12);
|
|
}
|
|
|
|
.algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
|
|
box-shadow: inset 0 -2px 0 0 rgba(95, 45, 171, .8) !important;
|
|
}
|
|
|
|
.ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
|
|
background-color: rgba(208, 189, 236, .12) !important;
|
|
}
|
|
}
|
|
|
|
.bd-sidenav {
|
|
display: none;
|
|
}
|
|
|
|
.bd-toc-link {
|
|
display: block;
|
|
padding: .75rem 1.5rem;
|
|
font-weight: 500;
|
|
color: $gray;
|
|
}
|
|
|
|
.bd-toc-link:hover {
|
|
color: $brand-primary;
|
|
text-decoration: none;
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
.bd-toc-item {
|
|
&:first-child {
|
|
border-top: 1px solid $gray-lighter;
|
|
}
|
|
&:not(:last-child) {
|
|
border-bottom: 1px solid $gray-lighter;
|
|
}
|
|
|
|
&.active {
|
|
background-color: #fafafa;
|
|
|
|
> .bd-toc-link {
|
|
color: $gray-dark;
|
|
}
|
|
|
|
> .bd-sidenav {
|
|
display: block;
|
|
padding-bottom: .75rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
// All levels of nav
|
|
.bd-sidebar .nav > li > a {
|
|
display: block;
|
|
padding: .25rem 1.5rem;
|
|
font-size: 90%;
|
|
color: #99979c;
|
|
}
|
|
|
|
.bd-sidebar .nav > li > a:hover {
|
|
color: $brand-primary;
|
|
text-decoration: none;
|
|
background-color: transparent;
|
|
}
|
|
|
|
.bd-sidebar .nav > .active > a,
|
|
.bd-sidebar .nav > .active:hover > a {
|
|
font-weight: 500;
|
|
color: $gray-dark;
|
|
background-color: transparent;
|
|
}
|