Skip to content

Commit b1c4911

Browse files
committed
rustdoc: combine duplicate rules in ayu CSS
1 parent 4aa6afa commit b1c4911

File tree

1 file changed

+14
-34
lines changed
  • src/librustdoc/html/static/css/themes

1 file changed

+14
-34
lines changed

src/librustdoc/html/static/css/themes/ayu.css

+14-34
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,9 @@ Original by Dempfi (https://github.com/dempfi/ayu)
105105
--scrape-example-code-wrapper-background-end: rgba(15, 20, 25, 0);
106106
}
107107

108-
h1, h2, h3, h4 {
109-
color: white;
110-
}
111-
h1 a {
108+
h1, h2, h3, h4,
109+
h1 a, .sidebar h2 a, .sidebar h3 a,
110+
#source-sidebar > .title {
112111
color: #fff;
113112
}
114113
h4 {
@@ -118,24 +117,22 @@ h4 {
118117
.docblock code {
119118
color: #ffb454;
120119
}
121-
.code-header {
122-
color: #e6e1cf;
123-
}
124-
.docblock pre > code, pre > code {
125-
color: #e6e1cf;
126-
}
127-
.item-info code {
128-
color: #e6e1cf;
129-
}
130120
.docblock a > code {
131121
color: #39AFD7 !important;
132122
}
133-
pre, .rustdoc.source .example-wrap {
123+
.code-header,
124+
.docblock pre > code,
125+
pre, pre > code,
126+
.item-info code,
127+
.rustdoc.source .example-wrap {
134128
color: #e6e1cf;
135129
}
136130

137131
.sidebar .current,
138-
.sidebar a:hover {
132+
.sidebar a:hover,
133+
#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
134+
#source-sidebar div.files > a:focus, details.dir-entry summary:focus,
135+
#source-sidebar div.files > a.selected {
139136
color: #ffb44c;
140137
}
141138

@@ -149,27 +146,19 @@ pre, .rustdoc.source .example-wrap {
149146
border-right: 1px solid #ffb44c;
150147
}
151148

152-
.search-results a:hover {
153-
color: #fff !important;
154-
background-color: #3c3c3c;
155-
}
156-
149+
.search-results a:hover,
157150
.search-results a:focus {
158151
color: #fff !important;
159152
background-color: #3c3c3c;
160153
}
154+
161155
.search-results a {
162156
color: #0096cf;
163157
}
164158
.search-results a div.desc {
165159
color: #c5c5c5;
166160
}
167161

168-
.sidebar h2 a,
169-
.sidebar h3 a {
170-
color: white;
171-
}
172-
173162
.result-name .primitive > i, .result-name .keyword > i {
174163
color: #788797;
175164
}
@@ -189,12 +178,3 @@ pre, .rustdoc.source .example-wrap {
189178
#settings-menu > a img {
190179
filter: invert(100);
191180
}
192-
193-
#source-sidebar > .title {
194-
color: #fff;
195-
}
196-
#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
197-
#source-sidebar div.files > a:focus, details.dir-entry summary:focus,
198-
#source-sidebar div.files > a.selected {
199-
color: #ffb44c;
200-
}

0 commit comments

Comments
 (0)