-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustdoc: remove redundant CSS .out-of-band > span.since { position }
#101769
Merged
bors
merged 1 commit into
rust-lang:master
from
notriddle:notriddle/out-of-band-span-since
Sep 14, 2022
Merged
rustdoc: remove redundant CSS .out-of-band > span.since { position }
#101769
bors
merged 1 commit into
rust-lang:master
from
notriddle:notriddle/out-of-band-span-since
Sep 14, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At the time this CSS was added, it was just `span.since`, because the version info could be rendered in two different ways: 1. `<div class='since'>` was used for associated items like methods. It was absolutely positioned, and the selector in rustdoc.css that targetted it was just `.since`. https://github.com/rust-lang/rust/blob/a5a2f2b951ea982a666eaf52b1874d8f1b17290b/src/librustdoc/html/static/rustdoc.css#L522-L529 2. `<span class='since'>` was introduced in a5a2f2b for page-global version info, so that it could be laid out alongside the `[-]`/`[+]` button. This CSS rule was added to override the absolute position introduced in (1). https://github.com/rust-lang/rust/blob/a5a2f2b951ea982a666eaf52b1874d8f1b17290b/src/librustdoc/html/static/rustdoc.css#L637-L641 The selector was changed in 8fc6e42 so that everything could use a `<span>` tag, but the dichotomy of the absolutely-positioned version info for associated items and the static positioned item version info remained. The absolutely positioned `.since` was changed to one nested below a `<div class="rightside">` container in 5de1391, so the version information is now always statically-positioned, and, as described in the commit message, "their DOM representation is consistent."
rustbot
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Sep 13, 2022
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
(rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 13, 2022
GuillaumeGomez
approved these changes
Sep 13, 2022
Thanks! r=me once CI pass |
@bors r=GuillaumeGomez rollup |
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 14, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 14, 2022
Rollup of 6 pull requests Successful merges: - rust-lang#101433 (Emit a note that static bounds from HRTBs are a bug) - rust-lang#101684 (smol grammar changes to README.md) - rust-lang#101769 (rustdoc: remove redundant CSS `.out-of-band > span.since { position }`) - rust-lang#101772 (Also replace the placeholder for the stable_features lint) - rust-lang#101773 (rustdoc: remove outdated CSS `.content table` etc) - rust-lang#101779 (Update test output for drop tracking) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the time this CSS was added, it was just
span.since
, because the version info could be rendered in two different ways:<div class='since'>
was used for associated items like methods. It was absolutely positioned, and the selector in rustdoc.css that targetted it was just.since
.rust/src/librustdoc/html/static/rustdoc.css
Lines 522 to 529 in a5a2f2b
<span class='since'>
was introduced in a5a2f2b for page-global version info, so that it could be laid out alongside the[-]
/[+]
button. This CSS rule was added to override the absolute position introduced in (1).rust/src/librustdoc/html/static/rustdoc.css
Lines 637 to 641 in a5a2f2b
The selector was changed in 8fc6e42 so that everything could use a
<span>
tag, but the dichotomy of the absolutely-positioned version info for associated items and the static positioned item version info remained.The absolutely positioned
.since
was changed to one nested below a<div class="rightside">
container in 5de1391, so the version information is now always statically-positioned, and, as described in the commit message, "their DOM representation is consistent."