|
51 | 51 | border-bottom: solid 1px hsl(0, 0%, 25%) |
52 | 52 | &.current |
53 | 53 | background: darken($menu-vertical-background-color, 10%) |
| 54 | + &.current |
54 | 55 | a |
55 | | - color: $menu-link-medium |
56 | 56 | border-right: solid 1px darken($menu-vertical-background-color, 20%) |
57 | | - padding: $gutter / 4 $gutter * 1.5 |
58 | | - &:hover |
59 | | - background: darken($menu-vertical-background-color, 15%) |
60 | 57 | code |
61 | 58 | border: none |
62 | 59 | background: inherit |
63 | 60 | color: inherit |
64 | 61 | padding-left: 0 |
65 | 62 | padding-right: 0 |
66 | | - // Expand links |
| 63 | + |
| 64 | + // Collapse/Expand icons |
67 | 65 | span.toctree-expand |
68 | 66 | display: block |
69 | 67 | float: left |
|
73 | 71 | font-size: .8em |
74 | 72 | line-height: 1.6em |
75 | 73 | color: darken($menu-link-medium, 20%) |
| 74 | + &.expanded > a span.toctree-expand |
| 75 | + @extend .fa-minus-square-o |
76 | 76 |
|
77 | | - // On state for the first level |
78 | | - li.on a, li.current > a |
79 | | - color: $menu-link-color |
| 77 | + // Expanded state for the first level |
| 78 | + li.expanded > a |
80 | 79 | padding: $gutter / 4 $gutter |
81 | | - font-weight: bold |
82 | 80 | position: relative |
83 | | - background: $menu-vertical-background-color |
84 | 81 | border: none |
85 | 82 | padding-left: $gutter -4px |
| 83 | + // Current/on state for first level |
| 84 | + li.current > a |
| 85 | + color: $menu-link-color |
| 86 | + font-weight: bold |
| 87 | + background: $menu-vertical-background-color |
86 | 88 | +font-smooth |
87 | | - &:hover |
88 | | - background: $menu-vertical-background-color |
89 | | - span.toctree-expand |
90 | | - color: $menu-link-medium |
91 | | - span.toctree-expand |
92 | | - @extend .fa |
93 | | - @extend .fa-minus-square-o |
94 | | - display: block |
95 | | - font-size: .8em |
96 | | - line-height: 1.6em |
97 | | - color: darken($menu-link-medium, 30%) |
98 | | - |
99 | | - li.toctree-l1.current > a |
| 89 | + // Background and border for first level when both expanded and current |
| 90 | + li.toctree-l1.current.expanded > a |
100 | 91 | border-bottom: solid 1px darken($menu-vertical-background-color, 20%) |
101 | 92 | border-top: solid 1px darken($menu-vertical-background-color, 20%) |
| 93 | + &:hover |
| 94 | + border-color: lighten($menu-background-color, 10%) |
102 | 95 |
|
103 | | - // This is the on state for pages beyond second level |
104 | | - li.toctree-l2 a, li.toctree-l3 a, li.toctree-l4 a |
| 96 | + // Menu link color and hover behavior |
| 97 | + li.toctree-l1.current a, li.toctree-l2.current a, li.toctree-l3.current a, li.toctree-l4.current a |
105 | 98 | color: $menu-link-color |
106 | | - li.toctree-l1.current li.toctree-l2, li.toctree-l2.current li.toctree-l3 |
| 99 | + &:hover |
| 100 | + color: $menu-link-light |
| 101 | + background-color: lighten($menu-background-color, 10%) |
| 102 | + |
| 103 | + // Colored background when current |
| 104 | + li.toctree-l2.current a |
| 105 | + background: darken($menu-vertical-background-color, 20%) |
| 106 | + li.toctree-l3.current a |
| 107 | + background: darken($menu-vertical-background-color, 25%) |
| 108 | + |
| 109 | + // Collapse/expand behavior |
| 110 | + li.expanded > ul |
| 111 | + display: block |
| 112 | + li > ul |
| 113 | + margin-bottom: 0 |
| 114 | + display: none |
| 115 | + li.toctree-l1.expanded li.toctree-l2, li.toctree-l2.expanded li.toctree-l3 |
107 | 116 | > ul |
108 | 117 | display: none |
109 | | - &.current > ul |
110 | | - display: block |
111 | | - li.toctree-l2 |
112 | | - &.current |
113 | | - > a |
114 | | - background: darken($menu-vertical-background-color, 20%) |
115 | | - padding: $gutter / 4 $gutter * 1.5 |
116 | | - li.toctree-l3 > a |
| 118 | + &.expanded |
| 119 | + > ul |
117 | 120 | display: block |
118 | | - background: darken($menu-vertical-background-color, 20%) |
119 | | - padding: $gutter / 4 $gutter * 2.5 |
120 | | - a:hover span.toctree-expand |
121 | | - color: $menu-link-medium |
122 | | - span.toctree-expand |
123 | | - color: darken($menu-vertical-background-color, 35%) |
| 121 | + |
| 122 | + // Font size and indentation for levels > 1 |
| 123 | + li.toctree-l2 |
| 124 | + > a |
| 125 | + padding: $gutter / 4 $gutter * 1.5 |
124 | 126 | li.toctree-l3 |
125 | 127 | font-size: .9em |
126 | | - &.current |
127 | | - > a |
128 | | - background: darken($menu-vertical-background-color, 25%) |
129 | | - padding: $gutter / 4 $gutter * 2.5 |
130 | | - li.toctree-l4 > a |
131 | | - display: block |
132 | | - background: darken($menu-vertical-background-color, 25%) |
133 | | - padding: $gutter / 4 $gutter * 3.5 |
134 | | - a:hover span.toctree-expand |
135 | | - color: $menu-link-medium |
136 | | - span.toctree-expand |
137 | | - color: darken($menu-vertical-background-color, 40%) |
| 128 | + > a |
| 129 | + padding: $gutter / 4 $gutter * 2.5 |
138 | 130 | li.toctree-l4 |
139 | 131 | font-size: .9em |
| 132 | + > a |
| 133 | + padding: $gutter / 4 $gutter * 3.5 |
140 | 134 |
|
141 | | - li.current ul |
142 | | - display: block |
143 | | - li ul |
144 | | - margin-bottom: 0 |
145 | | - display: none |
146 | 135 | li ul li a |
147 | 136 | margin-bottom: 0 |
148 | 137 | color: $menu-link-light |
|
0 commit comments