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

Only load one CSS theme by default #106915

Merged
merged 5 commits into from Mar 10, 2023

Conversation

notriddle
Copy link
Contributor

This is a tweaked version of #103971 that uses document.write to create the stylesheet link at startup, avoiding a FOUC during page navigation. It also rebases the PR, making it work with the new hashed filenames.

Fixes #82614

Preview: http://notriddle.com/notriddle-rustdoc-demos/load-only-one-theme-v2/std/index.html

@rustbot
Copy link
Collaborator

rustbot commented Jan 15, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 15, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 15, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Looks good to me but I'll let @jsha have the final word on this.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 16, 2023
@bors
Copy link
Contributor

bors commented Jan 30, 2023

☔ The latest upstream changes (presumably #107472) made this pull request unmergeable. Please resolve the merge conflicts.

@GuillaumeGomez
Copy link
Member

Looks good to me, thanks!

@bors
Copy link
Contributor

bors commented Mar 7, 2023

☔ The latest upstream changes (presumably #108863) made this pull request unmergeable. Please resolve the merge conflicts.

@jsha
Copy link
Contributor

jsha commented Mar 8, 2023

Looks great to me. r=me with the merge conflicts resolved.

notriddle and others added 5 commits March 8, 2023 12:49
To avoid generating a FOUC at startup, this commit uses `document.write` to
load the stylesheet initially.

Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
Use NEAR check to allow one pixel difference between scroll positions.
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
@notriddle notriddle force-pushed the notriddle/load-only-one-theme branch from c9bb98c to 255fdb3 Compare March 8, 2023 19:49
@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez,jsha rollup

@bors
Copy link
Contributor

bors commented Mar 8, 2023

📌 Commit 255fdb3 has been approved by GuillaumeGomez,jsha

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 Mar 8, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#106915 (Only load one CSS theme by default)
 - rust-lang#108294 (Place binder correctly for arbitrary trait bound suggestion)
 - rust-lang#108778 (x fmt: Don't print all modified files if there's more than 10)
 - rust-lang#108854 (feat/refactor: improve errors in case of ident with number at start)
 - rust-lang#108870 (Fix invalid inlining of reexport of reexport of private item)
 - rust-lang#108917 (Consider target_family as pal)
 - rust-lang#108922 (Add auto notification for changes to stable mir)
 - rust-lang#108929 (Fix typo in span_map.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 83791f9 into rust-lang:master Mar 10, 2023
11 checks passed
@rustbot rustbot added this to the 1.70.0 milestone Mar 10, 2023
@notriddle notriddle deleted the notriddle/load-only-one-theme branch March 10, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. 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.

rustdoc: CSS for all three themes is fetched
6 participants