1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/assets/scss/_sidebar.scss

167 lines
2.6 KiB
SCSS
Raw Normal View History

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