File tree 5 files changed +47
-23
lines changed
5 files changed +47
-23
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,12 @@ r##"<!DOCTYPE html>
74
74
{sidebar}
75
75
</nav>
76
76
77
- <button id="theme-picker">
78
- <img src="{root_path}brush.svg" width="18" alt="Pick another theme!">
77
+ <div class="theme-picker">
78
+ <button id="theme-picker" aria-label="Pick another theme!">
79
+ <img src="{root_path}brush.svg" width="18" alt="Pick another theme!">
80
+ </button>
79
81
<div id="theme-choices"></div>
80
- </button >
82
+ </div >
81
83
<script src="{root_path}theme.js"></script>
82
84
<nav class="sub">
83
85
<form class="search-form js-only">
Original file line number Diff line number Diff line change @@ -918,12 +918,12 @@ themePicker.onclick = function() {{
918
918
}}
919
919
}};
920
920
[{}].forEach(function(item) {{
921
- var div = document.createElement('div ');
922
- div .innerHTML = item;
923
- div .onclick = function(el) {{
921
+ var but = document.createElement('button ');
922
+ but .innerHTML = item;
923
+ but .onclick = function(el) {{
924
924
switchTheme(currentTheme, mainTheme, item);
925
925
}};
926
- themes.appendChild(div );
926
+ themes.appendChild(but );
927
927
}});
928
928
"# , themes. iter( )
929
929
. map( |s| format!( "\" {}\" " , s) )
Original file line number Diff line number Diff line change @@ -1141,13 +1141,19 @@ kbd {
1141
1141
border : solid 1px ;
1142
1142
border-radius : 3px ;
1143
1143
box-shadow : inset 0 -1px 0 ;
1144
+ cursor : default;
1144
1145
}
1145
1146
1146
- # theme-picker {
1147
+ . theme-picker {
1147
1148
position : absolute;
1148
1149
left : 211px ;
1149
- top : 17px ;
1150
+ top : 19px ;
1151
+ }
1152
+
1153
+ # theme-picker {
1150
1154
padding : 4px ;
1155
+ width : 27px ;
1156
+ height : 29px ;
1151
1157
border : 1px solid;
1152
1158
border-radius : 3px ;
1153
1159
cursor : pointer;
@@ -1156,21 +1162,28 @@ kbd {
1156
1162
# theme-choices {
1157
1163
display : none;
1158
1164
position : absolute;
1159
- left : -1 px ;
1160
- top : 30 px ;
1165
+ left : 0 ;
1166
+ top : 28 px ;
1161
1167
border : 1px solid;
1162
1168
border-radius : 3px ;
1163
1169
z-index : 1 ;
1170
+ cursor : pointer;
1164
1171
}
1165
1172
1166
- # theme-choices > div {
1167
- border-top : 1px solid;
1173
+ # theme-choices > button {
1174
+ border : none;
1175
+ width : 100% ;
1168
1176
padding : 4px ;
1169
1177
text-align : center;
1178
+ background : rgba (0 , 0 , 0 , 0 );
1179
+ }
1180
+
1181
+ # theme-choices > button : not (: first-child ) {
1182
+ border-top : 1px solid;
1170
1183
}
1171
1184
1172
1185
@media (max-width : 700px ) {
1173
- # theme-picker {
1186
+ . theme-picker {
1174
1187
left : 109px ;
1175
1188
top : 7px ;
1176
1189
z-index : 1 ;
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ a.test-arrow {
197
197
198
198
# help dt {
199
199
border-color : # bfbfbf ;
200
- background : # fff ;
200
+ background : rgba ( 0 , 0 , 0 , 0 ) ;
201
201
color : black;
202
202
}
203
203
@@ -352,7 +352,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
352
352
}
353
353
354
354
kbd {
355
- color : # 444d56 ;
355
+ color : # 000 ;
356
356
background-color : # fafbfc ;
357
357
border-color : # d1d5da ;
358
358
border-bottom-color : # c6cbd1 ;
@@ -364,16 +364,20 @@ kbd {
364
364
background : # f0f0f0 ;
365
365
}
366
366
367
+ # theme-picker : hover , # theme-picker : focus {
368
+ border-color : # ffb900 ;
369
+ }
370
+
367
371
# theme-choices {
368
372
border-color : # e0e0e0 ;
369
373
background-color : # 353535 ;
370
374
}
371
375
372
- # theme-choices > div {
373
- border-top : # e0e0e0 ;
376
+ # theme-choices > button : not ( : first-child ) {
377
+ border-top-color : # e0e0e0 ;
374
378
}
375
379
376
- # theme-choices > div : hover {
380
+ # theme-choices > button : hover , # theme-choices > button : focus {
377
381
background-color : # 444 ;
378
382
}
379
383
Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
345
345
}
346
346
347
347
kbd {
348
- color : # 444d56 ;
348
+ color : # 000 ;
349
349
background-color : # fafbfc ;
350
350
border-color : # d1d5da ;
351
351
border-bottom-color : # c6cbd1 ;
@@ -354,18 +354,23 @@ kbd {
354
354
355
355
# theme-picker {
356
356
border-color : # e0e0e0 ;
357
+ background-color : # fff ;
358
+ }
359
+
360
+ # theme-picker : hover , # theme-picker : focus {
361
+ border-color : # 717171 ;
357
362
}
358
363
359
364
# theme-choices {
360
365
border-color : # ccc ;
361
366
background-color : # fff ;
362
367
}
363
368
364
- # theme-choices > div {
365
- border-top : # e0e0e0 ;
369
+ # theme-choices > button : not ( : first-child ) {
370
+ border-top-color : # e0e0e0 ;
366
371
}
367
372
368
- # theme-choices > div : hover {
373
+ # theme-choices > button : hover , # theme-choices > button : focus {
369
374
background-color : # eee ;
370
375
}
371
376
You can’t perform that action at this time.
0 commit comments