Rollup merge of #119477 - lukas-code:tooltip-z-index, r=notriddle
rustdoc ui: adjust tooltip z-index to be above sidebar In https://github.com/rust-lang/rust/pull/115660 the sidebar's z-index was changed to 100. This PR changes the tooltip's z-index to 101 to be above the sidebar again. Fixes [after beta-backport] https://github.com/rust-lang/rust/issues/119472.
This commit is contained in:
commit
493792b37b
@ -14,6 +14,7 @@
|
|||||||
and on the RUSTDOC_MOBILE_BREAKPOINT */
|
and on the RUSTDOC_MOBILE_BREAKPOINT */
|
||||||
--desktop-sidebar-width: 200px;
|
--desktop-sidebar-width: 200px;
|
||||||
--src-sidebar-width: 300px;
|
--src-sidebar-width: 300px;
|
||||||
|
--desktop-sidebar-z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
|
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
|
||||||
@ -386,7 +387,7 @@ img {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 100;
|
z-index: var(--desktop-sidebar-z-index);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rustdoc.src .sidebar {
|
.rustdoc.src .sidebar {
|
||||||
@ -407,7 +408,7 @@ img {
|
|||||||
touch-action: none;
|
touch-action: none;
|
||||||
width: 9px;
|
width: 9px;
|
||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
z-index: 200;
|
z-index: calc(var(--desktop-sidebar-z-index) + 1);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
/* make sure there's a 1px gap between the scrollbar and resize handle */
|
/* make sure there's a 1px gap between the scrollbar and resize handle */
|
||||||
@ -439,7 +440,6 @@ img {
|
|||||||
|
|
||||||
.sidebar-resizing .sidebar {
|
.sidebar-resizing .sidebar {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 100;
|
|
||||||
}
|
}
|
||||||
.sidebar-resizing > body {
|
.sidebar-resizing > body {
|
||||||
padding-left: var(--resizing-sidebar-width);
|
padding-left: var(--resizing-sidebar-width);
|
||||||
@ -1046,7 +1046,7 @@ so that we can apply CSS-filters to change the arrow color in themes */
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 2;
|
z-index: calc(var(--desktop-sidebar-z-index) + 1);
|
||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
@ -1561,7 +1561,7 @@ a.tooltip:hover::after {
|
|||||||
}
|
}
|
||||||
.src #sidebar-button {
|
.src #sidebar-button {
|
||||||
left: 8px;
|
left: 8px;
|
||||||
z-index: 101;
|
z-index: calc(var(--desktop-sidebar-z-index) + 1);
|
||||||
}
|
}
|
||||||
.hide-sidebar .src #sidebar-button {
|
.hide-sidebar .src #sidebar-button {
|
||||||
position: static;
|
position: static;
|
||||||
|
12
tests/rustdoc-gui/tooltip-over-sidebar.goml
Normal file
12
tests/rustdoc-gui/tooltip-over-sidebar.goml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Check that the doctest info tooltips are above the sidebar.
|
||||||
|
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||||
|
move-cursor-to: ".example-wrap.ignore .tooltip"
|
||||||
|
wait-for: ".tooltip.popover"
|
||||||
|
|
||||||
|
// Move cursor to top left corner of the tooltip and check that it doesn't fade.
|
||||||
|
move-cursor-to: ".tooltip.popover"
|
||||||
|
wait-for: 100
|
||||||
|
assert: ".tooltip.popover:not(.fade-out)"
|
||||||
|
|
||||||
|
move-cursor-to: (0, 0)
|
||||||
|
wait-for: ".tooltip.popover.fade-out"
|
Loading…
x
Reference in New Issue
Block a user