blob: 9825e742446412627b411fbb30194194fdcb1712 [file] [edit]
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
.pf-flamegraph {
height: 100%;
overflow-y: hidden;
.loading-container {
font-size: larger;
display: flex;
align-items: baseline;
justify-content: center;
height: 100%;
}
.popup-anchor {
width: 0px;
height: 0px;
position: absolute;
}
canvas {
user-select: none;
}
.canvas-container {
height: 100%;
position: relative;
overflow-y: auto;
}
.pf-virtual-canvas {
height: 100%;
}
}
.pf-flamegraph-tooltip-popup {
width: max-content;
font-size: 15px;
display: flex;
flex-direction: column;
padding: 4px;
.tooltip-text-line {
display: flex;
cursor: text;
padding-top: 4px;
gap: 4px;
}
.tooltip-text {
cursor: text;
}
.tooltip-bold-text {
font-weight: 600;
cursor: text;
}
.pf-button-bar {
padding-top: 16px;
}
.tooltip-marker-text {
font-size: var(--pf-font-size-s);
font-style: italic;
color: var(--pf-color-text-muted);
padding-bottom: 4px; // Extra gap between marker and function name
}
}
// All category buttons share the width of the widest one: equal 1fr columns in
// a grid sized to its content (width: max-content), so the bar shrink-wraps
// instead of stretching the buttons to fill a wider tooltip.
.pf-button-bar.pf-flamegraph-action-bar {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 1fr;
width: max-content;
gap: 8px;
margin-top: 6px;
> .pf-button {
justify-content: center;
}
}
// Compound selector overrides .pf-popup's own max-width.
.pf-flamegraph-action-menu.pf-popup {
max-width: 460px;
}
.pf-flamegraph-action-menu {
.pf-menu {
// Drop the default vertical margin so item hover reaches the popup edges.
margin: 0;
max-height: min(60vh, 480px);
overflow-y: auto;
// overflow-y:auto also implies overflow-x:auto; pin it off to avoid a
// spurious horizontal scrollbar.
overflow-x: hidden;
}
// Let items shrink so descriptions wrap instead of widening the popup.
.pf-menu-item {
min-width: 0;
}
}
// Rendered in a popup portal outside .pf-flamegraph, hence a top-level selector.
.pf-flamegraph-action {
display: flex;
flex-direction: column;
min-width: 0;
&__title {
white-space: normal;
overflow-wrap: anywhere;
line-height: 1.3;
}
&__desc {
font-size: smaller;
color: var(--pf-color-text-muted);
white-space: normal;
overflow-wrap: anywhere;
line-height: 1.25;
}
&__aka {
font-style: italic;
}
}