Bug 1880488 [wpt PR 44609] - Update wpt metadata, a=testonly
[gecko.git] / devtools / client / themes / memory.css
blob23767acbcf126feba4d40b42b6926b569fc0f711
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* CSS Variables specific to this panel that aren't defined by the themes */
6 .theme-dark {
7 --cell-border-color: rgba(255,255,255,0.15);
8 --row-alt-background-color: rgba(86, 117, 185, 0.15);
9 --row-hover-background-color: rgba(86, 117, 185, 0.25);
10 --link-color: var(--blue-40);
11 --link-color-active: var(--blue-30);
14 .theme-light {
15 --cell-border-color: rgba(0,0,0,0.15);
16 --row-alt-background-color: rgba(76,158,217,0.1);
17 --row-hover-background-color: rgba(76,158,217,0.2);
18 --link-color: var(--theme-link-color);
19 --link-color-active: var(--blue-70);
22 html, body, #app, #memory-tool {
23 height: 100%;
26 #memory-tool {
27 /**
28 * Flex: contains two children: .devtools-toolbar and #memory-tool-container,
29 * which need to be laid out vertically. The toolbar has a fixed height and
30 * the container needs to flex to fill out all remaining vertical space.
32 display: flex;
33 flex-direction: column;
34 --sidebar-width: 185px;
35 /**
36 * If --heap-tree-row-height changes, be sure to change HEAP_TREE_ROW_HEIGHT
37 * in `devtools/client/memory/components/Heap.js`.
39 --heap-tree-row-height: 18px;
40 --heap-tree-header-height: 18px;
43 /**
44 * Toolbar
47 .devtools-toolbar {
48 /**
49 * Flex: contains several children, which need to be laid out horizontally,
50 * and aligned vertically in the middle of the container.
52 display: flex;
53 line-height: initial;
54 align-items: stretch;
57 .devtools-toolbar > .toolbar-group:nth-of-type(1) {
58 /**
59 * We want this to be exactly at a `--sidebar-width` distance from the
60 * toolbar's start boundary. A `.devtools-toolbar` has a 3px start padding.
62 flex: 0 0 calc(var(--sidebar-width) - 4px);
63 border-inline-end: 1px solid var(--theme-splitter-color);
64 margin-inline-end: 5px;
65 padding-right: 1px;
68 .devtools-toolbar > .toolbar-group {
69 /**
70 * Flex: contains several children, which need to be laid out horizontally,
71 * and aligned vertically in the middle of the container.
73 display: flex;
74 align-items: center;
75 flex: 1;
76 white-space: nowrap;
77 overflow: hidden;
78 text-overflow: ellipsis;
81 .devtools-toolbar > .toolbar-group > label {
82 /**
83 * Flex: contains form controls and text, which need to be laid out
84 * horizontally, vertically aligned in the middle of the container.
86 display: flex;
87 align-items: center;
88 margin-inline-end: 5px;
91 .devtools-toolbar > label {
92 margin-inline-end: 5px;
93 display: flex;
94 align-items: center;
97 .devtools-toolbar > .toolbar-text {
98 display: flex;
99 align-items: center;
102 .devtools-toolbar-select {
103 margin-inline-start: 5px;
106 #take-snapshot::before {
107 background-image: url(images/command-screenshot.svg);
110 #clear-snapshots::before {
111 background-image: url(chrome://devtools/skin/images/clear.svg);
114 #diff-snapshots::before {
115 background-image: url(chrome://devtools/skin/images/diff.svg);
118 #import-snapshot::before {
119 background-image: url(chrome://devtools/skin/images/import.svg);
122 #record-allocation-stacks-label,
123 #pop-view-button-label {
124 border-inline-end: 1px solid var(--theme-splitter-color);
125 padding-inline-end: 5px;
128 .spacer {
129 flex: 1;
132 #filter {
133 box-sizing: border-box;
134 height: 100%;
138 * Container (sidebar + main panel)
141 #memory-tool-container {
143 * Flex: contains two children: .list (sidebar) and #heap-view (main panel),
144 * which need to be laid out horizontally. The sidebar has a fixed width and
145 * the main panel needs to flex to fill out all remaining horizontal space.
147 display: flex;
149 * Flexing to fill out remaining vertical space. The preceeding sibling is
150 * the toolbar. @see #memory-tool.
152 flex: 1;
153 overflow: hidden;
157 * Sidebar
160 .list {
161 width: var(--sidebar-width);
162 min-width: var(--sidebar-width);
163 overflow-y: auto;
164 margin: 0;
165 padding: 0;
166 background-color: var(--theme-sidebar-background);
167 border-inline-end: 1px solid var(--theme-splitter-color);
170 .snapshot-list-item {
172 * Flex: contains several children, which need to be laid out vertically.
174 display: flex;
175 flex-direction: column;
176 color: var(--theme-body-color);
177 border-bottom: 1px solid var(--theme-splitter-color);
178 padding: 8px;
179 cursor: default;
182 .snapshot-list-item.selected {
183 background-color: var(--theme-selection-background);
184 color: var(--theme-selection-color);
187 .snapshot-list-item.selected ::-moz-selection {
188 background-color: var(--theme-selection-color);
189 color: var(--theme-selection-background);
192 .snapshot-list-item .snapshot-info {
193 display: flex;
194 justify-content: space-between;
195 font-size: 90%;
198 .snapshot-list-item .snapshot-title {
199 display: flex;
200 justify-content: space-between;
203 .snapshot-list-item .save {
204 text-decoration: underline;
205 cursor: pointer;
208 .snapshot-list-item .delete {
209 cursor: pointer;
210 background-color: transparent;
211 border: 0;
212 padding: 0;
213 position: relative;
214 min-height: 1em;
215 min-width: 1.3em;
216 color: currentColor;
219 .snapshot-list-item .delete::before {
220 display: block;
221 width: 16px;
222 height: 16px;
223 content: "";
224 background-image: url("chrome://devtools/skin/images/close.svg");
225 background-repeat: no-repeat;
226 -moz-context-properties: fill;
227 fill: currentColor;
230 .snapshot-list-item > .snapshot-title {
231 margin-bottom: 14px;
234 .snapshot-list-item > .snapshot-title > input[type=checkbox] {
235 margin: 0;
236 margin-inline-end: 5px;
239 .snapshot-list-item > .snapshot-state,
240 .snapshot-list-item > .snapshot-totals {
241 font-size: 90%;
242 color: var(--theme-text-color-alt);
245 .snapshot-list-item.selected > .snapshot-state,
246 .snapshot-list-item.selected > .snapshot-totals {
247 /* Text inside a selected item should not be custom colored. */
248 color: inherit !important;
252 * Main panel
255 .vbox {
256 display: flex;
257 flex-direction: column;
258 width: 100%;
259 height: 100%;
260 overflow: auto;
261 padding: 0;
262 margin: 0;
265 .vbox > * {
266 flex: 1;
269 * By default, flex items have min-width: auto;
270 * (https://drafts.csswg.org/css-flexbox/#min-size-auto)
272 min-width: 0;
275 #heap-view {
277 * Flex: contains a .heap-view-panel which needs to fill out all the
278 * available space, horizontally and vertically.
280 display: flex;
282 * Flexing to fill out remaining horizontal space. The preceeding sibling
283 * is the sidebar. @see #memory-tool-container.
285 flex: 1;
286 background-color: var(--theme-body-background);
289 * By default, flex items have min-width: auto;
290 * (https://drafts.csswg.org/css-flexbox/#min-size-auto)
292 min-width: 0;
293 font-size: 90%;
296 #heap-view > .heap-view-panel {
298 * Flex: can contain several children, including a tree with a header and
299 * multiple rows, all of which need to be laid out vertically. When the
300 * tree is visible, the header has a fixed height and tree body needs to flex
301 * to fill out all remaining vertical space.
303 display: flex;
304 flex-direction: column;
306 * Flexing to fill out remaining horizontal space. @see #heap-view.
308 flex: 1;
311 * By default, flex items have min-width: auto;
312 * (https://drafts.csswg.org/css-flexbox/#min-size-auto)
314 min-width: 0;
317 #heap-view > .heap-view-panel > .snapshot-status,
318 #heap-view > .heap-view-panel > .take-snapshot,
319 #heap-view .empty,
320 #shortest-paths-select-node-msg {
321 margin: auto;
322 margin-top: 65px;
323 font-size: 120%;
326 #heap-view > .heap-view-panel[data-state="snapshot-state-error"] pre {
327 background-color: var(--theme-body-background);
328 margin: 20px;
329 padding: 20px;
333 * Heap tree view header
336 .header {
338 * Flex: contains several span columns, all of which need to be laid out
339 * horizontally. All columns except the last one have percentage widths, and
340 * the last one needs to flex to fill out all remaining horizontal space.
342 display: flex;
343 color: var(--theme-body-color);
344 background-color: var(--theme-tab-toolbar-background);
345 border-bottom: 1px solid var(--cell-border-color);
346 flex: 0;
349 .header > span,
350 #shortest-paths-header {
351 text-overflow: ellipsis;
352 line-height: var(--heap-tree-header-height);
353 justify-content: center;
354 justify-self: center;
355 white-space: nowrap;
358 .header > span {
359 overflow: hidden;
362 .header > .heap-tree-item-name {
363 justify-content: flex-start;
366 #shortest-paths {
367 background-color: var(--theme-body-background);
368 overflow: hidden;
369 height: 100%;
370 width: 100%;
373 #shortest-paths-select-node-msg {
374 justify-self: center;
378 * Heap tree view body
381 .tree {
383 * Flexing to fill out remaining vertical space. @see .heap-view-panel
385 flex: 1;
386 overflow-y: auto;
387 background-color: var(--theme-body-background);
390 .tree-node {
391 height: var(--heap-tree-row-height);
392 line-height: var(--heap-tree-row-height);
393 cursor: default;
396 .children-pointer {
397 display: inline-block;
398 /* We use transform to reverse the icon in RTL,
399 * so `padding-right` will get reversed as well. */
400 padding-right: 5px;
403 .children-pointer:dir(rtl) {
404 transform: scaleX(-1);
408 * Heap tree view columns
411 .heap-tree-item {
413 * Flex: contains several span columns, all of which need to be laid out
414 * horizontally. All columns except the last one have percentage widths, and
415 * the last one needs to flex to fill out all remaining horizontal space.
417 display: flex;
420 .tree-node-odd {
421 background-color: var(--row-alt-background-color);
424 .tree-node:hover {
425 background-color: var(--row-hover-background-color);
428 .heap-tree-item.focused {
429 background-color: var(--theme-selection-background);
430 color: var(--theme-selection-color);
433 .heap-tree-item.focused ::-moz-selection {
434 background-color: var(--theme-selection-color);
435 color: var(--theme-selection-background);
438 .heap-tree-item-individuals,
439 .heap-tree-item-bytes,
440 .heap-tree-item-count,
441 .heap-tree-item-total-bytes,
442 .heap-tree-item-total-count {
444 * Flex: contains several subcolumns, which need to be laid out horizontally.
445 * These subcolumns may have specific widths or need to flex.
447 display: flex;
448 /* Make sure units/decimals/... are always vertically aligned to right in both LTR and RTL locales */
449 text-align: right;
450 border-inline-end: var(--cell-border-color) 1px solid;
453 .heap-tree-item-count,
454 .heap-tree-item-total-count,
455 .heap-tree-item-bytes,
456 .heap-tree-item-total-bytes {
457 width: 10%;
459 * Provision for up to 19 characters:
461 * GG_MMM_KKK_BBB_100%
462 * | ||| |
463 * '------------'|'--'
464 * 14 ch for 10s | 4 ch for the largest % we will
465 * of GB and | normally see: "100%"
466 * spaces every |
467 * 3 digits |
469 * A space between the number and percent
471 min-width: 19ch;
474 .heap-tree-item-name {
476 * Flexing to fill out remaining vertical space.
477 * @see .header and .heap-tree-item */
478 flex: 1;
479 padding-inline-start: 5px;
480 overflow: hidden;
481 text-overflow: ellipsis;
484 .heap-tree-item-name .arrow {
485 display: inline-block;
486 vertical-align: middle;
490 * Heap tree view subcolumns
493 .heap-tree-number,
494 .heap-tree-percent,
495 .heap-tree-item-name {
496 white-space: nowrap;
499 .heap-tree-number {
500 padding: 0 3px;
501 flex: 1;
502 color: var(--theme-text-color-alt);
503 /* Make sure number doesn't appear backwards on RTL locales */
504 direction: ltr;
507 .heap-tree-percent {
508 padding-inline-start: 3px;
509 padding-inline-end: 3px;
512 .heap-tree-number,
513 .heap-tree-percent {
514 font-family: var(--monospace-font-family);
517 .heap-tree-percent {
518 width: 4ch;
521 .heap-tree-item.focused .heap-tree-number,
522 .heap-tree-item.focused .heap-tree-percent {
523 color: inherit;
526 .heap-tree-item-individuals {
527 min-width: 38px;
528 overflow: hidden;
529 margin: 0;
532 .heap-tree-item-individuals > button {
533 width: 32px;
534 /* Override default styles for toolbar buttons to fix entire row height. */
535 margin: 0 auto !important;
536 color: inherit;
540 * Tree map
543 .tree-map-container {
544 width: 100%;
545 height: 100%;
546 position: relative;
547 overflow: hidden;
550 .load-more-link {
551 cursor: pointer;
552 color: var(--link-color);
555 .load-more-link:hover {
556 text-decoration: underline;
559 .load-more-link:active {
560 color: var(--link-color-active);
564 * Heap tree errors.
567 .error::before {
568 content: "";
569 display: inline-block;
570 vertical-align: -2px;
571 width: 12px;
572 height: 12px;
573 max-height: 12px;
574 margin-inline-end: 5px;
575 background-image: url(chrome://devtools/skin/images/alert-small.svg);
576 background-repeat: no-repeat;
577 background-size: contain;
578 -moz-context-properties: fill;
579 fill: var(--yellow-60);
583 * Frame View components
586 .separator,
587 .not-available,
588 .heap-tree-item-address {
589 opacity: .5;
590 margin-left: .5em;
591 margin-right: .5em;
594 .heap-tree-item-address {
595 font-family: monospace;
598 .no-allocation-stacks {
599 border-color: var(--theme-splitter-color);
600 border-style: solid;
601 border-width: 0px 0px 1px 0px;
602 text-align: center;
603 padding: 5px;
607 * Dagre-D3 graphs
610 svg {
611 --arrow-color: var(--theme-splitter-color);
612 --text-color: var(--theme-body-color);
615 .theme-dark svg {
616 --arrow-color: var(--theme-text-color-alt);
619 svg #arrowhead {
620 /* !important is needed to override inline style */
621 fill: var(--arrow-color) !important;
624 .edgePath path {
625 stroke-width: 1px;
626 fill: none;
627 stroke: var(--arrow-color);
630 g.edgeLabel rect {
631 fill: var(--theme-body-background);
634 g.edgeLabel tspan {
635 fill: var(--text-color);
638 .nodes rect {
639 stroke-width: 1px;
640 stroke: var(--theme-splitter-color);
641 fill: var(--theme-toolbar-background);
644 text {
645 font-size: 1.25em;
646 fill: var(--text-color);
647 /* Make sure text stays inside its container in RTL locales */
648 direction: ltr;