about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-09-02 15:44:06 -0700
committerMichael Howell <michael@notriddle.com>2022-09-03 14:33:31 -0700
commitcee90dd77361406b94d8e1b8eca6bf657ba88ee5 (patch)
treea49e12270c2a71c199d29ea362240e765a21d749 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentdec689432fac6720b2f18101ac28a21add98b1b8 (diff)
downloadrust-cee90dd77361406b94d8e1b8eca6bf657ba88ee5.tar.gz
rust-cee90dd77361406b94d8e1b8eca6bf657ba88ee5.zip
rustdoc: remove `.impl-items { flex-basis }` CSS, not in flex container
Added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9

For this to actually do anything, [according to MDN] (and Firefox Dev Tools),
it must be a "flex item", which only happens if its a direct child of a node
with `display: flex` on it. It seems like it could not have worked at the time
when this rule was added, because the only items in `rustdoc.css` with
`display: flex` active were:

* `#help`

  This should not contain anything like this.

* `.impl-items h4, h4.impl, h3.impl`

  These are all headers, so they shouldn't contain `.impl-items` either.

* `.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant`

  Associated constants and methods definitely shouldn't contain a list of impl
  items, and the `.type` class seems to refer to type aliases, which, when
  shown inside of an impl, only show a link to the aliased type.

[according to MDN]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis

Nowadays, `display: flex` is a lot more prolific, but `.impl-items` still
seems to only be used in plain block parents:

* If it's not a trait impl, then it's nested below a `<div>` with an id but no
  class, added in a5216cf67d93de97091b41ecba85de2e08f39863. This will be
  `display: block`, probably. For example, [vec deref]
* Inherent impls also get a `<div>` tag, for example [vec impl], and they are
  also wrapped by their own non-flexbox `<details>` tag.
* If it's a tait implementation, then it's also nested below a `<details>`
  container, like [deref cstring].

[vec impl]: https://doc.rust-lang.org/1.63.0/std/vec/struct.Vec.html#impl
[vec deref]: https://doc.rust-lang.org/1.63.0/std/vec/struct.Vec.html#deref-methods-%5BT%5D
[deref cstring]: https://doc.rust-lang.org/1.63.0/std/ops/trait.Deref.html#impl-Deref

Also, this would imply that trait items ought to take up as much space as
possible, pushing everything else to the edge of the screen. If this is nested
directly below the `.rustdoc` container, which has a row basis, that would
be bad.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions