0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-14 02:24:00 +01:00
Bootstrap/docs/assets/less/sidebar.less

130 lines
2.8 KiB
Plaintext
Raw Normal View History

// stylelint-disable selector-max-compound-selectors
2017-11-26 03:06:34 +01:00
2017-07-03 00:28:51 +02:00
// By default it's not affixed in mobile views, so undo that
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar.affix {
position: static;
}
2017-07-03 00:28:51 +02:00
@media (min-width: @screen-sm-min) {
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar {
padding-left: 20px;
}
}
2017-07-04 22:24:51 +02:00
.bs-docs-search {
margin-bottom: 20px;
2017-07-05 07:43:22 +02:00
margin-left: 20px;
2017-07-04 22:24:51 +02:00
}
2017-07-03 00:28:51 +02:00
// First level of nav
2017-07-03 00:09:46 +02:00
.bs-docs-sidenav {
margin-top: 20px;
margin-bottom: 20px;
}
2017-07-03 00:28:51 +02:00
// All levels of nav
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar .nav > li > a {
display: block;
padding: 4px 20px;
font-size: 13px;
font-weight: 500;
color: #767676;
}
.bs-docs-sidebar .nav > li > a:hover,
.bs-docs-sidebar .nav > li > a:focus {
padding-left: 19px;
color: #563d7c;
text-decoration: none;
background-color: transparent;
border-left: 1px solid #563d7c;
}
.bs-docs-sidebar .nav > .active > a,
.bs-docs-sidebar .nav > .active:hover > a,
.bs-docs-sidebar .nav > .active:focus > a {
padding-left: 18px;
2017-11-26 03:06:34 +01:00
font-weight: 700;
2017-07-03 00:09:46 +02:00
color: #563d7c;
background-color: transparent;
border-left: 2px solid #563d7c;
}
2017-07-03 00:28:51 +02:00
// Nav: second level (shown on .active)
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar .nav .nav {
2017-07-03 00:28:51 +02:00
display: none; // Hide by default, but at >768px, show it
2017-07-03 00:09:46 +02:00
padding-bottom: 10px;
}
.bs-docs-sidebar .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
2017-11-26 03:06:34 +01:00
font-weight: 400;
2017-07-03 00:09:46 +02:00
}
.bs-docs-sidebar .nav .nav > li > a:hover,
.bs-docs-sidebar .nav .nav > li > a:focus {
padding-left: 29px;
}
.bs-docs-sidebar .nav .nav > .active > a,
.bs-docs-sidebar .nav .nav > .active:hover > a,
.bs-docs-sidebar .nav .nav > .active:focus > a {
padding-left: 28px;
font-weight: 500;
}
2017-07-03 00:28:51 +02:00
// Back to top (hidden on mobile)
2017-07-03 00:09:46 +02:00
.back-to-top,
.bs-docs-theme-toggle {
display: none;
padding: 4px 10px;
margin-top: 10px;
margin-left: 10px;
font-size: 12px;
font-weight: 500;
color: #999;
}
.back-to-top:hover,
.bs-docs-theme-toggle:hover {
color: #563d7c;
text-decoration: none;
}
.bs-docs-theme-toggle {
margin-top: 0;
}
2017-07-03 00:28:51 +02:00
@media (min-width: @screen-sm-min) {
2017-07-03 00:09:46 +02:00
.back-to-top,
.bs-docs-theme-toggle {
display: block;
}
}
2017-07-03 00:28:51 +02:00
// Show and affix the side nav when space allows it
@media (min-width: @screen-md-min) {
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar .nav > .active > ul {
display: block;
}
2017-07-03 00:28:51 +02:00
// Widen the fixed sidebar
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar.affix,
.bs-docs-sidebar.affix-bottom {
width: 213px;
}
.bs-docs-sidebar.affix {
2017-07-03 00:28:51 +02:00
position: fixed; // Undo the static from mobile first approach
2017-07-03 00:09:46 +02:00
top: 20px;
}
.bs-docs-sidebar.affix-bottom {
2017-07-03 00:28:51 +02:00
position: absolute; // Undo the static from mobile first approach
2017-07-03 00:09:46 +02:00
}
.bs-docs-sidebar.affix-bottom .bs-docs-sidenav,
.bs-docs-sidebar.affix .bs-docs-sidenav {
margin-top: 0;
margin-bottom: 0;
}
}
2017-07-03 00:28:51 +02:00
@media (min-width: @screen-lg-min) {
// Widen the fixed sidebar again
2017-07-03 00:09:46 +02:00
.bs-docs-sidebar.affix-bottom,
.bs-docs-sidebar.affix {
width: 263px;
}
}