Rollup merge of #101769 - notriddle:notriddle/out-of-band-span-since, r=GuillaumeGomez

rustdoc: remove redundant CSS `.out-of-band > span.since { position }`

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`.

    a5a2f2b951/src/librustdoc/html/static/rustdoc.css (L522-L529)

 2. `<span class='since'>` was introduced in a5a2f2b951 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).

    a5a2f2b951/src/librustdoc/html/static/rustdoc.css (L637-L641)

The selector was changed in 8fc6e420d1 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 5de1391b88, so the version information is now always statically-positioned, and, as described in the commit message, "their DOM representation is consistent."
This commit is contained in:
Dylan DPC 2022-09-14 19:26:20 +05:30 committed by GitHub
commit dce471582a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1267,7 +1267,6 @@ a.test-arrow:hover {
}
.out-of-band > span.since {
position: initial;
font-size: 1.25rem;
}