File tree 3 files changed +10
-39
lines changed 3 files changed +10
-39
lines changed Original file line number Diff line number Diff line change @@ -596,9 +596,11 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
596
596
|buf : & mut Buffer | {
597
597
write ! (
598
598
buf,
599
- "<script defer src=\" {}settings{}.js\" ></script>" ,
600
- page. static_root_path. unwrap_or( "" ) ,
601
- page. resource_suffix
599
+ "<link rel=\" stylesheet\" type=\" text/css\" \
600
+ href=\" {root_path}settings{suffix}.css\" >\
601
+ <script defer src=\" {root_path}settings{suffix}.js\" ></script>",
602
+ root_path = page. static_root_path. unwrap_or( "" ) ,
603
+ suffix = page. resource_suffix,
602
604
)
603
605
} ,
604
606
& self . shared . style_files ,
Original file line number Diff line number Diff line change 56
56
position : absolute;
57
57
}
58
58
59
- .select-wrapper {
60
- float : right;
61
- position : relative;
62
- height : 27px ;
63
- min-width : 25% ;
64
- }
65
-
66
- .select-wrapper select {
67
- appearance : none;
68
- -moz-appearance : none;
69
- -webkit-appearance : none;
70
- background : none;
71
- border : 2px solid # ccc ;
72
- padding-right : 28px ;
73
- width : 100% ;
74
- }
75
-
76
- .select-wrapper img {
77
- pointer-events : none;
78
- position : absolute;
79
- right : 0 ;
80
- bottom : 0 ;
81
- background : # ccc ;
82
- height : 100% ;
83
- width : 28px ;
84
- padding : 0px 4px ;
85
- }
86
-
87
- .select-wrapper select option {
88
- color : initial;
89
- }
90
-
91
59
.slider {
92
60
position : absolute;
93
61
cursor : pointer;
96
64
right : 0 ;
97
65
bottom : 0 ;
98
66
background-color : # ccc ;
99
- -webkit-transition : .3s ;
100
67
transition : .3s ;
101
68
}
102
69
108
75
left : 4px ;
109
76
bottom : 4px ;
110
77
background-color : white;
111
- -webkit-transition : .3s ;
112
78
transition : .3s ;
113
79
}
114
80
@@ -121,8 +87,6 @@ input:focus + .slider {
121
87
}
122
88
123
89
input : checked + .slider : before {
124
- -webkit-transform : translateX (19px );
125
- -ms-transform : translateX (19px );
126
90
transform : translateX (19px );
127
91
}
128
92
Original file line number Diff line number Diff line change @@ -65,3 +65,8 @@ assert: ".setting-line.hidden #theme"
65
65
// We check their text as well.
66
66
assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
67
67
assert-text: ("#preferred-light-theme .setting-name", "Preferred light theme")
68
+
69
+ // Now we go to the settings page to check that the CSS is loaded as expected.
70
+ goto: file://|DOC_PATH|/settings.html
71
+ wait-for: "#settings"
72
+ assert-css: (".setting-line .toggle", {"width": "45px", "margin-right": "20px"})
You can’t perform that action at this time.
0 commit comments