blob: 99afd0d2af72d162ea0fa9c637a4cca2a44d0ec4 [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%;
}
.filter-bar {
margin: 6px 8px;
display: flex;
column-gap: 6px;
align-items: baseline;
.pf-tag-input {
flex-grow: 1;
}
.pf-select {
flex-shrink: 0;
}
}
.pf-tag-input {
flex: 1 1 0;
min-width: 0;
max-height: 60px;
overflow-y: auto;
flex-wrap: wrap;
gap: 6px;
// Override the inner Stack to allow wrapping and add gaps
.pf-stack {
flex-wrap: wrap;
gap: 6px;
}
.pf-chip {
max-width: 200px;
min-width: auto;
}
input {
min-width: 80px;
}
}
.pf-flamegraph-filter-bar-separator {
width: 1px;
height: 24px;
background: var(--pf-color-border);
flex-shrink: 0;
margin: 0 4px;
align-self: center;
}
.pf-flamegraph-filter-label {
font-weight: 500;
flex-shrink: 0;
}
.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
}
}
.pf-filter-builder {
&.pf-popup {
min-width: 300px;
> .pf-popup-content {
padding: 12px;
}
}
&__separator {
height: 1px;
background: var(--pf-color-border);
margin: 12px 0 8px 0;
}
&__tip {
display: flex;
align-items: center;
gap: 4px;
font-size: smaller;
color: var(--pf-color-text-muted);
padding-bottom: 8px;
}
&__help {
font-size: 13px;
}
&__help-title {
font-weight: 500;
margin-bottom: 4px;
}
&__help-row {
margin: 4px 0;
}
&__desc,
&__warn,
&__hint {
font-size: smaller;
margin-bottom: 8px;
}
&__desc,
&__hint {
color: var(--pf-color-text-muted);
}
&__hint {
margin-top: 4px;
}
code {
font-family: var(--pf-font-monospace, monospace);
background: var(--pf-color-background-secondary, rgba(0, 0, 0, 0.06));
border-radius: 3px;
padding: 0 3px;
}
&__warn {
color: var(--pf-color-warning);
}
}
// 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;
}
}