webconsole.css (29093B)
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 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /* Webconsole specific theme variables */ 6 :root { 7 /* Minimum height of a message (excluding borders) */ 8 --console-row-height: 20px; 9 /* We need a unitless line-height to render formatted messages correctly. 10 * Target line-height computed value is 14px, for a 11px font-size. */ 11 --console-output-line-height: calc(14 / 11); 12 --console-output-vertical-padding: 3px; 13 /* Additional vertical padding used on the JSTerm and EagerEvaluation 14 * containers. Set to 0 to make the messages and input seamless. */ 15 --console-input-extra-padding: 2px; 16 /* Width of the left gutter where icons appear */ 17 --console-inline-start-gutter: 32px; 18 /* Icons perfectly centered in the left gutter "feel" closer to the window 19 * edge than to message text. This value pushes them slightly to the right. */ 20 --console-icon-horizontal-offset: 1px; 21 --console-warning-background: var(--theme-warning-background); 22 --console-warning-border: var(--theme-warning-border); 23 --console-warning-color: var(--theme-warning-color); 24 25 --console-input-background: light-dark(var(--theme-body-background), var(--theme-tab-toolbar-background)); 26 --console-message-background: var(--theme-body-background); 27 --console-message-border: light-dark(color-mix(in srgb, var(--grey-10), var(--grey-20)), var(--theme-splitter-color)); 28 --console-message-color: var(--theme-text-color-strong); 29 --console-error-background: var(--theme-error-background); 30 --console-error-border: var(--theme-error-border); 31 --console-error-color: var(--theme-error-color); 32 --console-navigation-color: var(--theme-highlight-blue); 33 --console-navigation-border: light-dark(var(--blue-30), var(--blue-60)); 34 --console-indent-border-color: var(--theme-highlight-blue); 35 --console-repeat-bubble-background: light-dark(var(--theme-highlight-blue), var(--blue-60)); 36 37 /* TODO in bug 1549195: colors used in shared components (e.g. Reps) should 38 be renamed and/or moved to variables.css so they work everywhere */ 39 --error-color: light-dark(var(--red-70), var(--red-20)); 40 --console-output-color: light-dark(var(--grey-90), white); 41 42 --console-tracer-dom-background: light-dark(var(--blue-55), #204e8a); 43 --console-tracer-dom-color: white; 44 } 45 46 /* General output styles */ 47 48 * { 49 box-sizing: border-box; 50 } 51 52 /* 53 * Stack messages on the z axis so that we can make their borders overlap 54 * and show color borders on top: 55 * 56 * ----------------- <-- Red 57 * Error message 58 * ----------------- <-- Red 59 * Normal message 60 * ----------------- <-- Grey 61 * 62 * and: 63 * 64 * ----------------- <-- Grey 65 * Normal message 66 * ----------------- <-- Red 67 * Error message 68 * ----------------- <-- Red 69 * 70 * The exact stacking order is: 71 * 72 * - z-index: 3 = Navigation 73 * - z-index: 2 = Errors and warnings 74 * - z-index: 1 = Other (console.log, console.info, requests, etc.) 75 */ 76 .message { 77 position: relative; 78 z-index: 1; 79 display: flex; 80 width: 100%; 81 /* Make the top border cover the previous message's bottom border */ 82 margin-top: -1px; 83 /* Min height is the target row height plus borders */ 84 min-height: calc(var(--console-row-height) + 2px); 85 border-top: 1px solid var(--console-message-border); 86 border-bottom: 1px solid var(--console-message-border); 87 /* Avoid vertical padding, so that we can draw full-height items (e.g. indent guides). 88 * Use vertical margins of --console-output-vertical-padding on children instead. */ 89 padding-block: 0; 90 /* Layout of the 32px-wide left gutter: 91 * | 4px message padding | 24px icon container | 4px icon margin | 92 * Note: on hover we show a 3px pseudo-border on top of the left padding. */ 93 padding-inline-start: 4px; 94 padding-inline-end: 8px; 95 font-size: var(--theme-code-font-size); 96 line-height: var(--console-output-line-height); 97 color: var(--console-message-color); 98 background-color: var(--console-message-background); 99 } 100 101 @media (min-width: 1000px) { 102 .message { 103 padding-inline-end: 12px; 104 } 105 } 106 107 /* Always hide the border of the first message, but keep its spacing */ 108 .message:first-child { 109 border-top-color: transparent !important; 110 } 111 112 /* We already paint a top border on jsterm-input-container (and we need to keep 113 * it when scrolling console content), so remove the last item's border. (NOTE: 114 * the last element is actually the second-to-last element when the output is 115 * scrolled all the way down, because we include an empty buffer div which 116 * grows to simulate the height of unrendered content.) */ 117 .webconsole-app:not(.jsterm-editor) .message:nth-last-child(2) { 118 border-bottom-width: 0; 119 /* Adjust the min-height since we now only have a single border. */ 120 min-height: calc(var(--console-row-height) + 1px); 121 } 122 123 /* 124 * By default, prevent any element in message to overflow. 125 * We exclude network messages as it may cause issues in the network detail panel. 126 * This makes console reflows faster (See Bug 1487457). 127 */ 128 .message:not(.network) * { 129 overflow: hidden; 130 } 131 132 .message.disabled { 133 z-index: 2; 134 opacity: 0.6; 135 } 136 137 .message.error { 138 z-index: 2; 139 color: var(--console-error-color); 140 border-color: var(--console-error-border); 141 background-color: var(--console-error-background); 142 } 143 144 .message.warn { 145 z-index: 2; 146 color: var(--console-warning-color); 147 border-color: var(--console-warning-border); 148 background-color: var(--console-warning-background); 149 } 150 151 .message.navigationMarker { 152 z-index: 3; 153 color: var(--console-navigation-color); 154 border-color: var(--console-navigation-border); 155 } 156 157 .message.startGroup, 158 .message.startGroupCollapsed { 159 --console-indent-border-color: transparent; 160 } 161 162 /* Hide border between a command and its result */ 163 .message.command + .result.log { 164 border-top-width: 0; 165 } 166 167 .message > .prefix, 168 .message > .timestamp { 169 flex: none; 170 color: var(--theme-comment); 171 margin: var(--console-output-vertical-padding) 4px; 172 } 173 174 /* Use a container query as the inline-size of the output might vary when the console is in editor mode */ 175 @container console-output (width < 500px) { 176 /* 177 * When we export messages, we mount the app as a sibling of the #app-wrapper element, 178 * in a 0-width section which would cause the timestamp to be hidden, so only hide 179 * the timestamp in the "visible" element. 180 */ 181 #app-wrapper .message > .timestamp { 182 display: none; 183 } 184 185 /** 186 * This element might have: 187 * - the message body 188 * - the repeat bubble 189 * - the location 190 * 191 * What we want here is to display the location one its own line, at the bottom of the 192 * element: 193 * +----------------------------+ 194 * | Message body | [repeat] | 195 * +----------------------------+ 196 * | location | 197 * +----------------------------+ 198 */ 199 .message:not(.message-did-catch) .message-flex-body:not(.error-note) { 200 display: grid; 201 grid-template-columns: 1fr auto; 202 row-gap: 8px; 203 } 204 205 .message-flex-body .message-location { 206 max-width: 100%; 207 grid-column: 1 / -1; 208 grid-row: 2; 209 justify-self: end; 210 } 211 } 212 213 .message > .indent { 214 flex: none; 215 display: inline-block; 216 /* Display indent borders above the message's top and bottom border. 217 * This avoids interrupted indent lines (looking like dashes). */ 218 margin-block: -1px; 219 margin-inline-start: 12px; 220 border-inline-end: solid 1px var(--console-indent-border-color); 221 } 222 223 .message > .indent.warning-indent { 224 border-inline-end-color: var(--console-warning-color); 225 /* Align the border of the message in warning groups with the toggle icon */ 226 margin-inline-start: 15px; 227 } 228 229 /* Center first level indent within the left gutter */ 230 .message[data-indent="1"]:not(.startGroup, .startGroupCollapsed) > .indent, 231 .warning-indent { 232 margin-inline-start: calc(1px + var(--console-icon-horizontal-offset)); 233 margin-inline-end: calc(11px - var(--console-icon-horizontal-offset)); 234 } 235 236 .message > .icon { 237 flex: none; 238 align-self: flex-start; 239 /* Width and height must be a multiples of 2px to avoid blurry images. 240 * Height should match the text's line-height for optimal vertical alignment */ 241 width: 14px; 242 height: 14px; 243 margin: var(--console-output-vertical-padding) 4px; 244 background-image: none; 245 background-position: center; 246 background-repeat: no-repeat; 247 background-size: 12px; 248 -moz-context-properties: fill; 249 fill: currentColor; 250 } 251 252 /* Icon on unindented row should be centered within the left gutter */ 253 .message[data-indent="0"] + .icon { 254 width: 24px; 255 margin-inline-start: var(--console-icon-horizontal-offset); 256 margin-inline-end: calc(4px - var(--console-icon-horizontal-offset)); 257 } 258 259 .message.command > .icon { 260 color: var(--theme-icon-color); 261 background-image: url(chrome://devtools/skin/images/webconsole/input.svg); 262 } 263 264 .message.result > .icon { 265 color: var(--theme-icon-dimmed-color); 266 background-image: url(chrome://devtools/skin/images/webconsole/return.svg); 267 } 268 269 .message:is(.info, .disabled) > .icon { 270 color: var(--theme-icon-color); 271 background-image: url(resource://devtools-shared-images/info-small.svg); 272 } 273 274 .message.error > .icon { 275 color: var(--theme-icon-error-color); 276 background-image: url(resource://devtools-shared-images/error-small.svg); 277 } 278 279 .message.warn > .icon { 280 color: var(--theme-icon-warning-color); 281 background-image: url(resource://devtools-shared-images/alert-small.svg); 282 } 283 284 .message.navigationMarker > .icon { 285 color: var(--console-navigation-color); 286 background-image: url(chrome://devtools/skin/images/webconsole/navigation.svg); 287 } 288 289 .message > .icon.logpoint { 290 background-image: url(chrome://devtools/content/debugger/images/webconsole-logpoint.svg); 291 -moz-context-properties: fill, stroke; 292 fill: var(--theme-graphs-purple); 293 stroke: var(--theme-graphs-purple); 294 } 295 296 .message > .icon.logtrace { 297 background-image: url(chrome://devtools/content/debugger/images/trace.svg); 298 -moz-context-properties: fill, stroke; 299 fill: var(--theme-icon-checked-color); 300 } 301 302 .message.network-message-blocked > .icon { 303 color: var(--theme-icon-error-color); 304 background-image: url(chrome://devtools/skin/images/blocked.svg); 305 } 306 307 .message > .message-body-wrapper { 308 flex: auto; 309 min-width: 0; 310 margin: var(--console-output-vertical-padding) 0; 311 } 312 313 .message-body-wrapper .elements-label { 314 color: var(--location-color); 315 margin: calc(var(--console-output-vertical-padding) * 2) 0; 316 } 317 318 /* The bubble that shows the number of times a message is repeated */ 319 .message-repeats, 320 .warning-group-badge { 321 display: inline-block; 322 flex-shrink: 0; 323 margin: 2px 5px 0 5px; 324 padding: 0 6px; 325 height: 1.25em; 326 border-radius: 40px; 327 font: message-box; 328 font-size: 0.8em; 329 font-weight: normal; 330 } 331 332 .message-repeats { 333 color: white; 334 background-color: var(--console-repeat-bubble-background); 335 } 336 337 .warning-group-badge { 338 color: var(--console-warning-background); 339 background-color: var(--console-warning-color); 340 } 341 342 :root[forced-colors-active] :is(.message-repeats, .warning-group-badge) { 343 color: Canvas; 344 background-color: CanvasText; 345 } 346 347 .message-location { 348 max-width: 40%; 349 flex-shrink: 0; 350 color: var(--theme-internal-link-color); 351 margin-left: 1ch; 352 /* Makes the file name truncated (and ellipsis shown) on the left side */ 353 direction: rtl; 354 white-space: nowrap; 355 overflow: hidden; 356 text-overflow: ellipsis; 357 text-align: end; 358 } 359 360 .message-location:empty { 361 display: none; 362 } 363 364 .message-location .frame-link-source { 365 font-style: normal !important; 366 /* Enforce LTR direction for the file name - fixes bug 1290056 */ 367 direction: ltr; 368 unicode-bidi: embed; 369 } 370 371 .message-location .frame-link-source:visited { 372 color: currentColor; 373 } 374 375 .message-location .frame-link-source:focus-visible { 376 /* 377 * The link overflow is hidden, which causes the regular outline to not be displayed. 378 * Setting a negative offset displays it "inside" the element so it's visible. 379 */ 380 outline-offset: -2px; 381 } 382 383 .message-flex-body { 384 display: flex; 385 } 386 387 .message-body { 388 white-space: pre-wrap; 389 word-wrap: break-word; 390 } 391 392 .message-flex-body > .message-body { 393 display: block; 394 flex: 1; 395 } 396 397 /* Network styles */ 398 .webconsole-app .message.network.network-message-blocked .method, 399 .webconsole-app .message.network.network-message-blocked .message-flex-body .message-body .url, 400 .webconsole-app .message.network.network-message-blocked .status { 401 color: var(--timing-blocked-color); 402 } 403 404 .webconsole-app .message.network .method { 405 flex: none; 406 margin-inline-end: 1ch; 407 } 408 409 .webconsole-app .message.network .xhr { 410 background-color: var(--theme-comment); 411 color: white; 412 border-radius: 2px; 413 font-size: 10px; 414 padding: 1px 2px; 415 margin-inline-start: 0; 416 margin-inline-end: 1ex; 417 } 418 419 .webconsole-app .message.network .message-flex-body .message-body .url { 420 color: var(--theme-comment); 421 font-style: inherit; 422 } 423 424 .webconsole-app .message.network .status { 425 color: var(--theme-highlight-blue); 426 font-style: inherit; 427 } 428 429 .webconsole-app .message.network .network-monitor .empty-notice { 430 font-size: 16px; 431 } 432 433 /* For 4XX and 5XX requests, display the text in the "error" color */ 434 .webconsole-app .message.network.error .message-flex-body .message-body .url, 435 .webconsole-app .message.network.error .message-flex-body .message-body .status { 436 color: currentColor; 437 } 438 439 .network.message .network-info { 440 display: none; 441 margin-block: 6px 2px; 442 border: solid 1px var(--theme-splitter-color); 443 } 444 445 .network.message.open .network-info { 446 display: block; 447 } 448 449 :root:dir(rtl) .network.message.open .network-info { 450 direction: rtl; 451 } 452 453 .network.message .network-info .panels { 454 min-height: 250px; 455 } 456 /* Response panel needs an absolute height size as the 457 * sizing of its content depends on it, it also needs override 458 * the inline height set on the panels */ 459 .network.message .network-info #response-panel { 460 height: 250px !important; 461 } 462 463 .network.message .network-info .accordion-item:last-child .accordion-content { 464 position: static; 465 } 466 467 .network .message-flex-body > .message-body { 468 display: flex; 469 flex-wrap: wrap; 470 align-items: baseline; 471 } 472 473 .message.network > .message-body { 474 display: flex; 475 flex-wrap: wrap; 476 } 477 478 .message.network .url { 479 flex: 1 1 auto; 480 /* Make sure the URL is very small initially, let flex change width as needed. */ 481 width: 100px; 482 min-width: 5em; 483 white-space: nowrap; 484 overflow: hidden; 485 text-overflow: ellipsis; 486 cursor: default; 487 } 488 489 .message.network .message-body .status { 490 flex: none; 491 margin-left: 1ch; 492 cursor: default; 493 } 494 495 .message.network.mixed-content .url { 496 color: var(--theme-highlight-red); 497 cursor: default; 498 } 499 500 .message .learn-more-link { 501 user-select: none; 502 color: var(--theme-link-color); 503 margin: 0 1ch; 504 } 505 506 /* Hide the headers panel toolbar buttons in the console */ 507 .message.network .headers-panel-container :is(#block-button, #edit-resend-button, .devtools-separator) { 508 display: none; 509 } 510 511 /* Override the `postion:absolute` set on the `.panel-container`, this is only needed in the 512 netmonitor to enable the use of top, right, bottom etc to support content scrolling. 513 See https://searchfox.org/mozilla-central/rev/7bafa9b9c2156018ec1d410194f9bf4b5b23e77f 514 /devtools/client/netmonitor/src/assets/styles/HeadersPanel.css#17-24. 515 The webconsole does not need that as the `.webconsole-output` is already scrollable */ 516 .message.network .headers-panel-container .panel-container { 517 position: static; 518 } 519 520 /* JSTerm Styles */ 521 html #webconsole-notificationbox { 522 flex: 0; 523 width: 100%; 524 } 525 526 .webconsole-output:empty ~ .notificationbox .notification { 527 border-top-width: 0; 528 border-bottom-width: 1px; 529 } 530 531 .jsterm-input-container { 532 position: relative; 533 max-width: 100%; 534 background-color: var(--console-input-background); 535 font-family: var(--monospace-font-family); 536 font-size: var(--theme-code-font-size); 537 line-height: var(--console-output-line-height); 538 } 539 540 /* CodeMirror-powered JsTerm */ 541 .jsterm-input-container > .CodeMirror { 542 /* aim for a 32px left space (a descendent has 4px padding) */ 543 padding-inline-start: calc(var(--console-inline-start-gutter) - 4px); 544 /* Create a new stacking context */ 545 position: relative; 546 z-index: 0; /* Keep below column resizers */ 547 /* input icon */ 548 background-image: url(chrome://devtools/skin/images/webconsole/input.svg); 549 background-position-x: calc(10px + var(--console-icon-horizontal-offset)); 550 background-position-y: 4px; 551 background-repeat: no-repeat; 552 background-size: 12px 12px; 553 -moz-context-properties: fill; 554 fill: var(--theme-icon-dimmed-color); 555 } 556 557 /* We don't want to change the color in High Contrast Mode. A proper focus indicator 558 should be added on the input */ 559 :root:not([forced-colors-active]) .jsterm-input-container > .CodeMirror-focused { 560 fill: var(--theme-icon-checked-color); 561 } 562 563 .jsterm-input-container .CodeMirror-lines { 564 padding-block: var(--console-output-vertical-padding); 565 } 566 567 .webconsole-app .cm-auto-complete-shadow-text::after { 568 content: attr(data-completion); 569 color: var(--theme-comment); 570 /* This is important for the completion text not to move while the user is typing */ 571 /* See Bugs 1491776 & 1558248 */ 572 position: absolute; 573 } 574 575 .jsterm-input-container .CodeMirror-hscrollbar { 576 /* We never want to see the horizontal scrollbar */ 577 display: none !important; 578 } 579 580 .stacktrace { 581 display: none; 582 overflow-y: auto; 583 margin-block-start: 5px; 584 margin-block-end: var(--attachment-margin-block-end); 585 padding-inline-start: 16px; 586 } 587 588 .message.open .stacktrace:not(:empty) { 589 display: block; 590 } 591 592 .objectBox-stackTrace .frames { 593 padding-inline-start: 16px; 594 } 595 596 .cm-s-mozilla a[class] { 597 text-decoration: underline; 598 text-decoration-skip-ink: none; 599 } 600 601 a.learn-more-link.webconsole-learn-more-link { 602 font-style: normal; 603 } 604 605 /* 606 This element contains the different toolbars in the console 607 - primary, containing the clear messages button and the text search input, and a 608 checkbox (Persist logs or Show Content Messages). 609 It can expand as much as it needs. 610 - close button, close the split console panel. This button will always be displayed on 611 righ-top of the toolbar. 612 - secondary, containing the filter buttons (Error, Warning, …). It's placed inside the 613 primary toolbar if there's enought space. 614 615 We have 2 different layout: 616 617 Narrow: 618 619 -------------------------------------------------------------- 620 | 🗑 - Filter Input | ✕ | 621 -------------------------------------------------------------- 622 | Error - Warning - Log - Info - Debug - CSS - Network - XHR | 623 -------------------------------------------------------------- 624 625 And wide: 626 627 -------------------------------------------------------------------------------------- 628 | 🗑 - Filter Input | Error - Warning - Log - Info - Debug - CSS - Network - XHR | ✕ | 629 -------------------------------------------------------------------------------------- 630 */ 631 .webconsole-filteringbar-wrapper { 632 display: grid; 633 grid-template-columns: 1fr auto; 634 --primary-toolbar-height: 29px; 635 } 636 637 .webconsole-filteringbar-wrapper .devtools-toolbar { 638 background-color: var(--theme-body-background); 639 } 640 641 .webconsole-filterbar-primary { 642 display: flex; 643 /* We want the toolbar (which contain the text search input) to fit 644 the content, we don't allow to shrink/overlap it */ 645 flex: 100 0 -moz-fit-content; 646 align-items: center; 647 min-height: var(--primary-toolbar-height); 648 } 649 650 .devtools-toolbar.webconsole-filterbar-secondary { 651 display: flex; 652 align-items: center; 653 align-self: stretch; 654 user-select: none; 655 grid-column: 1 / -1; 656 min-height: var(--primary-toolbar-height); 657 } 658 659 .devtools-toolbar.webconsole-filterbar-secondary .devtools-separator { 660 margin-inline: 5px; 661 } 662 663 .webconsole-filterbar-primary .devtools-togglebutton { 664 font-variant-numeric: tabular-nums; 665 } 666 667 .split-console-close-button-wrapper { 668 min-height: var(--primary-toolbar-height); 669 /* We will need to display the close button in the right-top always. */ 670 grid-column: -1 / -2; 671 grid-row: 1 / 2; 672 padding-inline-end: 0; 673 } 674 675 /* On OSX the cursor turns into a window-resizing cursor at the edges of the 676 * window, so bring the end of the close button in. */ 677 :root[platform="mac"] .split-console-close-button-wrapper, 678 :root[platform="mac"] .webconsole-sidebar-toolbar { 679 padding-inline-end: 2px; 680 } 681 682 #split-console-close-button { 683 height: 100%; 684 margin: 0; 685 } 686 687 #split-console-close-button::before { 688 background-image: url(chrome://devtools/skin/images/close.svg); 689 } 690 691 .webconsole-filterbar-primary .devtools-searchbox { 692 align-self: stretch; 693 /* Prevent the filter height from devtools-searchbox */ 694 height: unset; 695 flex: 1 1 100%; 696 margin-inline-start: 1px; 697 /* It's important to keep this in px as it's used in JS to control the display mode 698 * of the filter toolbar. */ 699 min-width: 150px; 700 701 /* High Contrast Mode */ 702 :root[forced-colors-active] & { 703 /* Don't stretch so there is room around the input to show the borders 704 and the focus indicator */ 705 align-self: unset; 706 outline-offset: 0; 707 } 708 } 709 710 /* We always render the "X hidden" element in the filter bar for accessibility. 711 But when the filter input is not focused, or empty, and there is no filtered messages, 712 we don't want to display it as it provides little value 713 */ 714 .webconsole-filterbar-primary[data-has-filtered-by-text="false"] .devtools-searchbox input:is(:not(:focus), :empty) ~ #devtools-console-output-filter-summary { 715 display: none; 716 } 717 718 /* Special casing String reps, and warning/error string colors 719 * so they are legible */ 720 .message .message-body > .objectBox-string, 721 .message.error .objectBox-string, 722 .message.warn .objectBox-string { 723 color: inherit; 724 } 725 726 /* Special casing dark-theme error and warning ObjectInspector colors */ 727 .theme-dark .message.error .tree.object-inspector .object-label, 728 .theme-dark .message.error .tree.object-inspector .object-label *, 729 .theme-dark .message.warn .tree.object-inspector .object-label, 730 .theme-dark .message.warn .tree.object-inspector .object-label *, 731 .theme-dark .message.error .objectLeftBrace, 732 .theme-dark .message.error .objectRightBrace, 733 .theme-dark .message.error .arrayLeftBracket, 734 .theme-dark .message.error .arrayRightBracket, 735 .theme-dark .message.warn .objectLeftBrace, 736 .theme-dark .message.warn .objectRightBrace, 737 .theme-dark .message.warn .arrayLeftBracket, 738 .theme-dark .message.warn .arrayRightBracket { 739 color: var(--theme-body-color); 740 } 741 .theme-dark .message.error .tree.object-inspector, 742 .theme-dark .message.warn .tree.object-inspector { 743 --console-indent-border-color: var(--theme-body-color); 744 } 745 746 .webconsole-app .message-flex-body > .message-body { 747 overflow: hidden; 748 } 749 750 .webconsole-app .message-body > * { 751 flex-shrink: 0; 752 vertical-align: top; 753 } 754 755 .message.startGroup .message-body > .objectBox-string, 756 .message.startGroupCollapsed .message-body > .objectBox-string { 757 color: var(--theme-body-color); 758 font-weight: bold; 759 } 760 761 /* Prefix text that can be set by ConsoleAPI option */ 762 .webconsole-app .console-message-prefix { 763 color: var(--theme-comment); 764 } 765 766 /* Styles for JavaScript Tracer messages */ 767 .webconsole-app :is(.jstracer-dom-event, .jstracer-dom-mutation, .jstracer-implementation) { 768 padding-inline: 4px; 769 margin-inline: 2px; 770 } 771 .webconsole-app .jstracer-dom-event { 772 background-color: var(--console-tracer-dom-background); 773 color: var(--console-tracer-dom-color); 774 } 775 .webconsole-app .jstracer-dom-mutation { 776 background-color: var(--console-tracer-dom-background); 777 color: var(--console-tracer-dom-color); 778 margin-inline-end: 4px; 779 } 780 .webconsole-app .jstracer-implementation { 781 background-color: var(--theme-toolbarbutton-checked-hover-background); 782 color: var(--theme-toolbarbutton-checked-hover-color); 783 } 784 .webconsole-app .jstracer-display-name { 785 color: var(--theme-highlight-blue); 786 margin-inline: 2px; 787 } 788 789 .webconsole-app .jstracer-io { 790 color: var(--theme-comment); 791 } 792 793 .webconsole-app .jstracer-exit-frame-reason { 794 color: var(--theme-highlight-red); 795 } 796 797 /* console.table() */ 798 .message .consoletable-wrapper { 799 --consoletable-border: var(--theme-splitter-color); 800 801 max-height: 250px; 802 overflow: auto; 803 position: relative; 804 padding: 0; 805 margin-block-end: var(--attachment-margin-block-end); 806 border: 1px solid var(--consoletable-border); 807 } 808 809 .message .consoletable { 810 width: 100%; 811 margin: 0; 812 color: var(--theme-body-color); 813 border-spacing: 0; 814 } 815 816 .consoletable :is(th, td) { 817 border: 0 solid var(--consoletable-border); 818 text-overflow: ellipsis; 819 } 820 821 .consoletable :is(th, td) + :is(th, td) { 822 border-inline-start-width: 1px; 823 } 824 825 .consoletable th { 826 position: sticky; 827 top: 0; 828 background-color: var(--theme-toolbar-background); 829 color: var(--theme-body-color); 830 border-block-end-width: 1px; 831 margin: 0; 832 padding: 5px 4px; 833 font-weight: inherit; 834 } 835 836 .consoletable td { 837 background-color: var(--theme-body-background); 838 color: var(--theme-body-color); 839 padding: 3px 4px; 840 font-variant-numeric: tabular-nums; 841 } 842 843 .consoletable tr:nth-child(even) td { 844 background-color: var(--table-zebra-background); 845 } 846 847 /* Simple Table */ 848 .message .simple-table { 849 width: 100%; 850 border-collapse: collapse; 851 --simpletable-border: var(--theme-splitter-color); 852 margin-block-end: var(--attachment-margin-block-end); 853 color: var(--theme-body-color); 854 text-align: left; 855 max-height: 250px; 856 overflow-y: auto; 857 border: 1px solid var(--simpletable-border); 858 table-layout: fixed; 859 margin-top: 3px; 860 } 861 862 .simple-table-header { 863 background-color: var(--theme-toolbar-background); 864 text-overflow: ellipsis; 865 border-bottom: 1px solid var(--simpletable-border); 866 } 867 868 .simple-table-header > th { 869 padding: 5px 4px; 870 font-weight: inherit; 871 } 872 873 .simple-table-header > th:nth-child(odd) { 874 width: 10%; 875 } 876 877 .simple-table td { 878 padding: 3px 4px; 879 text-overflow: ellipsis; 880 border-left: 1px solid var(--simpletable-border); 881 } 882 883 .simple-table td:nth-child(2n) span { 884 color: var(--theme-body-color); 885 } 886 887 .simple-table tr:nth-child(even) { 888 background-color: var(--table-zebra-background); 889 } 890 891 /* Object Inspector */ 892 .webconsole-app .object-inspector.tree { 893 display: inline-block; 894 max-width: 100%; 895 } 896 897 .webconsole-app .object-inspector.tree .tree-indent { 898 border-inline-start-color: var(--console-indent-border-color); 899 } 900 901 .webconsole-app .object-inspector.tree .tree-node:hover:not(.focused), 902 /* also disable the highlight on the arrow expand */ 903 .webconsole-app .object-inspector.tree .tree-node:hover:not(.focused) .theme-twisty { 904 background-color: var(--object-inspector-hover-background); 905 } 906 907 /* In RTL the tree arrows should usually point to the left, but in 908 this context it should point to the right. 909 This overrides the detault rules set on .theme-twisty. */ 910 .webconsole-app .tree .theme-twisty:dir(rtl):not(.open), 911 .webconsole-app .object-inspector .tree-node .theme-twisty:dir(rtl):not(.open) { 912 transform: rotate(-90deg); 913 } 914 915 /* 916 * Make console.group, exception and XHR message's arrow look the same as the arrow 917 * used in the ObjectInspector (same background-image, width, transition). 918 * Properties were copied from devtools/client/shared/components/reps/reps.css. 919 */ 920 .collapse-button { 921 flex: none; 922 align-self: flex-start; 923 margin-block-start: calc(var(--console-output-vertical-padding) - 1px); 924 margin-inline-start: -4px; 925 padding: 3px; 926 border: none; 927 color: var(--theme-icon-dimmed-color); 928 background: transparent; 929 } 930 931 .collapse-button::before { 932 content: ""; 933 display: block; 934 width: 10px; 935 height: 10px; 936 background: url("chrome://devtools/skin/images/arrow.svg") no-repeat center; 937 background-size: 10px; 938 transform: rotate(-90deg); 939 transition: transform 125ms ease; 940 -moz-context-properties: fill; 941 fill: currentColor; 942 } 943 944 /* Align console.group messages with the border they create for their "children" messages */ 945 .indent ~ .collapse-button { 946 margin-inline-start: 3px; 947 } 948 949 .collapse-button[aria-expanded="true"]::before { 950 transform: rotate(0); 951 } 952 953 /* Hide the icon, so that we can use the collapse-button in its place */ 954 .message.network:not(:where(.network-message-blocked, .disabled)) > .icon, 955 .message.startGroup > .icon, 956 .message.startGroupCollapsed > .icon { 957 display: none; 958 } 959 960 /* Center the collapse button in the left gutter (first-level only) */ 961 .message.network > .collapse-button, 962 .message:is(.startGroup, .startGroupCollapsed)[data-indent="0"] > .collapse-button { 963 width: 24px; 964 margin-inline-start: var(--console-icon-horizontal-offset); 965 margin-inline-end: calc(4px - var(--console-icon-horizontal-offset)); 966 } 967 968 /* Use a bigger arrow that is visually similar to other icons (10px) */ 969 .message.network > .collapse-button::before, 970 .message:is(.startGroup, .startGroupCollapsed)[data-indent="0"] > .collapse-button::before { 971 width: 100%; 972 background-image: url("chrome://devtools/skin/images/arrow-big.svg"); 973 fill: var(--theme-icon-dimmed-color); 974 } 975 976 /** Utils **/ 977 .clipboard-only { 978 position: absolute; 979 left: -9999px; 980 width: 0; 981 height: 0; 982 } 983 984 .lazy-message-list-top, 985 .lazy-message-list-bottom { 986 overflow-anchor: none; 987 pointer-events: none; 988 user-select: none; 989 padding: 0; 990 margin: 0; 991 border: none; 992 }