Skip to content

Commit c84f430

Browse files
committed
Add test for max-width and margin auto
1 parent fca573f commit c84f430

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

test/html/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ TESTS = \
2525
render/img-aspect-ratio.html \
2626
render/main-style.html \
2727
render/margin-auto.html \
28+
render/margin-auto-max-width.html \
2829
render/max-width-body.html \
2930
render/max-width-div-clamp.html \
3031
render/max-width-div.html \
@@ -50,6 +51,7 @@ TESTS = \
5051
XFAIL_TESTS = \
5152
render/div-100-percent-with-padding.html \
5253
render/float-img-justify.html \
54+
render/margin-auto-max-width.html \
5355
render/max-width-html.html \
5456
render/min-width-html.html \
5557
render/span-padding.html \
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Test CSS margin auto</title>
5+
<style>
6+
div {height:100px}
7+
.container {width: 300px; background: lightgreen}
8+
.child {max-width: 100px; background: brown; margin:auto }
9+
</style>
10+
</head>
11+
<body>
12+
<div class="container">
13+
<div class="child"></div>
14+
</div>
15+
</body>
16+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Test CSS margin auto</title>
5+
<style>
6+
div {height:100px}
7+
.container {width: 300px; background: lightgreen}
8+
.child {width: 100px; background: brown; margin:auto }
9+
</style>
10+
</head>
11+
<body>
12+
<div class="container">
13+
<div class="child"></div>
14+
</div>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)