0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-05 17:24:20 +01:00
Bootstrap/site/docs/4.1/assets/scss/_sidebar.scss

167 lines
2.7 KiB
SCSS
Raw Normal View History

2017-10-03 05:34:56 +02:00
// stylelint-disable declaration-no-important
2016-12-29 22:22:45 +01:00
//
2017-06-14 07:11:52 +02:00
// Right side table of contents
//
.bd-toc {
@supports (position: sticky) {
position: sticky;
top: 4rem;
height: calc(100vh - 4rem);
overflow-y: auto;
}
order: 2;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
2017-05-29 03:01:24 +02:00
font-size: .875rem;
}
.section-nav {
padding-left: 0;
border-left: 1px solid #eee;
ul {
padding-left: 1rem;
2017-05-28 07:12:18 +02:00
ul {
display: none;
}
}
}
.toc-entry {
display: block;
a {
display: block;
2017-06-14 07:11:52 +02:00
padding: .125rem 1.5rem;
color: #99979c;
&:hover {
color: $blue;
text-decoration: none;
}
}
}
2017-06-14 07:11:52 +02:00
//
// Left side navigation
//
.bd-sidebar {
order: 0;
// background-color: #f5f2f9;
border-bottom: 1px solid rgba(0, 0, 0, .1);
2017-05-28 02:36:35 +02:00
@include media-breakpoint-up(md) {
@supports (position: sticky) {
position: sticky;
top: 4rem;
z-index: 1000;
height: calc(100vh - 4rem);
}
border-right: 1px solid rgba(0, 0, 0, .1);
}
2017-05-28 03:47:45 +02:00
@include media-breakpoint-up(xl) {
flex: 0 1 320px;
2017-05-28 03:47:45 +02:00
}
}
2016-10-25 01:06:32 +02:00
.bd-links {
padding-top: 1rem;
padding-bottom: 1rem;
margin-right: -15px;
margin-left: -15px;
@include media-breakpoint-up(md) {
@supports (position: sticky) {
max-height: calc(100vh - 9rem);
overflow-y: auto;
}
}
2017-05-29 02:49:46 +02:00
// Override collapse behaviors
@include media-breakpoint-up(md) {
display: block !important;
}
2016-10-25 01:06:32 +02:00
}
.bd-search {
2017-05-28 18:50:53 +02:00
position: relative; // To contain the Algolia search
2017-05-31 08:48:52 +02:00
padding: 1rem 15px;
margin-right: -15px;
margin-left: -15px;
border-bottom: 1px solid rgba(0, 0, 0, .05);
2017-05-29 07:23:27 +02:00
.form-control:focus {
border-color: $bd-purple-bright;
box-shadow: 0 0 0 3px rgba($bd-purple-bright, .25);
}
}
2017-05-29 02:49:46 +02:00
.bd-search-docs-toggle {
line-height: 1;
color: $gray-900;
2017-05-29 02:49:46 +02:00
}
.bd-sidenav {
display: none;
}
.bd-toc-link {
display: block;
2017-05-31 08:48:52 +02:00
padding: .25rem 1.5rem;
2017-05-28 03:30:58 +02:00
font-weight: 500;
color: rgba(0, 0, 0, .65);
2017-05-28 03:30:58 +02:00
2017-05-29 06:40:23 +02:00
&:hover {
color: rgba(0, 0, 0, .85);
2017-05-29 06:40:23 +02:00
text-decoration: none;
}
}
2016-10-25 01:06:32 +02:00
.bd-toc-item {
2017-05-31 08:48:52 +02:00
&.active {
margin-bottom: 1rem;
2017-05-29 06:40:23 +02:00
2017-05-31 08:48:52 +02:00
&:not(:first-child) {
margin-top: 1rem;
}
2017-05-28 03:30:58 +02:00
> .bd-toc-link {
color: rgba(0, 0, 0, .85);
2017-05-29 06:40:23 +02:00
&:hover {
background-color: transparent;
}
2017-05-28 03:30:58 +02:00
}
> .bd-sidenav {
display: block;
}
}
2016-10-25 01:06:32 +02:00
}
// All levels of nav
.bd-sidebar .nav > li > a {
display: block;
2017-05-28 02:36:35 +02:00
padding: .25rem 1.5rem;
font-size: 90%;
color: rgba(0, 0, 0, .65);
}
2017-05-28 03:30:58 +02:00
.bd-sidebar .nav > li > a:hover {
color: rgba(0, 0, 0, .85);
text-decoration: none;
background-color: transparent;
}
2017-05-28 03:30:58 +02:00
.bd-sidebar .nav > .active > a,
2017-05-28 03:30:58 +02:00
.bd-sidebar .nav > .active:hover > a {
font-weight: 500;
color: rgba(0, 0, 0, .85);
background-color: transparent;
}