22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- .sidebar ol {
6- list-style : none ;
7- line-height : 22px ;
8- margin-top : 0 ;
9- margin-bottom : 0 ;
10- padding : 0 0 15px 0 ;
11- }
5+ .sidebar {
6+ h5 , ol li {
7+ text-overflow : ellipsis ;
8+ overflow : hidden ;
9+ padding : 3px 0 3px 3px ;
10+ }
1211
13- .sidebar h5 a ,
14- .sidebar h5 a :hover {
15- color : var (--main-sidebar-color );
16- }
12+ ol {
13+ list-style : none ;
14+ line-height : 22px ;
15+ margin-top : 0 ;
16+ margin-bottom : 0 ;
17+ padding : 0 0 15px 0 ;
18+
19+ li {
20+ & .section-title {
21+ font-size : 18px ;
22+ font-weight : normal ;
23+ text-transform : uppercase ;
24+ padding-top : 25px ;
25+ }
26+
27+ & .section-subtitle {
28+ font-weight : 400 ;
29+ text-transform : uppercase ;
30+
31+ a {
32+ color : inherit ;
33+ }
34+ }
35+
36+ & .section-subitem {
37+ margin-left : 12px ;
38+ }
39+
40+ & :first-child {
41+ padding-top : 3px ;
42+ margin-top : 0 ;
43+ }
44+ }
45+ }
1746
18- .sidebar h5 ,
19- .sidebar ol li {
20- text-overflow : ellipsis ;
21- overflow : hidden ;
22- padding : 3px 0 3px 3px ;
23- }
47+ h5 {
48+ color : var (--main-sidebar-color );
49+ font-size : 18px ;
50+ margin : 0 0 22px 0 ;
51+ padding-top : 0 ;
2452
25- .sidebar h5 {
26- color : var (--main-sidebar-color );
27- font-size : 18px ;
28- margin : 0 0 22px 0 ;
29- padding-top : 0 ;
53+ a , a :hover {
54+ color : var (--main-sidebar-color );
55+ }
56+ }
3057}
3158
32- .sidebar ol li .section-title {
33- font-size : 18px ;
34- font-weight : normal ;
35- text-transform : uppercase ;
36- padding-top : 25px ;
37- }
59+ #sidenav-left-toggle {
60+ display : none ;
61+ vertical-align : text-bottom ;
62+ padding : 0 ;
63+ color : var (--main-icon-color );
64+ user-select : none ;
65+ cursor : pointer ;
3866
39- .sidebar ol li .section-subtitle a {
40- color : inherit ;
41- }
67+ & :hover {
68+ color : var ( --main-hyperlinks-color ) ;
69+ }
4270
43- .sidebar ol li .section-subtitle {
44- font-weight : 400 ;
45- text-transform : uppercase ;
71+ @media screen and (max-width : 320px ) {
72+ margin-right : 10px ;
73+ margin-left : 20px ;
74+ }
4675}
4776
48- .sidebar ol li .section-subitem {
49- margin-left : 12px ;
50- }
77+ #overlay-under-drawer {
78+ display : none ;
5179
52- .sidebar ol li :first-child {
53- padding-top : 3px ;
54- margin-top : 0 ;
80+ opacity : 0.4 ;
81+ height : 100% ;
82+ z-index : 1999 ;
83+ position : fixed ;
84+ top : 0 ;
85+ left : 0 ;
86+ right : 0 ;
87+ bottom : 0 ;
88+ background-color : black ;
5589}
5690
57- button {
58- padding : 0 ;
59- }
91+ .sidebar-offcanvas-left {
92+ flex : 0 1 230px ;
93+ order : 1 ;
94+ overflow-y : scroll ;
95+ padding : 20px 0 15px 30px ;
96+ margin : 5px 20px 0 0 ;
6097
61- #sidenav-left-toggle {
62- display : none ;
63- vertical-align : text-bottom ;
64- padding : 0 ;
65- color : var (--main-icon-color );
66- user-select : none ;
67- cursor : pointer ;
98+ h5 {
99+ margin-bottom : 10px ;
100+
101+ & :last-of-type {
102+ border : 0 ;
103+ margin-bottom : 25px ;
104+ }
105+ }
68106}
69107
70- #sidenav-left-toggle :hover {
71- color : var (--main-hyperlinks-color );
108+ .sidebar-offcanvas-right {
109+ flex : 0 1 12em ;
110+ order : 3 ;
111+ overflow-y : scroll ;
112+ padding : 20px 15px 15px 15px ;
113+ margin-top : 5px ;
114+ margin-right : 20px ;
115+
116+ // The right nav should disappear out of view when the window shrinks.
117+ @media screen and (max-width : 992px ) {
118+ display : none ;
119+ }
72120}
73121
74122/* left-nav disappears, and can transition in from the left */
@@ -84,15 +132,6 @@ button {
84132 }
85133
86134 #overlay-under-drawer .active {
87- opacity : 0.4 ;
88- height : 100% ;
89- z-index : 1999 ;
90- position : fixed ;
91- top : 0 ;
92- left : 0 ;
93- right : 0 ;
94- bottom : 0 ;
95- background-color : black ;
96135 display : block ;
97136 }
98137
@@ -103,77 +142,32 @@ button {
103142 z-index : 2000 ;
104143 top : 0 ;
105144 width : 280px ; /* works all the way down to an iphone 4 */
145+ // Set a max width for narrow layouts that accounts for margin.
146+ max-width : calc (100% - 20px );
106147 height : 90% ;
107148 background-color : var (--main-bg-color );
108149 overflow-y : scroll ; /* TODO: how to hide scroll bars? */
109150 padding : 10px ;
110151 margin : 10px 10px ;
111152 box-shadow : 5px 5px 5px 5px #444444 ;
153+
154+ & .active {
155+ // Enable animating the drawer into the page view.
156+ left : 0 ;
157+ }
112158 }
113159
114160 ol #sidebar-nav {
115161 font-size : 18px ;
116162 white-space : pre-line ;
117163 }
118164
119- .sidebar-offcanvas-left.active {
120- left : 0 ; /* this animates our drawer into the page */
121- }
122-
123- .self-name {
165+ header .self-name {
124166 display : inline-block ;
125167 color : var (--main-hyperlinks-color );
126168 }
127169}
128170
129- .sidebar-offcanvas-left h5 {
130- margin-bottom : 10px ;
131- }
132-
133- .sidebar-offcanvas-left h5 :last-of-type {
134- border : 0 ;
135- margin-bottom : 25px ;
136- }
137-
138- /* the right nav disappears out of view when the window shrinks */
139- @media screen and (max-width : 992px ) {
140- .sidebar-offcanvas-right {
141- display : none ;
142- }
143- }
144-
145- #overlay-under-drawer {
146- display : none ;
147- }
148-
149- @media screen and (max-width : 320px ) {
150- #sidenav-left-toggle {
151- margin-right : 10px ;
152- margin-left : 20px ;
153- }
154-
155- .self-name {
156- margin-right : 10px ;
157- }
158- }
159-
160- .sidebar-offcanvas-left {
161- flex : 0 1 230px ;
162- order : 1 ;
163- overflow-y : scroll ;
164- padding : 20px 0 15px 30px ;
165- margin : 5px 20px 0 0 ;
166- }
167-
168- .sidebar-offcanvas-right {
169- flex : 0 1 12em ;
170- order : 3 ;
171- overflow-y : scroll ;
172- padding : 20px 15px 15px 15px ;
173- margin-top : 5px ;
174- margin-right : 20px ;
175- }
176-
177171::-webkit-scrollbar-button { display : none ; height : 13px ; border-radius : 0 ; background-color : #AAA ; }
178172::-webkit-scrollbar-button :hover { background-color : #AAA ; }
179173::-webkit-scrollbar-thumb { background-color : var (--main-scrollbar-color ); }
0 commit comments