Skip to content

Commit fe6062f

Browse files
authored
Rollup merge of #99237 - GuillaumeGomez:rustdoc-css-cleanup, r=notriddle
removed unused CSS and unused HTML IDs I think that should cover most remaining unused CSS/HTML IDs. r? `@notriddle`
2 parents 7b63058 + 4580668 commit fe6062f

File tree

5 files changed

+6
-48
lines changed

5 files changed

+6
-48
lines changed

src/librustdoc/html/markdown.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,6 @@ static DEFAULT_ID_MAP: Lazy<FxHashMap<Cow<'static, str>, usize>> = Lazy::new(||
14421442
fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> {
14431443
let mut map = FxHashMap::default();
14441444
// This is the list of IDs used in Javascript.
1445-
map.insert("help".into(), 1);
14461445
map.insert("settings".into(), 1);
14471446
map.insert("not-displayed".into(), 1);
14481447
map.insert("alternative-display".into(), 1);
@@ -1455,7 +1454,6 @@ fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> {
14551454
map.insert("help-button".into(), 1);
14561455
map.insert("main-content".into(), 1);
14571456
map.insert("crate-search".into(), 1);
1458-
map.insert("render-detail".into(), 1);
14591457
map.insert("toggle-all-docs".into(), 1);
14601458
map.insert("all-types".into(), 1);
14611459
map.insert("default-settings".into(), 1);

src/librustdoc/html/static/css/rustdoc.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -1733,13 +1733,12 @@ details.rustdoc-toggle[open] > summary.hideme > span {
17331733
display: none;
17341734
}
17351735

1736-
details.undocumented[open] > summary::before,
17371736
details.rustdoc-toggle[open] > summary::before,
17381737
details.rustdoc-toggle[open] > summary.hideme::before {
17391738
background-image: /* AUTOREPLACE: */url("toggle-minus.svg");
17401739
}
17411740

1742-
details.undocumented > summary::before, details.rustdoc-toggle > summary::before {
1741+
details.rustdoc-toggle > summary::before {
17431742
background-image: /* AUTOREPLACE: */url("toggle-plus.svg");
17441743
}
17451744

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

+2-15
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,11 @@ body.source .example-wrap pre.rust a {
174174
}
175175

176176
details.rustdoc-toggle > summary.hideme > span,
177-
details.rustdoc-toggle > summary::before,
178-
details.undocumented > summary::before {
177+
details.rustdoc-toggle > summary::before {
179178
color: #999;
180179
}
181180

182-
details.rustdoc-toggle > summary::before,
183-
details.undocumented > summary::before {
181+
details.rustdoc-toggle > summary::before {
184182
filter: invert(100%);
185183
}
186184

@@ -218,17 +216,6 @@ details.undocumented > summary::before {
218216
background: none;
219217
}
220218

221-
#help > div {
222-
background: #14191f;
223-
box-shadow: 0px 6px 20px 0px black;
224-
border: none;
225-
border-radius: 4px;
226-
}
227-
228-
#help span.bottom, #help span.top {
229-
border-color: #5c6773;
230-
}
231-
232219
.rightside,
233220
.out-of-band {
234221
color: grey;

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

+2-18
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,11 @@ body.source .example-wrap pre.rust a {
148148
}
149149

150150
details.rustdoc-toggle > summary.hideme > span,
151-
details.rustdoc-toggle > summary::before,
152-
details.undocumented > summary::before {
151+
details.rustdoc-toggle > summary::before {
153152
color: #999;
154153
}
155154

156-
details.rustdoc-toggle > summary::before,
157-
details.undocumented > summary::before {
155+
details.rustdoc-toggle > summary::before {
158156
filter: invert(100%);
159157
}
160158

@@ -179,20 +177,6 @@ details.undocumented > summary::before {
179177
.stab.portability { background: #F3DFFF; border-color: #b07bdb; color: #2f2f2f; }
180178
.stab.portability > code { background: none; }
181179

182-
#help > div {
183-
background: #4d4d4d;
184-
border-color: #bfbfbf;
185-
}
186-
187-
#help span.bottom, #help span.top {
188-
border-color: #bfbfbf;
189-
}
190-
191-
#help dt {
192-
border-color: #bfbfbf;
193-
background: rgba(0,0,0,0);
194-
}
195-
196180
.rightside,
197181
.out-of-band {
198182
color: grey;

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

+1-11
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ body.source .example-wrap pre.rust a {
140140
}
141141

142142
details.rustdoc-toggle > summary.hideme > span,
143-
details.rustdoc-toggle > summary::before,
144-
details.undocumented > summary::before {
143+
details.rustdoc-toggle > summary::before {
145144
color: #999;
146145
}
147146

@@ -161,15 +160,6 @@ details.undocumented > summary::before {
161160
.stab.portability { background: #F3DFFF; border-color: #b07bdb; }
162161
.stab.portability > code { background: none; }
163162

164-
#help > div {
165-
background: #e9e9e9;
166-
border-color: #bfbfbf;
167-
}
168-
169-
#help span.bottom, #help span.top {
170-
border-color: #bfbfbf;
171-
}
172-
173163
.rightside,
174164
.out-of-band {
175165
color: grey;

0 commit comments

Comments
 (0)