Fix the sidebar layout and its jumpy link hover/active states.
This commit is contained in:
parent
60a87728b0
commit
82a7e27984
@ -3,11 +3,7 @@
|
|||||||
// Scrollspy and affixed enhanced navigation to
|
// Scrollspy and affixed enhanced navigation to
|
||||||
// highlight sections and secondary sections of docs content`.
|
// highlight sections and secondary sections of docs content`.
|
||||||
|
|
||||||
// First level of nav
|
.s2-docs-sidebar {
|
||||||
.s2-docs-sidenav {
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
// By default it is not affixed in mobile views, so undo that
|
// By default it is not affixed in mobile views, so undo that
|
||||||
&.affix {
|
&.affix {
|
||||||
position: static;
|
position: static;
|
||||||
@ -18,6 +14,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// First level of nav
|
||||||
|
.s2-docs-sidenav {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
// All levels of nav
|
// All levels of nav
|
||||||
.s2-docs-sidebar .nav {
|
.s2-docs-sidebar .nav {
|
||||||
> li > a {
|
> li > a {
|
||||||
@ -28,7 +30,7 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #767676;
|
color: #767676;
|
||||||
border-left: 1px solid transparent;
|
border-left: 1px solid transparent;
|
||||||
transition: color .2s, border-color .2s, border-width .2s;
|
transition: color .2s, border-color .2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
> li > a code {
|
> li > a code {
|
||||||
@ -38,7 +40,6 @@
|
|||||||
|
|
||||||
> li > a:hover,
|
> li > a:hover,
|
||||||
> li > a:focus {
|
> li > a:focus {
|
||||||
padding-left: 19px;
|
|
||||||
color: #428BCA;
|
color: #428BCA;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@ -48,7 +49,7 @@
|
|||||||
> .active > a,
|
> .active > a,
|
||||||
> .active:hover > a,
|
> .active:hover > a,
|
||||||
> .active:focus > a {
|
> .active:focus > a {
|
||||||
padding-left: 18px;
|
padding-left: 19px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #428BCA;
|
color: #428BCA;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@ -77,7 +78,7 @@
|
|||||||
.nav > .active > a,
|
.nav > .active > a,
|
||||||
.nav > .active:hover > a,
|
.nav > .active:hover > a,
|
||||||
.nav > .active:focus > a {
|
.nav > .active:focus > a {
|
||||||
padding-left: 30px;
|
padding-left: 29px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,7 +107,6 @@
|
|||||||
|
|
||||||
// Undo the static from mobile first approach
|
// Undo the static from mobile first approach
|
||||||
.s2-docs-sidebar.affix {
|
.s2-docs-sidebar.affix {
|
||||||
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user