Skip to content

rustdoc: remove no-op CSS h1-4 { color: --main-color } #101864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

notriddle
Copy link
Contributor

Headers already inherit the font color they need from their parents.

This rule dates back to earlier versions of the rustdoc theme, where headers and body had different text colors.

body {
color: #333;
font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
margin: 0;
position: relative;
padding: 10px 15px 20px 15px;
-webkit-font-feature-settings: "kern", "liga";
-moz-font-feature-settings: "kern", "liga";
font-feature-settings: "kern", "liga";
}
h1 {
font-size: 1.5em;
}
h2 {
font-size: 1.4em;
}
h3 {
font-size: 1.3em;
}
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
color: black;
font-weight: 500;
margin: 20px 0 15px 0;
padding-bottom: 6px;
}

Nowadays, since the two have exactly the same color (specified by the --main-color variable), this rule does nothing.

Headers already inherit the font color they need from their parents.

This rule dates back to earlier versions of the rustdoc theme, where headers
and body had different text colors.

https://github.com/rust-lang/rust/blob/68c15be8b5a28297ae58ea030adf49f265e41127/src/librustdoc/html/static/main.css#L72-L98

Nowadays, since the two have exactly the same color (specified by the
`--main-color` variable), this rule does nothing.
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 15, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-highfive
Copy link
Contributor

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2022
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 15, 2022

📌 Commit 7f1734c has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#101722 (Rustdoc-Json: Fix Type docs.)
 - rust-lang#101738 (Fix `#[link kind="raw-dylib"]` to respect `#[link_name]`)
 - rust-lang#101753 (Prefer explict closure sig types over expected ones)
 - rust-lang#101787 (cache `collect_trait_impl_trait_tys`)
 - rust-lang#101802 (Constify impl Fn* &(mut) Fn*)
 - rust-lang#101809 (Replace `check_missing_items.py` with `jsondoclint`)
 - rust-lang#101864 (rustdoc: remove no-op CSS `h1-4 { color: --main-color }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 18d3063 into rust-lang:master Sep 16, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 16, 2022
@notriddle notriddle deleted the notriddle/h1-h2-h3-h4 branch September 16, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants