Skip to content
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

Remove some unused CSS rules #101898

Merged
merged 3 commits into from
Sep 17, 2022
Merged

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Sep 16, 2022

Since we now have list of items for the ones on the page, we don't need the CSS rules anymore in the sidebar (.sidebar a). As for the .content ones, they are used to highlight the items in the page (for definitions and others). Surprisingly enough, method and tymethod are all replaced with fnname.

I also used this opportunity to remove these rules in ayu.css:

.stab.unstable {}
h2,
h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {}

In the second commit, I removed the .block a.current* CSS rules as they're overridden by .sidebar a.current* CSS rules.

In the third commit I removed unneeded empty rules (that were there to satisfy the --check-theme option).

cc @jsha
r? @notriddle

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 16, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 16, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

A change occurred in the Ayu theme.

cc @Cldfire

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2022
@GuillaumeGomez GuillaumeGomez force-pushed the rm-unused-css branch 4 times, most recently from 9db07e0 to 33680dc Compare September 16, 2022 14:13
@@ -119,9 +119,6 @@ pre, .rustdoc.source .example-wrap {
.content span.traitalias, .content a.traitalias { color: #39AFD7; }
.content span.keyword, .content a.keyword { color: #39AFD7; }

.content span.externcrate, .content span.mod, .content a.mod {
color: #39AFD7;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.content a.mod actually has an effect on the page. When I build docs with your branch, it doesn't color in the current module's name any more:

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem applies to the dark and light themes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Only .externcrate should have been removed. Updating shortly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And done.

@rust-log-analyzer

This comment has been minimized.

@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 16, 2022

📌 Commit 28956d1 has been approved by notriddle

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 16, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 16, 2022
…triddle

Remove some unused CSS rules

Since we now have list of items for the ones on the page, we don't need the CSS rules anymore in the sidebar (`.sidebar a`). As for the `.content` ones, they are used to highlight the items in the page (for definitions and others). Surprisingly enough, `method` and `tymethod` are all replaced with `fnname`.

I also used this opportunity to remove these rules in `ayu.css`:

```css
.stab.unstable {}
h2,
h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {}
```

In the second commit, I removed the `.block a.current*` CSS rules as they're overridden by `.sidebar a.current*` CSS rules.

In the third commit I removed unneeded empty rules (that were there to satisfy the `--check-theme` option).

cc `@jsha`
r? `@notriddle`
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#101340 (Adding Fuchsia zxdb debugging walkthrough to docs)
 - rust-lang#101741 (Adding needs-unwind arg to applicable compiler ui tests)
 - rust-lang#101782 (Update `symbol_mangling` diagnostics migration)
 - rust-lang#101878 (More simple formatting)
 - rust-lang#101898 (Remove some unused CSS rules)
 - rust-lang#101911 (rustdoc: remove no-op CSS on `.source .content`)
 - rust-lang#101914 (rustdoc-json-types: Document that ResolvedPath can also be a union)
 - rust-lang#101921 (Pass --cfg=bootstrap for rustdoc for proc_macro crates)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9c6ef4a into rust-lang:master Sep 17, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 17, 2022
@GuillaumeGomez GuillaumeGomez deleted the rm-unused-css branch September 17, 2022 08:38
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 17, 2022
…, r=notriddle

Continue migration of CSS themes

Now that rust-lang#101898 has been merged, we can move forward.

This PR moves more CSS theme rules as CSS variables. I also added a GUI test to prevent regressions.

Part of rust-lang#98460.

r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 17, 2022
…, r=notriddle

Continue migration of CSS themes

Now that rust-lang#101898 has been merged, we can move forward.

This PR moves more CSS theme rules as CSS variables. I also added a GUI test to prevent regressions.

Part of rust-lang#98460.

r? ``@notriddle``
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.

6 participants