Skip to content

Commit 5f18c2b

Browse files
authored
Rollup merge of #102436 - notriddle:notriddle/normalize-form, r=GuillaumeGomez
rustdoc: clean up "normalize.css 8" input override CSS These rules were copied from normalize.css 3, and are mostly redundant. * `optgroup` isn't used in rustdoc at all * `textarea` is only used for the "copy" button, so it's not visible * The remaining buttons and inputs mostly have styles set anyway. * We should never be setting `color` without also setting the background to something. Otherwise, you get white-on-gray text. That seems to be [the reason] why `normalize.css` changed this. [the reason]: necolas/normalize.css#502
2 parents b6d1c15 + f55ea41 commit 5f18c2b

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

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

+9-12
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ h4.code-header {
191191
position: relative;
192192
}
193193

194+
#crate-search,
194195
h1, h2, h3, h4, h5, h6,
195196
.sidebar,
196197
.mobile-topbar,
@@ -304,16 +305,6 @@ summary {
304305

305306
/* Fix some style changes due to normalize.css 8 */
306307

307-
button,
308-
input,
309-
optgroup,
310-
select,
311-
textarea {
312-
color: inherit;
313-
font: inherit;
314-
margin: 0;
315-
}
316-
317308
button {
318309
/* Buttons on Safari have different default padding than other platforms. Make them the same. */
319310
padding: 1px 6px;
@@ -887,6 +878,9 @@ table,
887878
/* Removes default arrow from firefox */
888879
text-indent: 0.01px;
889880
background-color: var(--main-background-color);
881+
color: inherit;
882+
line-height: 1.5;
883+
font-weight: 500;
890884
}
891885
/* cancel stylistic differences in padding in firefox
892886
for "appearance: none"-style (or equivalent) <select>s */
@@ -1363,6 +1357,8 @@ pre.rust {
13631357
border: 0;
13641358
border-top: 2px solid;
13651359
flex: 1;
1360+
line-height: 1.5;
1361+
color: inherit;
13661362
}
13671363

13681364
#titles > button > div.count {
@@ -1380,7 +1376,6 @@ pre.rust {
13801376
position: sticky;
13811377
top: 0;
13821378
left: 0;
1383-
font-weight: bold;
13841379
font-size: 1.25rem;
13851380
border-bottom: 1px solid;
13861381
display: flex;
@@ -1400,6 +1395,8 @@ pre.rust {
14001395
margin-bottom: 6px;
14011396
}
14021397
#sidebar-toggle > button {
1398+
font-size: inherit;
1399+
font-weight: bold;
14031400
background: none;
14041401
color: inherit;
14051402
cursor: pointer;
@@ -1428,6 +1425,7 @@ pre.rust {
14281425
border: 1px solid var(--border-color);
14291426
border-radius: 2px;
14301427
cursor: pointer;
1428+
line-height: 1.5;
14311429
}
14321430

14331431
#settings-menu > a, #help-button > button {
@@ -1887,7 +1885,6 @@ in storage.js plus the media query with (min-width: 701px)
18871885
border-top-right-radius: 3px;
18881886
border-bottom-right-radius: 3px;
18891887
cursor: pointer;
1890-
font-weight: bold;
18911888
border: 1px solid;
18921889
border-left: 0;
18931890
}

src/librustdoc/html/static/css/settings.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
margin-right: 0.3em;
1313
height: 1.2rem;
1414
width: 1.2rem;
15-
border: 1px solid;
15+
color: inherit;
16+
border: 1px solid currentColor;
1617
outline: none;
1718
-webkit-appearance: none;
1819
cursor: pointer;

0 commit comments

Comments
 (0)