Skip to content

Commit

Permalink
Fix stacking order of profile details box.
Browse files Browse the repository at this point in the history
Previously the profile details box (displayed when clicking button
at top-right of web view), would partially overlap flame graph text.
Tweak z-index values to fix this problem.

Also, colocate all z-index CSS entries to make the stacking order
of different things easier to compare.
  • Loading branch information
ghemawat committed Jul 10, 2024
1 parent 27f5697 commit e099576
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 6 additions & 4 deletions internal/driver/html/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ a {
}
#detailsbox {
display: none;
z-index: 1;
position: fixed;
top: 40px;
right: 20px;
Expand Down Expand Up @@ -107,7 +106,6 @@ a {
}
.submenu {
display: none;
z-index: 1;
margin-top: -4px;
min-width: 10em;
position: absolute;
Expand Down Expand Up @@ -169,8 +167,6 @@ a {
top: 60px;
left: 50%;
transform: translateX(-50%);

z-index: 3;
font-size: 125%;
background-color: #ffffff;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
Expand Down Expand Up @@ -271,3 +267,9 @@ table tr td {
background-color: #ebf5fb;
font-weight: bold;
}
/* stacking order */
.boxtext { z-index: 2; } /* flame graph box text */
#current-details { z-index: 2; } /* flame graph current box info */
#detailsbox { z-index: 3; } /* profile details */
.submenu { z-index: 4; }
.dialog { z-index: 5; }
3 changes: 0 additions & 3 deletions internal/driver/html/stacks.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ body {
position: absolute;
top: 5px;
right: 5px;
z-index: 2;
font-size: 12pt;
}
/* Background of a single flame-graph frame */
Expand Down Expand Up @@ -57,8 +56,6 @@ body {
font-size: 12pt;
font-weight: bold;
}
/* Ensure that pprof menu is above boxes */
.submenu { z-index: 3; }
/* Right-click menu */
#action-menu {
max-width: 15em;
Expand Down

0 comments on commit e099576

Please sign in to comment.