-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.html
More file actions
3597 lines (3445 loc) · 153 KB
/
Copy pathtest.html
File metadata and controls
3597 lines (3445 loc) · 153 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>CSS Noop Checker - Test Cases</title>
<style>
body {
font-family: system-ui, sans-serif;
max-width: 800px;
margin: 40px auto;
padding: 0 20px;
color: #333;
}
h1 {
margin-bottom: 8px;
}
h2 {
margin-top: 32px;
color: #555;
border-bottom: 1px solid #ddd;
padding-bottom: 4px;
}
h3 {
margin-top: 16px;
color: #777;
font-size: 14px;
}
.case {
margin: 8px 0;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
background: #fafafa;
}
.expect-warn {
border-left: 4px solid #e6a700;
}
.expect-ok {
border-left: 4px solid #4ec9b0;
}
.label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
margin-bottom: 4px;
}
.label-warn {
color: #e6a700;
}
.label-ok {
color: #4ec9b0;
}
</style>
</head>
<body>
<h1>CSS Noop Checker - Test Cases</h1>
<p>Select each element in DevTools and check the sidebar results.</p>
<!-- ===== animation-no-sub-props: animation properties without animation-name ===== -->
<h2>animation-no-sub-props: animation properties without animation-name</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-duration without animation-name
</div>
<div data-target style="animation-duration: 2s">Animated duration but no name</div>
</div>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-delay without animation-name
</div>
<div data-target style="animation-delay: 1s">Animated delay but no name</div>
</div>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-iteration-count without animation-name
</div>
<div data-target style="animation-iteration-count: infinite">
Infinite iterations but no name
</div>
</div>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-fill-mode without animation-name
</div>
<div data-target style="animation-fill-mode: forwards">Fill mode but no name</div>
</div>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-timing-function without animation-name
</div>
<div data-target style="animation-timing-function: linear">Linear timing but no name</div>
</div>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-direction without animation-name
</div>
<div data-target style="animation-direction: reverse">Reverse direction but no name</div>
</div>
<div class="case expect-warn" data-rule="animation-no-sub-props">
<div class="label label-warn">
animation-no-sub-props warn: animation-play-state without animation-name
</div>
<div data-target style="animation-play-state: paused">Paused but no name</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="animation-no-sub-props">
<div class="label label-ok">
animation-no-sub-props ok: animation-duration with animation-name
</div>
<style>
@keyframes testFade {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
<div data-target style="animation-name: testFade; animation-duration: 2s">
Has both name and duration
</div>
</div>
<div class="case expect-ok" data-rule="animation-no-sub-props">
<div class="label label-ok">
animation-no-sub-props ok: default animation properties (no name)
</div>
<div data-target>No animation properties set at all</div>
</div>
<!-- ===== block-no-vertical-align: vertical-align on block-level elements ===== -->
<h2>block-no-vertical-align: vertical-align on block-level elements</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="block-no-vertical-align">
<div class="label label-warn">
block-no-vertical-align warn: div with vertical-align: middle
</div>
<div data-target style="vertical-align: middle; height: 60px; background: #f0f0f0">
Block element with vertical-align: middle (no effect)
</div>
</div>
<div class="case expect-warn" data-rule="block-no-vertical-align">
<div class="label label-warn">block-no-vertical-align warn: div with vertical-align: top</div>
<div data-target style="vertical-align: top; height: 60px; background: #f0f0f0">
Block element with vertical-align: top (no effect)
</div>
</div>
<div class="case expect-warn" data-rule="block-no-vertical-align">
<div class="label label-warn">
block-no-vertical-align warn: table-caption with vertical-align (no effect)
</div>
<table>
<caption data-target style="vertical-align: top">
Table caption with vertical-align: top (no effect per CSS spec)
</caption>
<tr>
<td>Cell</td>
</tr>
</table>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="block-no-vertical-align">
<div class="label label-ok">block-no-vertical-align ok: inline span with vertical-align</div>
<span data-target style="vertical-align: middle"
>Inline span with vertical-align: middle (valid)</span
>
</div>
<div class="case expect-ok" data-rule="block-no-vertical-align">
<div class="label label-ok">block-no-vertical-align ok: inline-block with vertical-align</div>
<span data-target style="display: inline-block; vertical-align: middle">
Inline-block with vertical-align: middle (valid)
</span>
</div>
<div class="case expect-ok" data-rule="block-no-vertical-align">
<div class="label label-ok">block-no-vertical-align ok: table-cell with vertical-align</div>
<table style="height: 60px">
<tr>
<td data-target style="vertical-align: middle">
Table cell with vertical-align: middle (valid)
</td>
</tr>
</table>
</div>
<div class="case expect-ok" data-rule="block-no-vertical-align">
<div class="label label-ok">
block-no-vertical-align ok: tr with vertical-align (propagates to cells)
</div>
<table style="height: 60px">
<tr data-target style="vertical-align: middle">
<td>Cell in row with vertical-align: middle</td>
</tr>
</table>
</div>
<div class="case expect-ok" data-rule="block-no-vertical-align">
<div class="label label-ok">
block-no-vertical-align ok: tbody with vertical-align (propagates to cells)
</div>
<table style="height: 60px">
<tbody data-target style="vertical-align: middle">
<tr>
<td>Cell in tbody with vertical-align: middle</td>
</tr>
</tbody>
</table>
</div>
<!-- ===== collapsed-table-no-border-spacing: border-spacing on collapsed table ===== -->
<h2>collapsed-table-no-border-spacing: border-spacing on collapsed table</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="collapsed-table-no-border-spacing">
<div class="label label-warn">
collapsed-table-no-border-spacing warn: border-spacing on collapsed table
</div>
<table data-target style="border-collapse: collapse; border-spacing: 10px">
<tr>
<td>Cell</td>
<td>Cell</td>
</tr>
</table>
</div>
<div class="case expect-warn" data-rule="collapsed-table-no-border-spacing">
<div class="label label-warn">
collapsed-table-no-border-spacing warn: border-spacing on collapsed inline-table
</div>
<div
data-target
style="display: inline-table; border-collapse: collapse; border-spacing: 8px"
>
<div style="display: table-row">
<div style="display: table-cell">Cell</div>
</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="collapsed-table-no-border-spacing">
<div class="label label-ok">
collapsed-table-no-border-spacing ok: border-spacing with border-collapse:separate
</div>
<table data-target style="border-collapse: separate; border-spacing: 10px">
<tr>
<td>Cell</td>
<td>Cell</td>
</tr>
</table>
</div>
<div class="case expect-ok" data-rule="collapsed-table-no-border-spacing">
<div class="label label-ok">
collapsed-table-no-border-spacing ok: collapsed table with default border-spacing
</div>
<table data-target style="border-collapse: collapse">
<tr>
<td>Cell</td>
<td>Cell</td>
</tr>
</table>
</div>
<!-- ===== container-no-align: alignment on non-flex/grid ===== -->
<h2>container-no-align: alignment on non-flex/grid containers</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="container-no-align">
<div class="label label-warn">container-no-align warn: display:block with align-items</div>
<div data-target style="align-items: center; height: 80px; background: #f0f0f0">
<div>Child (not vertically centered — align-items has no effect on block)</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-align">
<div class="label label-warn">
container-no-align warn: display:block with justify-content
</div>
<div data-target style="justify-content: space-between; height: 80px; background: #f0f0f0">
<div>Child 1</div>
<div>Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-align">
<div class="label label-warn">
container-no-align warn: place-items on block (align-items part has no effect)
</div>
<div data-target style="place-items: center; height: 120px; background: #f0f0f0">
<div>Child (not centered — align-items has no effect in block layout)</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-align">
<div class="label label-warn">
container-no-align warn: multicol container with align-items
</div>
<div
data-target
style="column-count: 3; align-items: center; height: 120px; background: #f0f0f0"
>
<p>Column 1</p>
<p>Column 2</p>
<p>Column 3</p>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-align">
<div class="label label-warn">
container-no-align warn: multicol container with both align-items and justify-content (only
align-items warns)
</div>
<div
data-target
style="
column-count: 2;
align-items: center;
justify-content: center;
height: 120px;
background: #f0f0f0;
"
>
<p>Column 1</p>
<p>Column 2</p>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-align">
<div class="label label-ok">container-no-align ok: flex container with align-items</div>
<div
data-target
style="display: flex; align-items: center; height: 60px; background: #f0f0f0"
>
<div>Flex child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-align">
<div class="label label-ok">container-no-align ok: grid container with align-items</div>
<div
data-target
style="display: grid; align-items: center; height: 60px; background: #f0f0f0"
>
<div>Grid child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-align">
<div class="label label-ok">
container-no-align ok: multicol container with justify-content
</div>
<div
data-target
style="column-count: 3; justify-content: center; height: 120px; background: #f0f0f0"
>
<p>Column 1 content</p>
<p>Column 2 content</p>
<p>Column 3 content</p>
</div>
</div>
<!-- ===== container-no-columns: multi-column on flex/grid ===== -->
<h2>container-no-columns: column properties on flex/grid containers</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="container-no-columns">
<div class="label label-warn">container-no-columns warn: flex with column-count</div>
<div data-target style="display: flex; column-count: 3; background: #f0f0f0; gap: 4px">
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
<div style="background: #ddd; padding: 4px">Child 3</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-columns">
<div class="label label-warn">container-no-columns warn: flex with column-width</div>
<div data-target style="display: flex; column-width: 200px; background: #f0f0f0; gap: 4px">
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-columns">
<div class="label label-warn">container-no-columns warn: grid with column-count</div>
<div data-target style="display: grid; column-count: 2; background: #f0f0f0; gap: 4px">
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-columns">
<div class="label label-warn">
container-no-columns warn: inline-flex with column-count and column-width via shorthand
</div>
<div
data-target
style="display: inline-flex; columns: 3 200px; background: #f0f0f0; gap: 4px"
>
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-columns">
<div class="label label-ok">container-no-columns ok: block with column-count (valid)</div>
<div data-target style="column-count: 3">
The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs. How
vexingly quick daft zebras jump.
</div>
</div>
<div class="case expect-ok" data-rule="container-no-columns">
<div class="label label-ok">container-no-columns ok: block with column-width (valid)</div>
<div data-target style="column-width: 200px">
The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs. How
vexingly quick daft zebras jump.
</div>
</div>
<div class="case expect-ok" data-rule="container-no-columns">
<div class="label label-ok">container-no-columns ok: flex with default column values</div>
<div data-target style="display: flex">
<div>Child 1</div>
<div>Child 2</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-columns">
<div class="label label-ok">container-no-columns ok: grid with default column values</div>
<div data-target style="display: grid">
<div>Child 1</div>
<div>Child 2</div>
</div>
</div>
<!-- ===== container-no-flex-props: flex-direction/wrap on non-flex ===== -->
<h2>container-no-flex-props: flex-direction/wrap on non-flex elements</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="container-no-flex-props">
<div class="label label-warn">container-no-flex-props warn: block with flex-direction</div>
<div data-target style="flex-direction: column; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">
Child 1 (still stacked — flex-direction ignored)
</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-flex-props">
<div class="label label-warn">container-no-flex-props warn: block with flex-wrap</div>
<div data-target style="flex-wrap: wrap; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">Child 1 (no wrapping — flex-wrap ignored)</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-flex-props">
<div class="label label-warn">
container-no-flex-props warn: block with flex-flow shorthand
</div>
<div data-target style="flex-flow: column wrap; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">Child 1 (flex-flow ignored)</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-flex-props">
<div class="label label-ok">
container-no-flex-props ok: flex container with flex-direction
</div>
<div data-target style="display: flex; flex-direction: column">
<div>Flex child 1</div>
<div>Flex child 2</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-flex-props">
<div class="label label-ok">container-no-flex-props ok: inline-flex with flex-wrap</div>
<span data-target style="display: inline-flex; flex-wrap: wrap">
<span>Child 1</span>
<span>Child 2</span>
</span>
</div>
<div class="case expect-ok" data-rule="container-no-flex-props">
<div class="label label-ok">
container-no-flex-props ok: grid container (no false positive)
</div>
<div
data-target
style="display: grid; flex-direction: column; grid-template-columns: 1fr 1fr"
>
<div>Grid child 1</div>
<div>Grid child 2</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-flex-props">
<div class="label label-ok">container-no-flex-props ok: default values (no override)</div>
<div data-target>
<div>Plain block element (flex-direction defaults to row)</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-flex-props">
<div class="label label-ok">container-no-flex-props ok: display:contents skipped</div>
<div style="display: flex">
<div data-target style="display: contents; flex-direction: column">
<div>Child of contents wrapper</div>
</div>
</div>
</div>
<!-- ===== container-no-gap: gap on non-flex/grid ===== -->
<h2>container-no-gap: gap on non-flex/grid containers</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="container-no-gap">
<div class="label label-warn">container-no-gap warn: display:block with gap</div>
<div data-target style="gap: 10px; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-gap">
<div class="label label-warn">container-no-gap warn: display:block with row-gap</div>
<div data-target style="row-gap: 20px; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-gap">
<div class="label label-ok">container-no-gap ok: flex container with gap</div>
<div data-target style="display: flex; gap: 10px">
<div>Flex child 1</div>
<div>Flex child 2</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-gap">
<div class="label label-ok">container-no-gap ok: grid container with gap</div>
<div data-target style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px">
<div>Grid child 1</div>
<div>Grid child 2</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-gap">
<div class="label label-ok">
container-no-gap ok: multi-column with column-gap (column-count)
</div>
<div data-target style="column-count: 2; column-gap: 40px">
The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs. How
vexingly quick daft zebras jump.
</div>
</div>
<div class="case expect-ok" data-rule="container-no-gap">
<div class="label label-ok">
container-no-gap ok: multi-column with column-gap (column-width)
</div>
<div data-target style="column-width: 200px; column-gap: 40px">
The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs. How
vexingly quick daft zebras jump.
</div>
</div>
<!-- ===== container-no-grid-props: grid container props on non-grid ===== -->
<h2>container-no-grid-props: grid container props on non-grid elements</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="container-no-grid-props">
<div class="label label-warn">
container-no-grid-props warn: block with grid-template-columns
</div>
<div data-target style="grid-template-columns: 1fr 1fr; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">Child 1 (not in grid columns — ignored)</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-grid-props">
<div class="label label-warn">container-no-grid-props warn: block with grid-auto-flow</div>
<div data-target style="grid-auto-flow: column; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">
Child 1 (still stacked — grid-auto-flow ignored)
</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-grid-props">
<div class="label label-warn">
container-no-grid-props warn: flex with grid-template-columns
</div>
<div data-target style="display: flex; grid-template-columns: 1fr 1fr; background: #f0f0f0">
<div style="background: #ddd; padding: 4px">Child 1</div>
<div style="background: #ddd; padding: 4px">Child 2</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-grid-props">
<div class="label label-ok">
container-no-grid-props ok: grid container with grid-template-columns
</div>
<div data-target style="display: grid; grid-template-columns: 1fr 1fr">
<div>Grid child 1</div>
<div>Grid child 2</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-grid-props">
<div class="label label-ok">
container-no-grid-props ok: inline-grid with grid-template-columns
</div>
<span data-target style="display: inline-grid; grid-template-columns: 1fr 1fr">
<span>Child 1</span>
<span>Child 2</span>
</span>
</div>
<div class="case expect-ok" data-rule="container-no-grid-props">
<div class="label label-ok">container-no-grid-props ok: default values (no override)</div>
<div data-target>
<div>Plain block element (grid properties at defaults)</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-grid-props">
<div class="label label-ok">container-no-grid-props ok: display:contents skipped</div>
<div style="display: grid; grid-template-columns: 1fr 1fr">
<div data-target style="display: contents; grid-template-columns: 100px 100px">
<div>Child of contents wrapper</div>
</div>
</div>
</div>
<!-- ===== container-no-justify-items: justify-items on non-flex/grid ===== -->
<h2>container-no-justify-items: justify-items on non-flex/grid containers</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="container-no-justify-items">
<div class="label label-warn">
container-no-justify-items warn: display:inline with justify-items
</div>
<span data-target style="justify-items: center">Child</span>
</div>
<div class="case expect-warn" data-rule="container-no-justify-items">
<div class="label label-warn">
container-no-justify-items warn: flex container with justify-items
</div>
<div data-target style="display: flex; justify-items: center">
<div>Child</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-justify-items">
<div class="label label-ok">container-no-justify-items ok: block with justify-items</div>
<div data-target style="justify-items: center; height: 80px; background: #f0f0f0">
<div style="width: 60px; background: #c9e0f0">Child centered by justify-items</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-justify-items">
<div class="label label-ok">
container-no-justify-items ok: grid container with justify-items
</div>
<div data-target style="display: grid; justify-items: center">
<div>Grid child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-justify-items">
<div class="label label-ok">
container-no-justify-items ok: inline-grid container with justify-items
</div>
<span data-target style="display: inline-grid; justify-items: center">
<span>Grid child</span>
</span>
</div>
<div class="case expect-ok" data-rule="container-no-justify-items">
<div class="label label-ok">
container-no-justify-items ok: block with default justify-items
</div>
<div data-target>
<div>Default value (normal)</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-justify-items">
<div class="label label-ok">
container-no-justify-items ok: display:contents with justify-items
</div>
<div style="display: grid; justify-items: center">
<div data-target style="display: contents; justify-items: center">
<div>Child of contents wrapper</div>
</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-justify-items">
<div class="label label-ok">
container-no-justify-items ok: legacy keyword propagates to descendants
</div>
<div data-target style="justify-items: legacy center">
<div>Child inherits legacy value</div>
</div>
</div>
<!-- ===== container-no-place: place-* on non-flex/grid ===== -->
<h2>container-no-place: place-* on non-flex/grid</h2>
<h3>Should warn</h3>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">container-no-place ok: display:block with place-items</div>
<div data-target style="place-items: center; height: 80px; background: #f0f0f0">
<div style="width: 60px; background: #c9e0f0">Child centered by place-items</div>
</div>
</div>
<div class="case expect-warn" data-rule="container-no-place">
<div class="label label-warn">container-no-place warn: table with place-items</div>
<div data-target style="display: table; place-items: center; background: #f0f0f0">
<div style="display: table-row"><div style="display: table-cell">Cell</div></div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">
container-no-place ok: place-content and place-items on block
</div>
<div
data-target
style="place-content: center; place-items: center; height: 80px; background: #f0f0f0"
>
<div style="width: 60px; background: #c9e0f0">Child</div>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">
container-no-place ok: place-content on block (align-content works in block layout)
</div>
<div data-target style="place-content: center">
<div>Child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">container-no-place ok: grid container with place-items</div>
<div
data-target
style="display: grid; place-items: center; height: 80px; background: #f0f0f0"
>
<div>Grid child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">container-no-place ok: flex container with place-content</div>
<div
data-target
style="display: flex; place-content: center; height: 80px; background: #f0f0f0"
>
<div>Flex child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">
container-no-place ok: inline-grid container with place-items
</div>
<div data-target style="display: inline-grid; place-items: center; height: 80px">
<div>Inline-grid child</div>
</div>
</div>
<div class="case expect-ok" data-rule="container-no-place">
<div class="label label-ok">
container-no-place ok: inline-flex container with place-content
</div>
<div data-target style="display: inline-flex; place-content: center; height: 80px">
<div>Inline-flex child</div>
</div>
</div>
<!-- ===== contents-no-box-props: box properties on display:contents ===== -->
<h2>contents-no-box-props: box properties on display:contents</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">contents-no-box-props warn: width on display:contents</div>
<div data-target style="display: contents; width: 200px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">contents-no-box-props warn: height on display:contents</div>
<div data-target style="display: contents; height: 100px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">contents-no-box-props warn: margin on display:contents</div>
<div data-target style="display: contents; margin: 10px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">contents-no-box-props warn: padding on display:contents</div>
<div data-target style="display: contents; padding: 10px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: border-width on display:contents
</div>
<div data-target style="display: contents; border: 1px solid black">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: background-color on display:contents
</div>
<div data-target style="display: contents; background-color: red">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: background-image on display:contents
</div>
<div data-target style="display: contents; background-image: linear-gradient(red, blue)">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: logical margin on display:contents
</div>
<div data-target style="display: contents; margin-block: 10px; margin-inline: 20px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: logical padding on display:contents
</div>
<div data-target style="display: contents; padding-block: 10px; padding-inline: 20px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: logical border-width on display:contents
</div>
<div
data-target
style="
display: contents;
border-block-start: 1px solid black;
border-inline-end: 2px solid red;
"
>
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: inline-size/block-size on display:contents
</div>
<div data-target style="display: contents; inline-size: 200px; block-size: 100px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: min/max width on display:contents
</div>
<div data-target style="display: contents; min-width: 100px; max-width: 500px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: min/max height on display:contents
</div>
<div data-target style="display: contents; min-height: 50px; max-height: 300px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: min/max inline-size on display:contents
</div>
<div data-target style="display: contents; min-inline-size: 100px; max-inline-size: 500px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: min/max block-size on display:contents
</div>
<div data-target style="display: contents; min-block-size: 50px; max-block-size: 300px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: width on display:contents in vertical-rl (maps to block-size)
</div>
<div data-target style="display: contents; writing-mode: vertical-rl; width: 200px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: margin-top on display:contents in vertical-rl (maps to
margin-inline-start)
</div>
<div data-target style="display: contents; writing-mode: vertical-rl; margin-top: 10px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: margin-left on display:contents in rtl (maps to
margin-inline-end)
</div>
<div data-target style="display: contents; direction: rtl; margin-left: 10px">
<span>Child of contents element</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-box-props">
<div class="label label-warn">
contents-no-box-props warn: padding-right on display:contents in rtl (maps to
padding-inline-start)
</div>
<div data-target style="display: contents; direction: rtl; padding-right: 10px">
<span>Child of contents element</span>
</div>
</div>
<h3>Should NOT warn</h3>
<div class="case expect-ok" data-rule="contents-no-box-props">
<div class="label label-ok">contents-no-box-props ok: display:block with box properties</div>
<div data-target style="display: block; width: 200px; margin: 10px; padding: 5px">
Block element with box props
</div>
</div>
<div class="case expect-ok" data-rule="contents-no-box-props">
<div class="label label-ok">
contents-no-box-props ok: display:contents with no box properties
</div>
<div data-target style="display: contents">
<span>Child of contents element (no box props set)</span>
</div>
</div>
<!-- ===== contents-no-position: positioning on display:contents ===== -->
<h2>contents-no-position: positioning on display:contents</h2>
<h3>Should warn</h3>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">contents-no-position warn: position on display:contents</div>
<div data-target style="display: contents; position: relative">
<span>Position relative on contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">contents-no-position warn: top on display:contents</div>
<div data-target style="display: contents; top: 10px">
<span>Top offset on contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">contents-no-position warn: z-index on display:contents</div>
<div data-target style="display: contents; z-index: 1">
<span>Z-index on contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">
contents-no-position warn: inset-block-start on display:contents
</div>
<div data-target style="display: contents; inset-block-start: 10px">
<span>Logical offset on contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">
contents-no-position warn: position relative with top on display:contents
</div>
<div data-target style="display: contents; position: relative; top: 10px">
<span>Combined position + offset on contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">
contents-no-position warn: right on display:contents in vertical-rl (maps to
inset-block-start)
</div>
<div data-target style="display: contents; writing-mode: vertical-rl; right: 10px">
<span>Right offset on vertical-rl contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">
contents-no-position warn: top on display:contents in vertical-rl (maps to
inset-inline-start)
</div>
<div data-target style="display: contents; writing-mode: vertical-rl; top: 10px">
<span>Top offset on vertical-rl contents</span>
</div>
</div>
<div class="case expect-warn" data-rule="contents-no-position">
<div class="label label-warn">
contents-no-position warn: left on display:contents in rtl (maps to inset-inline-end)
</div>
<div data-target style="display: contents; direction: rtl; left: 10px">
<span>Left offset on rtl contents</span>
</div>