chrome-devtools-frontend
Version:
Chrome DevTools UI
798 lines (667 loc) • 19.2 kB
CSS
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009 Anthony Ricaud <rik@webkit.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
.timeline-toolbar-container {
display: flex;
align-items: flex-start;
flex: none;
background-color: var(--sys-color-cdt-base-container);
border-bottom: 1px solid var(--sys-color-divider);
& > :first-child {
flex: 1 1 auto;
}
}
.timeline-settings-pane {
display: grid;
grid-template-columns: 50% 50%;
flex: none;
background-color: var(--sys-color-cdt-base-container);
border-bottom: 1px solid var(--sys-color-divider);
& > div {
margin-left: 5px;
display: flex;
align-items: center;
gap: 5px;
& > select {
height: var(--sys-size-9);
min-width: var(--sys-size-14);
border: none;
}
}
}
#timeline-overview-panel {
flex: none;
position: relative;
border-bottom: 1px solid var(--sys-color-divider);
}
#timeline-overview-grid {
background-color: var(--sys-color-cdt-base-container);
}
#timeline-overview-grid .timeline-grid-header {
height: 12px;
}
#timeline-overview-grid .resources-dividers-label-bar {
pointer-events: auto;
height: 12px;
}
#timeline-overview-grid .resources-divider-label {
top: 1px;
}
.timeline-details-split {
flex: auto;
}
.timeline.panel .status-pane-container {
z-index: 1000;
display: flex;
align-items: center;
pointer-events: none;
}
.timeline.panel .status-pane-container.tinted {
background-color: var(--sys-color-cdt-base-container);
pointer-events: auto;
}
.timeline-landing-page.legacy > div > p {
flex: none;
white-space: pre-line;
line-height: 18px;
}
.popover ul {
margin: 0;
padding: 0;
list-style-type: none;
}
#memory-graphs-canvas-container {
overflow: hidden;
flex: auto;
position: relative;
.no-events-found {
position: absolute;
font: var(--sys-typescale-body4-regular);
left: var(--sys-size-5);
bottom: var(--sys-size-5);
p {
margin: 0;
}
}
}
#memory-counters-graph {
flex: auto;
}
#memory-graphs-canvas-container .memory-counter-marker {
position: absolute;
border-radius: 3px;
width: 5px;
height: 5px;
margin-left: -3px;
margin-top: -2px;
}
#memory-graphs-container .timeline-memory-header {
flex: 0 0 26px;
background-color: var(--sys-color-surface2);
border-bottom: 1px solid var(--sys-color-divider);
justify-content: space-between;
}
#memory-graphs-container .timeline-memory-header::after {
content: "";
/* stylelint-disable-next-line custom-property-pattern */
background-image: var(--image-file-toolbarResizerVertical);
background-repeat: no-repeat;
background-position: right center, center;
flex: 20px 0 0;
margin: 0 4px;
}
.timeline-memory-toolbar {
flex-shrink: 1;
}
.memory-counter-value {
margin: 8px;
}
#counter-values-bar {
flex: 0 0 20px;
border-top: solid 1px var(--sys-color-divider);
width: 100%;
overflow: hidden;
line-height: 18px;
}
.timeline-details {
vertical-align: top;
}
.timeline-details-view {
color: var(--sys-color-on-surface);
overflow: hidden;
}
.timeline-details-view-body {
flex: auto;
overflow: auto;
position: relative;
background-color: var(--sys-color-cdt-base-container);
user-select: text;
}
.timeline-details-view-block {
flex: none;
display: flex;
background-color: var(--sys-color-cdt-base-container);
flex-direction: column;
padding-bottom: 5px;
border-bottom: 1px solid var(--sys-color-divider);
}
.timeline-details-view-row {
padding-left: 10px;
min-height: 20px;
line-height: 16px; /* Vertically center text within row, important for background-color rows like .timeline-details-warning */
}
.timeline-details-view-block .timeline-details-stack-values {
flex-direction: column ; /* stylelint-disable-line declaration-no-important */
}
.timeline-details-chip-title {
font-size: 12px;
padding: 8px;
display: flex;
align-items: center;
}
.timeline-details-view-block:first-child > .timeline-details-chip-title {
font-size: 13px;
}
.timeline-details-view-row-title:not(:empty) {
color: var(--sys-color-token-subtle);
overflow: hidden;
padding-right: 10px;
display: inline-block;
vertical-align: top;
}
.timeline-details-warning {
--override-details-warning-background-color: rgb(250 209 209 / 48%);
background-color: var(--override-details-warning-background-color);
}
.theme-with-dark-background .timeline-details-warning,
:host-context(.theme-with-dark-background) .timeline-details-warning {
--override-details-warning-background-color: rgb(87 10 10 / 48%);
}
.timeline-details-warning .timeline-details-view-row-title {
color: var(--sys-color-error);
}
.timeline-details-view-row-value {
display: inline-block;
user-select: text;
text-overflow: ellipsis;
overflow: visible;
}
.timeline-details-warning .timeline-details-view-row-value {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.timeline-details-view-pie-chart-wrapper {
margin: 4px 0;
}
.timeline-details-view-pie-chart {
margin-top: 5px;
}
.timeline-flamechart {
overflow: hidden;
}
.brick-game {
background-color: var(--sys-color-neutral-container);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999; /* A high value to ensure it's on top */
}
.game-close-button {
display: flex;
align-items: center;
justify-content: center;
width: 25px;
height: 25px;
position: absolute;
right: 15px;
top: 15px;
border-radius: 50%;
cursor: pointer;
}
.scorePanel {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
white-space: pre-line;
padding: 15px;
position: absolute;
left: 15px;
bottom: 15px;
border: double 7px transparent;
border-radius: 20px;
background-origin: border-box;
background-clip: content-box, border-box;
font-weight: 200;
}
.confetti-100 {
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.confetti-100 > .confetti-100-particle {
opacity: 0%;
position: fixed;
animation: confetti-100-animation 1s none ease-out;
font-size: 30px;
}
@keyframes confetti-100-animation {
0% {
opacity: 100%;
transform: translateY(0%) translateY(0%) rotate(0deg);
}
100% {
opacity: 0%;
/* stylelint-disable-next-line custom-property-pattern */
transform: translateY(var(--to-Y)) translateX(var(--to-X)) rotate(var(--rotation));
}
}
@media (prefers-reduced-motion) {
.confetti-100 > .confetti-100-particle {
animation-name: dissolve;
}
}
.timeline-flamechart-resizer {
flex: 8px 0 0;
background-color: var(--sys-color-surface2);
border: 1px var(--sys-color-divider);
border-style: solid none;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
}
.timeline-network-resizer-disabled > .timeline-flamechart-resizer {
display: none;
}
.timeline-flamechart-resizer::after {
content: "...";
font-size: 14px;
margin-bottom: -1px;
}
.timeline-layers-view-properties table {
width: 100%;
border-collapse: collapse;
}
.timeline-layers-view-properties td {
border: 1px solid var(--sys-color-divider);
line-height: 22px;
}
.timeline-filmstrip-preview > img {
max-width: 500px;
max-height: 300px;
cursor: pointer;
border: 1px solid var(--sys-color-divider);
}
.timeline-tree-view {
display: flex;
overflow: hidden;
}
.timeline-tree-view devtools-toolbar {
background-color: var(--sys-color-cdt-base-container);
border-bottom: 1px solid var(--sys-color-divider);
}
.timeline-tree-view .data-grid {
flex: auto;
}
.timeline-tree-view .data-grid .data-container {
overflow-y: scroll;
}
.timeline-tree-view .data-grid.data-grid-fits-viewport .corner {
display: table-cell;
}
.timeline-tree-view .data-grid table.data {
background: var(--sys-color-cdt-base-container);
}
.timeline-tree-view .data-grid .odd {
background-color: var(--sys-color-surface1);
}
.timeline-tree-view .data-grid tr:hover td:not(.bottom-filler-td) {
background-color: var(--sys-color-state-hover-on-subtle);
}
.timeline-tree-view .data-grid td.numeric-column {
text-align: right;
position: relative;
}
.timeline-tree-view .data-grid div.background-bar-text {
position: relative;
z-index: 1;
}
.timeline-tree-view .data-grid span.percent-column {
color: var(--sys-color-token-subtle);
width: 45px;
display: inline-block;
}
.timeline-tree-view .data-grid tr.selected span {
color: inherit;
}
.timeline-tree-view .data-grid tr.selected {
background-color: var(--sys-color-tonal-container);
}
.timeline-tree-view .data-grid .name-container {
display: flex;
align-items: center;
}
.timeline-tree-view .data-grid .name-container .activity-icon {
width: 12px;
height: 12px;
border: 1px solid var(--divider-line);
margin: 3px 0;
}
.timeline-tree-view .data-grid .name-container .activity-icon-container {
margin-right: 3px;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
overflow: hidden;
}
.timeline-tree-view .data-grid .name-container .activity-warning::after {
content: "[deopt]";
margin: 0 4px;
line-height: 12px;
font-size: 10px;
color: var(--sys-color-state-disabled);
}
.timeline-tree-view .data-grid tr.selected .name-container .activity-warning::after {
color: var(--sys-color-on-tonal-container);
}
.timeline-tree-view .data-grid .name-container .activity-link {
flex: auto;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 5px;
}
.timeline-tree-view .data-grid .background-bar-container {
position: absolute;
/* Small gap on the left side so the first row (which has a 100% width bar, has a distinguishable bar */
inset: 0 0 0 2px;
}
.timeline-tree-view .data-grid .background-bar {
height: 18px;
background-color: var(--sys-color-surface-yellow);
border-bottom: 1px solid var(--sys-color-yellow-outline);
position: absolute;
right: 0;
}
.timeline-tree-view .data-grid .selected .background-bar {
background-color: var(--app-color-selected-progress-bar);
border-bottom: 1px solid var(--app-border-selected-progress-bar);
}
.timeline-tree-view .timeline-details-view-body .full-widget-dimmed-banner {
background-color: inherit;
}
.timeline-details .filter-input-field {
width: 120px;
}
.timeline-tree-view .data-grid thead {
height: 21px;
/* so the header is always above any body rows that the user has scrolled past */
z-index: 2;
}
.timeline-stack-view-header {
height: 27px;
background-color: var(--sys-color-cdt-base-container);
padding: 6px 10px;
color: var(--sys-color-on-surface);
white-space: nowrap;
border-bottom: 1px solid var(--sys-color-divider);
}
.timeline-landing-page {
position: absolute;
background-color: var(--sys-color-cdt-base-container);
}
.timeline-landing-page.legacy {
justify-content: center;
align-items: center;
overflow: auto;
font-size: 13px;
color: var(--sys-color-on-surface-subtle);
}
@media (forced-colors: active) {
.timeline-tree-view .data-grid .name-container .activity-icon {
forced-color-adjust: none;
}
.timeline-tree-view .data-grid tr.selected span.percent-column,
.timeline-tree-view .data-grid tr.selected div.background-bar-text span,
.timeline-tree-view .data-grid tr.selected .name-container .activity-link .devtools-link .timeline-link {
color: HighlightText;
}
.timeline-tree-view .data-grid .background-bar,
.timeline-tree-view .data-grid tr:hover td:not(.bottom-filler-td) {
background-color: transparent;
}
.timeline-tree-view .data-grid tr.selected .background-bar {
background-color: transparent;
border-bottom-color: HighlightText;
}
}
.timeline-details-range-summary {
height: 100%;
margin: var(--sys-size-4) 0;
& > devtools-performance-timeline-summary {
/* The category summary can't be more narrow than this, so we'll force a horizontal scrollbar
Also this style can't be applied on the element's :host without !important, thus its here. */
min-width: 192px;
}
}
/* Dont need to see insight chips in range summary */
.timeline-details-range-summary + devtools-related-insight-chips {
display:none;
}
.timeline-details-chip-title > div {
width: 12px;
height: 12px;
border: 1px solid var(--sys-color-divider);
display: inline-block;
margin-right: 4px;
content: " ";
}
.timeline-landing-page.legacy > div {
max-width: 450px;
margin: 10px;
}
.timeline-paint-profiler-log-split > div:last-child {
background-color: var(--color-background-elevation-1);
z-index: 0;
}
.timeline-layers-view > div:last-child,
.timeline-layers-view-properties > div:last-child {
background-color: var(--color-background-elevation-1);
}
.timeline.panel .status-pane-container > div {
pointer-events: auto;
}
.timeline-tree-view .data-grid .name-container div {
flex: none;
}
devtools-performance-third-party-tree-view {
.background-bar-container {
/* Dont need the bars in 3p table */
display: none;
}
.timeline-tree-view devtools-toolbar {
border: 0;
}
.timeline-tree-view .data-grid .odd {
background: none;
}
.timeline-tree-view .data-grid {
border-width: 0 ; /* stylelint-disable-line declaration-no-important */
th {
background-color: var(--sys-color-cdt-base-container);
font-weight: var(--ref-typeface-weight-medium);
/* Center to give some gap against sorting triangle */
text-align: center;
&.site-column {
text-align: left;
}
}
tr .numeric-column,
tr .site-column {
border-left: none;
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
/* Don't let devtools-button size mess with things */
contain: strict;
padding: 0;
line-height: 21px;
}
.bottom-filler-td,
th.sortable {
border: none;
}
tr {
height: 22px;
}
devtools-button {
display: inline-flex;
visibility: hidden;
margin: 0 8px 0 4px;
vertical-align: top;
}
tr.revealed:hover,
tr.selected {
devtools-button {
visibility: visible;
}
}
/* Default data-grid has this element on the edge of the rows,
we don't need them for the 3P table. So for now set display to none. */
.corner,
&.data-grid-fits-viewport .corner {
display: none;
}
.data-grid-resizer:hover {
background: linear-gradient(to right, transparent, transparent 2px, var(--sys-color-divider) 2px, var(--sys-color-divider) 3px, transparent 3px) no-repeat 0 0 / 100% 100%;
}
}
.widget.vbox.timeline-tree-view {
/* See column width comments in populateColumns() */
max-width: min(100%, 550px);
min-width: 350px; /* Lower than this, there's not enough room for the entity name */
padding: 0 0 0 var(--sys-size-6);
border-left: var(--sys-size-1) solid var(--sys-color-divider);
}
/* While timeline treeview name-container uses flexbox to layout, it's overkill for this table's purposes.
By not using it, we can benefit from text-overflow:ellipsis applying correctly to names and entity-badges */
.timeline-tree-view .data-grid .name-container {
display: block;
padding-left: 2px;
.activity-name {
display: inline;
}
.activity-icon-container {
display: none;
}
.entity-badge {
margin-left: var(--sys-size-4);
font-weight: var(--ref-typeface-weight-medium);
padding: 0 var(--sys-size-2);
background-color: var(--sys-color-tonal-container);
border-radius: var(--sys-shape-corner-extra-small);
height: 16px;
line-height: 16px;
font-size: var(--sys-typescale-body5-size);
display: inline-block;
}
}
}
devtools-feedback-button {
float: right;
}
devtools-toolbar {
.history-dropdown-button {
width: var(--sys-size-23);
height: var(--sys-size-9);
border-radius: var(--sys-shape-corner-extra-small);
text-align: left;
display: flex;
padding-right: var(--sys-size-5);
&:hover {
background-color: var(--sys-color-state-hover-on-subtle);
}
&:active {
background-color: var(--sys-color-state-ripple-neutral-on-subtle);
}
&:hover:active {
background:
linear-gradient(var(--sys-color-state-hover-on-subtle), var(--sys-color-state-hover-on-subtle)),
linear-gradient(var(--sys-color-state-ripple-neutral-on-subtle), var(--sys-color-state-ripple-neutral-on-subtle));
}
&:focus-visible {
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
}
&[disabled] {
pointer-events: none;
color: var(--sys-color-state-disabled);
background-color: var(--sys-color-state-disabled-container);
.content::after {
background-color: var(--sys-color-state-disabled);
}
}
& > .content {
margin-left: 5px;
padding-right: 5px;
overflow: hidden;
text-overflow: ellipsis;
flex: 1 1;
min-width: 35px;
&::after {
float: right;
user-select: none;
mask-image: var(--image-file-triangle-down);
width: 14px;
height: 14px;
content: "";
position: absolute;
background-color: var(--icon-default);
right: var(--sys-size-3);
top: var(--sys-size-3);
}
}
}
@media (forced-colors: active) {
.history-dropdown-button[disabled] {
opacity: 100%;
}
.history-dropdown-button > .content::after {
background-color: ButtonText;
}
.history-dropdown-button[disabled] > .content::after {
background-color: GrayText;
}
}
}