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