Skip to content

The headless browser for AI agents and web scraping

test: gate block auto margin geometry

SGavrl7d74c15f318d
diff --git a/render-repros/block-auto-margins.html b/render-repros/block-auto-margins.html
new file mode 100644
index 00000000..f2a1e822
--- /dev/null
+++ b/render-repros/block-auto-margins.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>block auto margins</title>
+ <style>
+ html, body { margin: 0; }
+ .row { display: block; width: 100%; height: 80px; overflow: hidden; }
+ .box { height: 40px; margin-top: 20px; }
+ .center-fixed { width: 300px; margin-left: auto; margin-right: auto; background: #087f5b; }
+ .center-capped { width: 70%; max-width: 500px; margin-left: auto; margin-right: auto; background: #1971c2; }
+ .push-end { width: 200px; margin-left: auto; margin-right: 50px; background: #e8590c; }
+ .push-start { width: 200px; margin-left: 50px; margin-right: auto; background: #7048e8; }
+ .auto-width { width: auto; margin-left: auto; margin-right: auto; background: #c2255c; }
+ </style>
+</head>
+<body>
+ <div class="row"><div class="box center-fixed"></div></div>
+ <div class="row"><div class="box center-capped"></div></div>
+ <div class="row"><div class="box push-end"></div></div>
+ <div class="row"><div class="box push-start"></div></div>
+ <div class="row"><div class="box auto-width"></div></div>
+</body>
+</html>
diff --git a/render-repros/checks.json b/render-repros/checks.json
index 797c1156..9c654d61 100644
--- a/render-repros/checks.json
+++ b/render-repros/checks.json
@@ -10,6 +10,13 @@
{"name": "percent insets use padding box", "color": "#f08c00", "x": 260, "y": 160, "width": 30, "height": 30},
{"name": "fixed viewport containing block", "color": "#a61e4d", "x": 520, "y": 40, "width": 90, "height": 55}
],
+ "block-auto-margins": [
+ {"name": "two auto margins center a fixed-width block", "color": "#087f5b", "x": 300, "y": 20, "width": 300, "height": 40},
+ {"name": "two auto margins center a max-width block", "color": "#1971c2", "x": 200, "y": 100, "width": 500, "height": 40},
+ {"name": "start auto margin absorbs free space", "color": "#e8590c", "x": 650, "y": 180, "width": 200, "height": 40},
+ {"name": "end auto margin absorbs free space", "color": "#7048e8", "x": 50, "y": 260, "width": 200, "height": 40},
+ {"name": "auto width leaves auto margins at zero", "color": "#c2255c", "x": 0, "y": 340, "width": 900, "height": 40}
+ ],
"box-sizing": [
{"name": "content-box fixed", "color": "#22aa55", "width": 220, "height": 90},
{"name": "border-box fixed", "color": "#228866", "width": 190, "height": 60},