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
|
/* 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/. */
/* CSS Variables specific to this panel that aren't defined by the themes */
:root {
--rule-highlight-background-color: var(--theme-highlight-yellow);
--rule-highlight-propertyname: var(--blue-60);
--rule-highlight-propertyvalue: var(--magenta-70);
--rule-highlight-unmatched-unused-color: var(--grey-55);
--rule-header-background-color: var(--theme-toolbar-background);
--rule-computed-margin-inline-start: 35px;
--rule-enableproperty-size: 12px;
--rule-enableproperty-margin-inline-start: 3px;
--rule-enableproperty-margin-inline-end: 9px;
&:is([platform="win"], [platform="linux"]) {
--rule-enableproperty-size: 14px;
/* it's important to keep the px unit here as this is used in a `calc()` */
--rule-enableproperty-margin-inline-start: 0px;
--rule-enableproperty-margin-inline-end: 10px;
}
}
:root.theme-dark {
--rule-highlight-background-color: #521C76;
--rule-highlight-propertyname: var(--theme-highlight-blue);
--rule-highlight-propertyvalue: var(--theme-highlight-red);
--rule-highlight-unmatched-unused-color: var(--grey-40);
--rule-header-background-color: #222225;
}
/* Rule View Tabpanel */
#sidebar-panel-ruleview {
margin: 0;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
/* Override the min-width from .inspector-tabpanel, as the rule panel can support small
widths */
min-width: 100px;
}
/* Rule View Toolbar */
#ruleview-toolbar-container {
line-height: var(--theme-toolbar-height);
}
#ruleview-toolbar {
flex-wrap: wrap;
height: auto;
}
#ruleview-toolbar .devtools-searchbox {
flex-basis: 7em;
height: var(--theme-toolbar-height);
}
#ruleview-command-toolbar {
display: flex;
}
.ruleview-reveal-panel {
border-bottom: 1px solid var(--theme-splitter-color);
display: flex;
overflow: hidden;
flex-wrap: wrap;
margin: 2px;
}
.ruleview-reveal-panel[hidden] {
display: none;
}
.ruleview-reveal-panel .add-class {
height: var(--theme-toolbar-height);
line-height: normal;
}
.ruleview-reveal-panel label {
user-select: none;
display: flex;
align-items: center;
}
#pseudo-class-panel,
#ruleview-class-panel .classes {
padding: 0 3px;
}
/* Pseudo Class toggle panel */
#pseudo-class-panel {
grid-template-columns: repeat(auto-fit, minmax(100px, max-content));
}
#pseudo-class-panel:not([hidden]) {
display: grid;
}
/* Class toggle panel */
#ruleview-class-panel {
flex-direction: column;
}
#ruleview-class-panel .classes {
border-top: 1px solid var(--theme-splitter-color);
display: flex;
flex-direction: row;
flex-wrap: wrap;
max-height: 100px;
overflow-y: auto;
}
#ruleview-class-panel .classes label {
flex: 0 0;
max-width: 50%;
min-width: 100px;
}
#ruleview-class-panel .classes label span {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
#ruleview-class-panel .no-classes {
flex: 1;
color: var(--theme-text-color-inactive);
margin: 0;
text-align: center;
}
/* Rule View Container */
#ruleview-container {
user-select: text;
overflow: auto;
flex: auto;
height: 100%;
/* Adjust outline so it's visible */
outline-offset: -2px;
}
/* This extra wrapper only serves as a way to get the content of the view focusable.
So that when the user reaches it either via keyboard or mouse, we know that the view
is focused and therefore can handle shortcuts.
However, for accessibility reasons, tabindex is set to -1 to avoid having to tab
through it, and the outline is hidden. */
#ruleview-container-focusable {
height: 100%;
outline: none;
}
#ruleview-container.non-interactive {
pointer-events: none;
visibility: collapse;
transition: visibility 0.25s;
}
#ruleview-container .accordion ._content {
padding: 0;
}
.ruleview-property:not(:hover) > .ruleview-enableproperty {
pointer-events: none;
}
.ruleview-expandable-container {
display: block;
}
.ruleview-namecontainer {
cursor: text;
}
.ruleview-computed {
margin-inline-start: var(--rule-computed-margin-inline-start);
/* Add a small indent for wrapping lines */
text-indent: 1em hanging;
}
.ruleview-computed > .ruleview-namecontainer {
margin: 0;
}
.ruleview-propertyvaluecontainer {
cursor: text;
padding-right: 5px;
}
.ruleview-propertyvaluecontainer a {
color: var(--theme-highlight-purple);
cursor: pointer;
}
.ruleview-computedlist,
.ruleview-expandable-container[hidden],
.ruleview-overridden-items[hidden],
.ruleview-overridden-rule-filter[hidden],
.ruleview-warning[hidden],
.ruleview-unused-warning[hidden],
.ruleview-compatibility-warning[hidden],
.ruleview-used[hidden],
.ruleview-overridden .ruleview-grid {
display: none;
}
.ruleview-computedlist[user-open],
.ruleview-computedlist[filter-open],
.ruleview-overridden-items {
display: block;
}
.ruleview-rule-source {
text-align: end;
float: right;
max-width: 100%;
/* Force RTL direction to crop the source link at the beginning. */
direction: rtl;
overflow: hidden;
text-overflow: ellipsis;
user-select: none;
margin-bottom: 2px;
margin-left: 1ch;
}
.ruleview-rule-source-label {
white-space: nowrap;
margin: 0;
cursor: pointer;
/* Create an LTR embed to avoid special characters being shifted to the start due to the
parent node direction: rtl; */
direction: ltr;
unicode-bidi: embed
}
.ruleview-rule-source.disabled > .ruleview-rule-source-label,
.ruleview-rule-source[unselectable] > .ruleview-rule-source-label {
cursor: default;
}
.ruleview-rule-source:not([unselectable]) {
text-decoration: underline;
text-decoration-skip-ink: none;
}
.ruleview-header {
--ruleview-header-padding: 4px;
background: var(--rule-header-background-color);
border-bottom: 1px solid var(--theme-splitter-color);
color: var(--theme-toolbar-color);
font-size: 12px;
line-height: 16px;
padding: var(--ruleview-header-padding);
width: 100%;
align-items: center;
display: flex;
user-select: none;
}
.ruleview-expandable-header {
cursor: pointer;
/* Reset padding set on ruleview-header since we're going to put it on the button instead */
padding: 0;
&:hover {
background-color: var(--theme-accordion-header-hover);
}
& button[aria-expanded] {
display: flex;
/* Space between arrow and label */
gap: 2px;
width: 100%;
padding: var(--ruleview-header-padding);
/* Reset button-specific styles */
background-color: transparent;
border: none;
text-align: start;
/* Apply same font-size as set on ruleview-header */
font-size: 1em;
outline-offset: -2px;
&[aria-expanded="true"] .theme-twisty {
rotate: 90deg;
}
}
}
.ruleview-rule-pseudo-element {
padding-left: 20px;
border-left: solid 10px;
}
.ruleview-rule {
border-bottom: 1px solid var(--theme-splitter-color);
padding: 2px 4px;
direction: ltr;
}
#ruleview-container-focusable > .ruleview-rule:last-child {
border-bottom: none;
}
/**
* Display rules that don't match the current selected element and uneditable
* user agent styles differently
*/
.ruleview-rule.unmatched,
.ruleview-rule.uneditable,
.ruleview-rule[unmatched=true],
.ruleview-rule[uneditable=true] {
background: var(--theme-tab-toolbar-background);
}
.ruleview-rule.unmatched,
.ruleview-rule[unmatched=true] {
opacity: 0.5;
}
.ruleview-rule.uneditable :focus,
.ruleview-rule[uneditable=true] :focus {
outline: none;
}
.ruleview-rule.uneditable .theme-link,
.ruleview-rule[uneditable=true] .theme-link {
color: var(--theme-highlight-bluegrey);
}
.ruleview-rule.uneditable .ruleview-enableproperty,
.ruleview-rule[uneditable=true] .ruleview-enableproperty {
visibility: hidden;
}
.ruleview-rule.uneditable .ruleview-swatch,
.ruleview-rule[uneditable=true] .ruleview-swatch {
cursor: default;
}
.ruleview-rule.uneditable .ruleview-namecontainer > .ruleview-propertyname,
.ruleview-rule.uneditable .ruleview-propertyvaluecontainer >
.ruleview-propertyvalue,
.ruleview-rule[uneditable=true] .ruleview-namecontainer > .ruleview-propertyname,
.ruleview-rule[uneditable=true] .ruleview-propertyvaluecontainer >
.ruleview-propertyvalue {
border-bottom-color: transparent;
}
.ruleview-overridden-rule-filter {
display: inline-block;
width: 14px;
height: 14px;
margin-inline-start: 3px;
background-image: url(chrome://devtools/skin/images/filter-small.svg);
background-position: center;
background-repeat: no-repeat;
background-size: 12px;
-moz-context-properties: fill;
fill: var(--theme-icon-dimmed-color);
background-color: transparent;
border: none;
&:is(:hover, :focus-visible) {
fill: var(--theme-icon-color);
}
}
.ruleview-ruleopen {
padding-inline-end: 5px;
}
.ruleview-ruleclose {
clear: both;
cursor: text;
padding-right: 20px;
}
.ruleview-ancestor-ruleopen,
.ruleview-ancestor-ruleclose {
color: var(--theme-comment);
}
.ruleview-rule-indent, .ruleview-ancestor-ruleclose {
white-space: pre;
/*
* We do want to keep the underlying chars for the indent for user to copy/paste,
* but we can reduce the inline space it takes.
* Tweaking word-spacing instead of using font-size as the latter could be odd when
* the text is selected.
* Avoid using letter-spacing as this can cause visual glitches on low-dpi screen (see Bug 1845517).
*/
word-spacing: -0.5ch;
}
.ruleview-rule-indent.clipboard-only {
position: absolute;
left: -9999px;
overflow: hidden;
width: 0;
height: 0;
padding: 0;
border: 0;
margin: 0;
}
.ruleview-propertylist {
list-style: none;
padding: 0;
margin: 0;
}
.ruleview-expandable-container.registered-properties .ruleview-propertylist {
/* Since we don't have a toggle checkbox for registered property definitions, we set
a padding so they have the same indent as properties in regular rules */
padding-inline-start: 28px;
}
.ruleview-enableproperty {
position: relative;
margin-top: 0;
margin-bottom: 0;
}
.ruleview-enableproperty {
box-sizing: border-box;
margin-inline-start: var(--rule-enableproperty-margin-inline-start);
margin-inline-end: var(--rule-enableproperty-margin-inline-end);
width: var(--rule-enableproperty-size);
height: var(--rule-enableproperty-size);
/* The SVG checkbox on Windows and Linux */
:root:is([platform="win"], [platform="linux"]) & {
appearance: none;
float: left;
box-sizing: content-box;
display: inline-block;
border: 0;
padding: 0;
background: url("chrome://devtools/skin/images/checkbox.svg") center no-repeat content-box;
/* Using fill to paint the border, and stroke for the tick */
-moz-context-properties: fill, stroke;
fill: rgba(0,0,0,.3);
stroke: transparent;
}
:root[platform="mac"] & {
appearance: auto;
-moz-default-appearance: checkbox;
}
}
:root[platform="win"].theme-dark .ruleview-enableproperty,
:root[platform="linux"].theme-dark .ruleview-enableproperty {
fill: rgba(255,255,255,.4);
}
:root[platform="win"] .ruleview-enableproperty:checked,
:root[platform="linux"] .ruleview-enableproperty:checked {
stroke: rgba(0,0,0,.6);
}
:root[platform="win"].theme-dark .ruleview-enableproperty:checked,
:root[platform="linux"].theme-dark .ruleview-enableproperty:checked {
stroke: rgba(255,255,255,.8);
}
.ruleview-warning,
.ruleview-unused-warning,
.ruleview-compatibility-warning {
display: inline-block;
width: 12px;
height: 12px;
background-size: 12px;
background-repeat: no-repeat;
-moz-context-properties: fill;
}
.ruleview-warning {
background-image: url(chrome://devtools/skin/images/alert-small.svg);
fill: var(--yellow-60);
}
.ruleview-unused-warning {
background-image: url(chrome://devtools/skin/images/info-small.svg);
background-color: var(--theme-sidebar-background);
fill: var(--theme-icon-dimmed-color);
}
.ruleview-compatibility-warning {
background-image: url(chrome://devtools/skin/images/report.svg);
background-color: var(--theme-sidebar-background);
fill: var(--theme-icon-dimmed-color);
}
.ruleview-unused-warning:hover,
.ruleview-compatibility-warning:hover {
fill: var(--theme-icon-color);
stroke: var(--theme-icon-color);
}
.ruleview-rule:not(:hover, :focus-within) .ruleview-enableproperty {
/* Use opacity to hide the checkbox instead of visibility:hidden,
so that it's possible to focus it with the keyboard. */
opacity: 0;
}
.ruleview-expander {
vertical-align: middle;
}
.ruleview-propertycontainer .ruleview-expander {
margin-left: -6px;
}
.ruleview-propertycontainer .ruleview-expander:dir(rtl):not([open]) {
/* for preventing .theme-twisty's wrong direction in rtl; Bug 1296648 */
transform: rotate(-90deg);
}
.ruleview-newproperty {
/* As we don't have the checkbox displayed before the input, we need to align it
with the property name above it. */
margin-inline-start: calc(
var(--rule-enableproperty-size) +
var(--rule-enableproperty-margin-inline-start) +
var(--rule-enableproperty-margin-inline-end)
);
}
.ruleview-namecontainer,
.ruleview-propertyvaluecontainer,
.ruleview-propertyname,
.ruleview-propertyvalue {
text-decoration: inherit;
}
.ruleview-computedlist {
list-style: none;
padding: 0;
}
.ruleview-overridden-items {
margin-block: 0;
list-style: none;
line-height: 1.5em;
}
.ruleview-overridden-item {
position: relative;
}
.ruleview-overridden-item::before,
.ruleview-overridden-item::after {
content: "";
position: absolute;
display: block;
border: 0 solid var(--theme-text-color-alt);
}
.ruleview-overridden-item::before {
top: 0;
left: -15px;
height: 0.8em;
width: 10px;
border-left-width: 0.5px;
border-bottom-width: 0.5px;
}
.ruleview-overridden-item::after {
left: -15px;
bottom: -7px;
height: 100%;
border-left-width: 0.5px;
}
.ruleview-overridden-item:last-child::after {
display: none;
}
.ruleview-overridden-item .ruleview-namecontainer {
margin-left: 0;
}
/* All swatches */
.ruleview-flex,
.ruleview-grid,
.ruleview-shapeswatch,
.ruleview-swatch {
cursor: pointer;
width: 1em;
height: 1em;
vertical-align: middle;
/* align the swatch with its value */
margin-top: -1px;
margin-inline-end: 5px;
display: inline-block;
position: relative;
}
/* Icon swatches not using the .ruleview-swatch class (flex, grid, shape) */
.ruleview-flex,
.ruleview-grid,
.ruleview-shapeswatch {
-moz-context-properties: stroke;
stroke: var(--theme-icon-color);
}
.ruleview-flex.active,
.ruleview-grid.active,
.ruleview-shapeswatch.active {
stroke: var(--theme-icon-checked-color);
}
.ruleview-flex {
background-image: url("chrome://devtools/skin/images/flexbox-swatch.svg");
background-size: 13px 11px;
width: 13px;
height: 11px;
}
.ruleview-grid {
background-image: url("chrome://devtools/skin/images/grid.svg");
}
.ruleview-grid[disabled] {
cursor: default;
opacity: 0.5;
}
.ruleview-shapeswatch {
background-image: url("chrome://devtools/skin/images/shape-swatch.svg");
background-size: 110%;
width: 1.45em;
height: 1.45em;
}
.ruleview-shape-point.active,
.ruleview-shapeswatch.active + .ruleview-shape > .ruleview-shape-point:hover {
background-color: var(--rule-highlight-background-color);
}
/* Round swatches using the .ruleview-swatch class (color, bezier, filter and angle) */
.ruleview-swatch {
background-size: 1em;
border-radius: 50%;
}
.ruleview-colorswatch::before {
content: '';
background-color: #eee;
background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
background-size: 12px 12px;
background-position: 0 0, 6px 6px;
position: absolute;
border-radius: 50%;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.ruleview-swatch.ruleview-colorswatch {
border: none;
padding: 0;
/* Adjust outline so it doesn't conflate with the color swatch, which could have a similar background
color as the outline */
outline-offset: 2px;
}
.ruleview-bezierswatch {
background-image: url("chrome://devtools/skin/images/cubic-bezier-swatch.svg");
}
.ruleview-filterswatch {
background-image: url("chrome://devtools/skin/images/filter-swatch.svg");
}
.ruleview-angleswatch {
background-image: url("chrome://devtools/skin/images/angle-swatch.svg");
}
.ruleview-lineareasingswatch {
background-image: url("chrome://devtools/skin/images/linear-easing-swatch.svg");
}
.ruleview-overridden {
text-decoration: line-through solid var(--theme-text-color-alt);
}
/**
* Hide swatches (tool icons) from properties that are overwritten by higher specificity * rules.
* .ruleview-swatch is a base class for many tool swatches (shapes, color, bezier curves)
* .ruleview-flex and .ruleview-grid are custom
*/
.ruleview-overridden .ruleview-flex,
.ruleview-overridden .ruleview-grid,
.ruleview-overridden .ruleview-shapeswatch,
.ruleview-overridden .ruleview-swatch {
display: none;
}
.ruleview-font-family.used-font {
text-decoration: underline;
}
.styleinspector-propertyeditor {
padding: 0;
margin-block: -1px;
border: none;
outline-offset: 1px;
&:focus-visible {
/* Unset the outline box shadow to prevent overlapping previous/next properties.
This is safe since those input won't be this part of the UI won't get */
--theme-outline-box-shadow: initial;
}
}
.ruleview-property {
border-left: 3px solid transparent;
clear: both;
overflow-wrap: break-word;
/* When the text of the property wraps, we want the wrapping lines to have an indent so
they don't go under the checkbox */
text-indent: var(--rule-computed-margin-inline-start) hanging;
}
.ruleview-propertycontainer > * {
vertical-align: middle;
}
.ruleview-property.ruleview-changed,
.ruleview-property[dirty] {
border-left-color: var(--theme-highlight-green);
}
.ruleview-highlight {
/*
* If we'd rely solely on background color change for highlighted element, we would need
* to pick a color that would bring at least 3:1 ratio (see 1.4.11 Non-text Contrast).
* As this would be too disturbing for the user, we need to indicate impacted element
* with another graphical mean.
* So here we'll use a bottom box-shadow (not a border to avoid impacting the layout)
* which will match the style we have in Debugger for search results.
*/
background-color: var(--rule-highlight-background-color);
/* Put the box-shadow inside the element so it's still visible when sibling elements are highlighted */
box-shadow: inset 0px -1px 0px 0px var(--theme-contrast-border);
/* property name and value and unmatched/inactive colors need to be adjusted
in order to have enough contrast against the highlighted background */
& .ruleview-propertyname {
color: var(--rule-highlight-propertyname);
}
& .ruleview-propertyvalue {
color: var(--rule-highlight-propertyvalue);
}
&.ruleview-selector.unmatched,
& .ruleview-unmatched-variable,
.ruleview-property:is(.unused, .ruleview-overridden) & :is(.ruleview-propertyname, .ruleview-propertyvalue) {
color: var(--rule-highlight-unmatched-unused-color);
}
}
.ruleview-namecontainer > .ruleview-propertyname,
.ruleview-propertyvaluecontainer > .ruleview-propertyvalue {
border-bottom: 1px dashed transparent;
}
.ruleview-namecontainer:hover > .ruleview-propertyname,
.ruleview-propertyvaluecontainer:hover > .ruleview-propertyvalue {
border-bottom-color: hsl(0,0%,50%);
}
/* ancestor rules info element (parent at-rules, parent of nested rules, …) */
.ruleview-rule-ancestor-data {
max-width: 100%;
display: inline-block;
list-style: none;
padding: 0;
margin: 0;
}
.ruleview-rule-ancestor-data [role="listitem"] {
/* When there's a search and this element is highlighted, this prevents the background
color to be applied to the whole width of the parent ul block */
max-width: max-content;
}
.ruleview-rule-ancestor-data [role="listitem"].has-tooltip:hover .container-query-declaration {
text-decoration: underline;
text-decoration-color: var(--theme-highlight-blue);
text-decoration-style: dotted;
text-decoration-skip-ink: none;
text-decoration-thickness: 2px;
text-underline-offset: 2px;
}
.ruleview-rule-ancestor-data [role="listitem"] :is(button,[role="button"]).open-inspector {
/* There's a space character after the button, so add a 1ch margin-inline-start to be consistent */
margin-inline: 1ch 0;
}
.ruleview-selectors-container,
.ruleview-registered-property-name {
word-wrap: break-word;
cursor: text;
}
.ruleview-selector-separator,
.ruleview-selector.unmatched,
.ruleview-unmatched-variable,
.ruleview-property:is(.unused, .ruleview-overridden) :is(.ruleview-propertyname,.ruleview-propertyvalue) {
color: var(--theme-text-color-alt);
}
/* We use a dimmer color for those unmatching element, but we can't convey state change
only with colors, so let's add a line-through line */
:is(
.ruleview-selector.unmatched,
.ruleview-unmatched-variable
):not(
/* don't show the strike through when the element is hovered so it's more legible */
:hover
) {
text-decoration: line-through solid currentColor;
}
.ruleview-selector.matched > .ruleview-selector-attribute {
/* TODO: Bug 1178535 Awaiting UX feedback on highlight colors */
}
.ruleview-selector.matched > .ruleview-selector-pseudo-class {
/* TODO: Bug 1178535 Awaiting UX feedback on highlight colors */
}
.ruleview-selector.matched > .ruleview-selector-pseudo-class-lock {
color: var(--pseudo-class-text-color);
}
.ruleview-selector-warnings {
display: inline-block;
width: 16px;
height: 12px;
margin-inline-start: 2px;
vertical-align: text-top;
border-radius: 2px;
border: 1px solid var(--theme-warning-border);
background-color: var(--theme-warning-background);
background-repeat: no-repeat;
background-position: center;
fill: var(--theme-warning-color);
-moz-context-properties: fill;
/* Default warning icon */
background-image: url(chrome://devtools/skin/images/alert-small.svg);
background-size: 10px;
&.slow {
background-image: url(chrome://devtools/content/netmonitor/src/assets/icons/turtle.svg);
background-size: 12px;
}
}
/* When hovering the selector warnings icon, highlight the selector it applies to */
.ruleview-selector:has(.ruleview-selector-warnings:hover) {
background-color: var(--theme-warning-background);
/* We're not using --theme-warning-border to make it more visible */
outline: 1px solid var(--theme-warning-color);
& .ruleview-selector-warnings {
/* In such case, hide the icon border to make it cleaner */
border-color: transparent;
}
}
.ruleview-selectorhighlighter {
display: inline-block;
border: none;
vertical-align: top;
width: 15px;
height: 15px;
margin-left: 5px;
background: url("chrome://devtools/skin/images/highlight-selector.svg") no-repeat 0 0;
background-size: contain;
cursor: pointer;
-moz-context-properties: fill;
fill: var(--theme-icon-dimmed-color);
/* Prevent line break when copy/pasting an entire rule */
user-select: auto;
}
.ruleview-selectorhighlighter:hover {
fill: var(--theme-icon-color);
}
.ruleview-selectorhighlighter:active,
.ruleview-selectorhighlighter.highlighted {
fill: var(--theme-icon-checked-color);
/* Since the icon is quite thin, it can be hard to differentiate it
from its regular state. Adding some background helps make it pop a bit */
background-color: var(--dimmed-highlighter-box-content-color);
}
#ruleview-add-rule-button::before {
background-image: url("chrome://devtools/skin/images/add.svg");
background-size: 14px;
}
#pseudo-class-panel-toggle::before {
content: ":hov";
}
#class-panel-toggle::before {
content: ".cls";
}
#pseudo-class-panel-toggle::before,
#class-panel-toggle::before {
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
direction: ltr;
}
#print-simulation-toggle::before {
background-image: url("chrome://devtools/skin/images/rules-view-print-simulation.svg");
}
#color-scheme-simulation-light-toggle::before {
background-image: url("chrome://devtools/skin/images/rules-view-light-mode-simulation.svg");
-moz-context-properties: fill, stroke;
stroke: currentColor;
}
#color-scheme-simulation-dark-toggle::before {
background-image: url("chrome://devtools/skin/images/rules-view-dark-mode-simulation.svg");
}
.flash-out {
transition: background 1s;
}
.ruleview-propertyvalue-draggable {
cursor: col-resize;
}
.ruleview-propertyvalue-dragging {
user-select: none;
}
.ruleview-propertyvalue-break-spaces {
white-space: break-spaces;
}
|