LibWeb: Add display grid automated tests

This commit is contained in:
martinfalisse 2023-04-01 20:00:56 +02:00 committed by Andreas Kling
parent 7028f75779
commit 57cdb0c972
Notes: sideshowbarker 2024-07-17 01:53:23 +09:00
24 changed files with 1287 additions and 0 deletions

View File

@ -0,0 +1,27 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 261.333343x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (269.333343,8) content-size 261.333343x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [269.333343,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (530.666687,8) content-size 261.333312x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [530.666687,8 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,27 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 261.333343x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (269.333343,8) content-size 261.333343x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [269.333343,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (530.666687,8) content-size 261.333312x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [530.666687,8 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,34 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x50.9375 children: not-inline
BlockContainer <body> at (8,8) content-size 784x34.9375 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 392.140625x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (400.140625,8) content-size 392x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [400.140625,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,25.46875) content-size 392.140625x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,25.46875 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (400.140625,25.46875) content-size 392x17.46875 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [400.140625,25.46875 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,34 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x50.9375 children: not-inline
BlockContainer <body> at (8,8) content-size 784x34.9375 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 50x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (58,8) content-size 392x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [58,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,25.46875) content-size 50x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,25.46875 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (58,25.46875) content-size 392x17.46875 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [58,25.46875 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,102 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x166.8125 children: not-inline
BlockContainer <body> at (8,8) content-size 784x150.8125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x44.9375 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 367.140625x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (425.140625,8) content-size 367x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [425.140625,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,35.46875) content-size 367.140625x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,35.46875 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (425.140625,35.46875) content-size 367x17.46875 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [425.140625,35.46875 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,52.9375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,52.9375) content-size 784x50.9375 children: not-inline
BlockContainer <(anonymous)> at (8,52.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (435.434356,52.9375) content-size 357.800018x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [435.434356,52.9375 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,52.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,86.40625) content-size 359.034362x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,86.40625 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,52.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,103.875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,103.875) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,103.875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (408,103.875) content-size 384x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [408,103.875 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,103.875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,121.34375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,121.34375) content-size 784x20 children: not-inline
BlockContainer <(anonymous)> at (8,121.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (408,121.34375) content-size 384x20 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [408,121.34375 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,121.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,141.34375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container.with-border> at (8,141.34375) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,141.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item.with-border> at (8,141.34375) content-size 387x17.46875 children: inline
line 0 width: 104.875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 14, rect: [8,141.34375 104.875x17.46875]
"left side text"
TextNode <#text>
BlockContainer <(anonymous)> at (8,141.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item.with-border> at (405,141.34375) content-size 387x17.46875 children: inline
line 0 width: 363.203125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 47, rect: [405,141.34375 363.203125x17.46875]
"right side text right side text right side text"
TextNode <#text>
BlockContainer <(anonymous)> at (8,141.34375) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,14 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x40 children: not-inline
BlockContainer <body> at (8,8) content-size 784x24 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x24 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.wrapper> at (8,8) content-size 64x24 children: inline
line 0 width: 64, height: 24, bottom: 24, baseline: 24
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 64x24]
TextNode <#text>
ImageBox <img> at (8,8) content-size 64x24 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,27 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 93.765625x17.46875 children: inline
line 0 width: 93.765625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 11, rect: [8,8 93.765625x17.46875]
"min-content"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (101.765625,8) content-size 98.640625x17.46875 children: inline
line 0 width: 98.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 11, rect: [101.765625,8 98.640625x17.46875]
"max-content"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (200.40625,8) content-size 591.59375x17.46875 children: inline
line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [200.40625,8 21.609375x17.46875]
"1fr"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,168 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x288.28125 children: not-inline
BlockContainer <body> at (8,8) content-size 784x272.28125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 300x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (308,8) content-size 300x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [308,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,25.46875) content-size 784x100 children: not-inline
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,25.46875) content-size 300x50 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,25.46875 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (308,25.46875) content-size 300x50 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [308,25.46875 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,125.46875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,125.46875) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,125.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,125.46875) content-size 784x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,125.46875 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,125.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,142.9375) content-size 784x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,142.9375 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,125.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,160.40625) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,160.40625) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,160.40625) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,160.40625) content-size 784x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,160.40625 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,160.40625) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,177.875) content-size 784x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,177.875 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,160.40625) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,195.34375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,195.34375) content-size 784x50 children: not-inline
BlockContainer <(anonymous)> at (8,195.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,195.34375) content-size 300x25 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,195.34375 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,195.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (308,195.34375) content-size 300x25 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [308,195.34375 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,195.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,220.34375) content-size 300x25 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,220.34375 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,195.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (308,220.34375) content-size 300x25 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [308,220.34375 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,195.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,245.34375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,245.34375) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,245.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,245.34375) content-size 261.333343x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,245.34375 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,245.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (269.333343,245.34375) content-size 261.333343x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [269.333343,245.34375 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,245.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (530.666687,245.34375) content-size 261.333312x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [530.666687,245.34375 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,245.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,262.8125) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,262.8125) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,262.8125) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,262.8125) content-size 56.218711x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,262.8125 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,262.8125) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (64.218711,262.8125) content-size 671.5625x17.46875 children: inline
line 0 width: 125.265625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 15, rect: [64.218711,262.8125 125.265625x17.46875]
"Article content"
TextNode <#text>
BlockContainer <(anonymous)> at (8,262.8125) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (735.781188,262.8125) content-size 56.218688x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [735.781188,262.8125 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,262.8125) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,90 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x143.40625 children: not-inline
BlockContainer <body> at (8,8) content-size 784x127.40625 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 392x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (400,8) content-size 393.234375x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [400,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,25.46875) content-size 784x75 children: not-inline
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,25.46875) content-size 261.333343x75 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,25.46875 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (530.666687,25.46875) content-size 261.333312x50 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [530.666687,25.46875 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (269.333343,25.46875) content-size 261.333343x25 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [269.333343,25.46875 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (269.333343,75.46875) content-size 522.666625x25 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [269.333343,75.46875 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,100.46875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,100.46875) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,100.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (58,100.46875) content-size 100x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [58,100.46875 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,100.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (158,100.46875) content-size 50x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [158,100.46875 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,100.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (208,100.46875) content-size 100x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [208,100.46875 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,100.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,117.9375) content-size 50x17.46875 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,117.9375 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,100.46875) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,83 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x185.875 children: not-inline
BlockContainer <body> at (8,8) content-size 784x169.875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 522.666748x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (530.666748,8) content-size 261.333496x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [530.666748,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,25.46875) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,25.46875) content-size 261.333374x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,25.46875 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (269.333374,25.46875) content-size 522.66687x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [269.333374,25.46875 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,25.46875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,42.9375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,42.9375) content-size 784x100 children: not-inline
BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,42.9375) content-size 784x40 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,42.9375 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,82.9375) content-size 784x60 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,82.9375 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,142.9375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,142.9375) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,142.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,142.9375) content-size 784x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,142.9375 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,142.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,160.40625) content-size 392x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,160.40625 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,142.9375) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,83 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x233.46875 children: not-inline
BlockContainer <body> at (8,8) content-size 784x217.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x200 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,8) content-size 392x200 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (400,8) content-size 392x100 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [400,8 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (400,108) content-size 196x50 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [400,108 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (596,108) content-size 196x50 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [596,108 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (400,158) content-size 196x50 children: inline
line 0 width: 8.453125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [400,158 8.453125x17.46875]
"5"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (596,158) content-size 196x50 children: inline
line 0 width: 8.734375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [596,158 8.734375x17.46875]
"6"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,208) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,208) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,208) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,208) content-size 50x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,208 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,208) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (58,208) content-size 50x17.46875 children: inline
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [58,208 8.8125x17.46875]
"2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,208) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (108,208) content-size 100x17.46875 children: inline
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [108,208 9.09375x17.46875]
"3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,208) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (208,208) content-size 100x17.46875 children: inline
line 0 width: 7.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [208,208 7.75x17.46875]
"4"
TextNode <#text>
BlockContainer <(anonymous)> at (8,208) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,83 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120.8125 children: not-inline
BlockContainer <body> at (8,8) content-size 784x104.8125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x34.9375 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div> at (400,25.46875) content-size 392x17.46875 children: inline
line 0 width: 99.703125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 1, length: 12, rect: [400,25.46875 99.703125x17.46875]
"right-bottom"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div> at (8,8) content-size 392x34.9375 children: inline
line 0 width: 26.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [8,8 26.25x17.46875]
"left"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div> at (400,8) content-size 392x17.46875 children: inline
line 0 width: 70.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 9, rect: [400,8 70.234375x17.46875]
"right-top"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,42.9375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,42.9375) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,42.9375) content-size 261.333343x17.46875 children: inline
line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [8,42.9375 21.609375x17.46875]
"1fr"
TextNode <#text>
BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,60.40625) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,60.40625) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,60.40625) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,60.40625) content-size 392x17.46875 children: inline
line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [8,60.40625 21.609375x17.46875]
"1fr"
TextNode <#text>
BlockContainer <(anonymous)> at (8,60.40625) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,77.875) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,77.875) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,77.875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,77.875) content-size 196x17.46875 children: inline
line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [8,77.875 21.609375x17.46875]
"1fr"
TextNode <#text>
BlockContainer <(anonymous)> at (8,77.875) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,95.34375) content-size 784x0 children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
Box <div.grid-container> at (8,95.34375) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,95.34375) content-size 0x0 children: inline
TextNode <#text>
BlockContainer <div.grid-item> at (8,95.34375) content-size 196x17.46875 children: inline
line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [8,95.34375 21.609375x17.46875]
"1fr"
TextNode <#text>
BlockContainer <(anonymous)> at (8,95.34375) content-size 0x0 children: inline
TextNode <#text>

View File

@ -0,0 +1,22 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<div class="grid-container" style="
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
</div>

View File

@ -0,0 +1,22 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<div class="grid-container" style="
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
</div>

View File

@ -0,0 +1,22 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Should render a 2x2 grid -->
<div class="grid-container" style="grid-template-columns: auto auto;">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>

View File

@ -0,0 +1,24 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Should render a 2x2 grid with columns 50px and 50% -->
<div class="grid-container" style="
grid-template-columns: 50px 50%;
grid-template-rows: auto auto;">
<div class="grid-item" style="grid-column: 1 / 1; grid-row: 1 / 1">1</div>
<div class="grid-item" style="grid-column: 2 / 2; grid-row: 1 / 1">2</div>
<div class="grid-item" style="grid-column: 1 / 1; grid-row: 2 / 2">3</div>
<div class="grid-item" style="grid-column: 2 / 2; grid-row: 2 / 2">4</div>
</div>

View File

@ -0,0 +1,62 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- There should be a large (50px) column gap and small (10px) row gap -->
<div class="grid-container" style="
grid-template-columns: auto auto;
gap: 10px 50px;
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>
<!-- There should be a Z-shaped gap (with both vertical and horizontal gap) -->
<div class="grid-container" style="
grid-template-columns: auto auto;
gap: calc(1vh + 10px) calc(10% - 10px);
">
<div class="grid-item" style="grid-column: 2 / span 1">1</div>
<div class="grid-item">2</div>
</div>
<!-- Column-gaps with overflowing column spans -->
<!-- There should be 1 column that starts at column 2 and spans until the end. -->
<div class="grid-container" style="
grid-column-gap: 16px;
grid-template-columns: 1fr 1fr;
">
<div class="grid-item" style="grid-column: 2 / span 5;">1</div>
</div>
<!-- Column-gaps with overflowing column spans and row spans -->
<!-- There should be 1 column that starts at column 2 and spans until the end. -->
<div class="grid-container" style="
grid-column-gap: 16px;
grid-template-columns: 1fr 1fr;
grid-template-rows: 20px;
">
<div class="grid-item" style="grid-column: 2 / span 5; grid-row: span 4">1</div>
</div>
<!-- Bug with column gaps - grid items should have normal height -->
<div class="grid-container with-border" style="
grid-column-gap: 10px;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
">
<div class="grid-item with-border">left side text</div>
<div class="grid-item with-border">right side text right side text right side text</div>
</div>

View File

@ -0,0 +1,32 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Should render a 64px wide image -->
<div class="grid-container" style="
grid-template-columns: auto 0 minmax(0, 100%);
">
<div class="wrapper" style="width: 100%;">
<img style="width: 100%;" src="data:image/jpeg;base64,
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDADIiJSwlHzIsKSw4NTI7S31RS0VFS5ltc1p9tZ++u7Kf
r6zI4f/zyNT/16yv+v/9////////wfD/////////////2wBDATU4OEtCS5NRUZP/zq/O////////
////////////////////////////////////////////////////////////wAARCAAYAEADAREA
AhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAQMAAgQF/8QAJRABAAIBBAEEAgMAAAAAAAAAAQIR
AAMSITEEEyJBgTORUWFx/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAA
AAD/2gAMAwEAAhEDEQA/AOgM52xQDrjvAV5Xv0vfKUALlTQfeBm0HThMNHXkL0Lw/swN5qgA8yT4
MCS1OEOJV8mBz9Z05yfW8iSx7p4j+jA1aD6Wj7ZMzstsfvAas4UyRHvjrAkC9KhpLMClQntlqFc2
X1gUj4viwVObKrddH9YDoHvuujAEuNV+bLwFS8XxdSr+Cq3Vf+4F5RgQl6ZR2p1eAzU/HX80YBYy
JLCuexwJCO2O1bwCRidAfWBSctswbI12GAJT3yiwFR7+MBjGK2g/WAJR3FdF84E2rK5VR0YH/9k=">
</div>
</div>

View File

@ -0,0 +1,23 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<div class="grid-container" style="
grid-template-columns: min-content max-content 1fr;
grid-template-areas: 'one two three';
">
<div class="grid-item" style="grid-area: one; min-width: 25%; max-width: 50%;">min-content</div>
<div class="grid-item" style="grid-area: two;">max-content</div>
<div class="grid-item" style="grid-area: three;">1fr</div>
</div>

View File

@ -0,0 +1,75 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Basic minmax(): Should render 2 items side by side, each with a minimum width of 150px, If there is enough space,
they will expand up to 300px each. -->
<div class="grid-container" style="grid-template-columns: minmax(150px, 300px) minmax(150px, 300px);">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
</div>
<!-- Basic minmax vertical
Since there is no vertical limit, the two rows should be 50px high each. -->
<div class="grid-container" style="
grid-template-columns: minmax(150px, 300px) minmax(150px, 300px);
grid-template-rows: minmax(25px, 50px) minmax(25px, 50px);
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
</div>
<!-- Invalid minmax value as can't have a flexible length as a minimum value.
Should render 2 items with no grid formatting (one on top of the other) -->
<div class="grid-container" style="grid-template-columns: minmax(1fr, 100px) 1fr 1fr;">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
</div>
<!-- Invalid minmax value in repeat as can't have a flexible length as a minimum value
Should render 2 items with no grid formatting (one on top of the other) -->
<div class="grid-container" style="grid-template-columns: repeat(3, minmax(1fr, 100px));">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
</div>
<!-- Basic minmax vertical
Since there is a height limit, the rows should be 25px high each. -->
<div class="grid-container" style="
height: 50px;
grid-template-columns: minmax(150px, 300px) minmax(150px, 300px);
grid-template-rows: minmax(25px, 50px) minmax(25px, 50px);
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>
<!-- Minmax horizontal with maximum as flex
3 columns with minimum 200px and maximum 100%. -->
<div class="grid-container" style="
grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(200px, 1fr);
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
</div>
<!-- Article layout: small margins on mobile, large on desktop. Centered column with 70ch width maximum -->
<div class="grid-container" style="grid-template-columns: minmax(1rem, 1fr) minmax(auto, 70ch) minmax(1rem, 1fr);">
<div class="grid-item">1</div>
<div class="grid-item">Article content</div>
<div class="grid-item">3</div>
</div>

View File

@ -0,0 +1,62 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Should render a 2 columned grid -->
<div class="grid-container" style="
grid-template-columns:
[a] auto
[b] auto;
">
<div class="grid-item" style="grid-column-start: a;">1</div>
<div class="grid-item" style="grid-column-start: b;">2</div>
</div>
<!-- Example from https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines-->
<!-- Named tracks there should be 4 grid items in a circle with a space in the middle -->
<div class="grid-container" style="
grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end] 1fr [main-end];
grid-template-rows: [main-start] 25px [content-start] 25px [content-end] 25px [main-end];
">
<div class="grid-item" style="
grid-column-start: main-start;
grid-row-start: main-start;
grid-row-end: main-end;
">1</div>
<div class="grid-item" style="
grid-column-start: content-end;
grid-row-start: main-start;
grid-row-end: content-end;
">2</div>
<div class="grid-item" style="
grid-column-start: content-start;
grid-row-start: main-start;
">3</div>
<div class="grid-item" style="
grid-column-start: content-start;
grid-column-end: main-end;
grid-row-start: content-end;
">4</div>
</div>
<!-- Named lines inside repeat -->
<!-- Should render 2 50px columns and 2 100px columns, with grid-item 1 starting at column 2 -->
<div class="grid-container" style="
grid-template-columns: repeat(2, [name1] 50px [name2] 100px);
">
<div class="grid-item" style="grid-column-start: name2;">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>

View File

@ -0,0 +1,67 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Column end and span -->
<!-- There should be a column spanning 8 units, and then one spanning 4 -->
<div class="grid-container" style="
grid-template-columns: repeat(12,minmax(0,5fr));
">
<div class="grid-item" style="
grid-column-end: span 8;
">1</div>
<div class="grid-item" style="
grid-column-end: span 4;
">2</div>
</div>
<!-- Column start span takes priority over column end span -->
<!-- There should be a column spanning 4 units, and then one spanning 8 -->
<div class="grid-container" style="
grid-template-columns: repeat(12,minmax(0,5fr));
">
<div class="grid-item" style="
grid-column-start: span 4;
grid-column-end: span 8;
">1</div>
<div class="grid-item" style="
grid-column-start: span 8;
grid-column-end: span 4;
">2</div>
</div>
<!-- Row end and span -->
<!-- There should be a row spanning 2 units, and then one spanning 3 -->
<div class="grid-container" style="
grid-template-rows: repeat(5, 20px);
">
<div class="grid-item" style="
grid-row-end: span 2;
">1</div>
<div class="grid-item" style="
grid-row-end: span 3;
">2</div>
</div>
<!-- Grid shouldn't expand to 3 columns as having too much span doesn't change size. -->
<!-- The bottom row should take up half the width of the grid. -->
<div class="grid-container" style="
grid-template-columns: 1fr 1fr;
">
<div class="grid-item" style="
grid-column: 1 / span 3;
grid-row: 1;
">1</div>
<div class="grid-item">1</div>
</div>

View File

@ -0,0 +1,41 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Should render a full-width 4x4 grid with:
- one large column on the left
- one large column on the right, being split in half vertically, with the number 2 in the top half,
and numbers 3, 4, 5, and 6 in the bottom -->
<div class="grid-container" style="
grid-template-columns: repeat(8, 1fr);
grid-template-rows: repeat(2, 25px 25px 25px 25px );
">
<div class="grid-item" style="grid-row: 1 / -1; grid-column: span 4;">1</div>
<div class="grid-item" style="grid-row: 1 / 5; grid-column: 5 / -1;">2</div>
<div class="grid-item" style="grid-column: span 2; grid-row: span 2;">3</div>
<div class="grid-item" style="grid-column: span 2 / -1; grid-row: span 2;">4</div>
<div class="grid-item" style="grid-column: span 2; grid-row: 7 / span 100;">5</div>
<div class="grid-item" style="grid-column: 7 / span 2; grid-row: span 2 / -1;">6</div>
</div>
<!-- Multiple repeats -->
<!-- Should render 2 50px columns and 2 100px columns -->
<div class="grid-container" style="
grid-template-columns: repeat(2, 50px) repeat(2, 100px)
">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>

View File

@ -0,0 +1,63 @@
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Grid template areas basics -->
<div class="grid-container" style="
grid-template-columns: 1fr 1fr;
grid-template-areas:
'left right-top'
'left right-bottom';
">
<div style="background-color: lightpink; grid-area: right-bottom / right-bottom / right-bottom / right-bottom;">
right-bottom</div>
<div style="background-color: lightgreen; grid-area: left;">left</div>
<div style="background-color: lightgrey; grid-column-end: right-top;">right-top</div>
</div>
<!-- Grid-lines vs. Grid template areas -->
<!-- There should be a left-aligned column taking up 1 / 3 of the Grid -->
<div class="grid-container" style="
grid-template-columns: [c] 1fr [b] 1fr [a] 1fr;
grid-template-areas: 'a b c';
">
<div class="grid-item" style="grid-column-start: a; grid-column-end: a;">1fr</div>
</div>
<!-- Valid grid areas -->
<!-- Column taking up 50% width -->
<div class="grid-container" style="
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-areas: 'one one three two' 'one one four two' 'one one four two';
">
<div class="grid-item" style="grid-column-start: one; grid-column-end: one;">1fr</div>
</div>
<!-- Valid grid areas. This test should ideally fail differently FIXME -->
<!-- Left-aligned column taking up 25% width -->
<div class="grid-container" style="
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-areas: 'one one three two' 'one one four one';
">
<div class="grid-item" style="grid-column-start: two; grid-column-end: two;">1fr</div>
</div>
<!-- Valid grid areas. This test should ideally fail differently FIXME -->
<!-- Left-aligned column taking up 25% width -->
<div class="grid-container" style="
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-areas: 'one one three two' 'one one four five' 'one one four two';
">
<div class="grid-item" style="grid-column-start: two; grid-column-end: two;">1fr</div>
</div>