Commit 6132993
authored
Rollup merge of rust-lang#106462 - notriddle:notriddle/logo-container-sidebar, r=GuillaumeGomez
rustdoc: remove unnecessary wrapper around sidebar and mobile logos
This commit changes `.sidebar a:hover:not(.logo-container)` to add the `:not()` pseudo-class, retaining the old appearance of the logo when mousing over it.
This didn't used to be necessary because the `a.sidebar-logo` was `display:inline`, and was what got the `background` changed on hover, while the `div.logo-container` inside it was `display:block`. This resulted in the hover rule not having any effect, because the logo-container box was not actually nested inside the sidebar-logo box:
https://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level
> When an inline box contains an in-flow block-level box, the inline box (and its inline ancestors within the same line box) are broken around the block-level box (and any block-level siblings that are consecutive or separated only by collapsible whitespace and/or out-of-flow elements), splitting the inline box into two boxes (even if either side is empty), one on each side of the block-level box(es). The line boxes before the break and after the break are enclosed in anonymous block boxes, and the block-level box becomes a sibling of those anonymous boxes. When such an inline box is affected by relative positioning, any resulting translation also affects the block-level box contained in the inline box.File tree
2 files changed
+15
-18
lines changed- src/librustdoc/html
- static/css
- templates
2 files changed
+15
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
| |||
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
498 | | - | |
| 499 | + | |
499 | 500 | | |
500 | 501 | | |
501 | 502 | | |
| |||
1570 | 1571 | | |
1571 | 1572 | | |
1572 | 1573 | | |
1573 | | - | |
| 1574 | + | |
1574 | 1575 | | |
1575 | 1576 | | |
1576 | 1577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
| |||
0 commit comments