From f55ea418c3a85061ae681f7b8a589f41b582be7f Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 28 Sep 2022 13:52:13 -0700 Subject: [PATCH] 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]: https://github.com/necolas/normalize.css/pull/502 --- src/librustdoc/html/static/css/rustdoc.css | 21 +++++++++------------ src/librustdoc/html/static/css/settings.css | 3 ++- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 0ea6d9c38b69f..7bc8fbb1ea7e4 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -191,6 +191,7 @@ h4.code-header { position: relative; } +#crate-search, h1, h2, h3, h4, h5, h6, .sidebar, .mobile-topbar, @@ -304,16 +305,6 @@ summary { /* Fix some style changes due to normalize.css 8 */ -button, -input, -optgroup, -select, -textarea { - color: inherit; - font: inherit; - margin: 0; -} - button { /* Buttons on Safari have different default padding than other platforms. Make them the same. */ padding: 1px 6px; @@ -887,6 +878,9 @@ table, /* Removes default arrow from firefox */ text-indent: 0.01px; background-color: var(--main-background-color); + color: inherit; + line-height: 1.5; + font-weight: 500; } /* cancel stylistic differences in padding in firefox for "appearance: none"-style (or equivalent)