about summary refs log tree commit diff stats
path: root/test/layout/min-max-width.html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-21 21:26:27 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-21 21:28:45 +0200
commite3d9ee2c6224cd30bf56e24f7988899e0e3985c1 (patch)
tree31116d7d751d058f32bf43313c12673423e8d8be /test/layout/min-max-width.html
parentba88f015ea500bcc574b621392c721ef2c9dbcd0 (diff)
downloadchawan-e3d9ee2c6224cd30bf56e24f7988899e0e3985c1.tar.gz
test: add js & layout tests
(Sadly some layout tests still fail.)
Diffstat (limited to 'test/layout/min-max-width.html')
-rw-r--r--test/layout/min-max-width.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/layout/min-max-width.html b/test/layout/min-max-width.html
new file mode 100644
index 00000000..c76a9b13
--- /dev/null
+++ b/test/layout/min-max-width.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<style>
+#one {
+	width: 10ch;
+	max-width: 2ch;
+	background-color: blue;
+}
+#two {
+	width: 10ch;
+	max-width: 2ch;
+	background-color: red;
+	display: inline-block;
+}
+#three {
+	width: 10ch;
+	max-width: 2ch;
+	background-color: green;
+	display: block;
+}
+#four {
+	width: fit-content(5ch);
+	background-color: purple;
+	max-width: 3ch;
+}
+</style>
+<div id=one>
+	<span><span>This box should have a 2ch wide blue background and should wrap on every word.</span></span>
+</div>
+<div id=two>x</div>This text should be displayed after a 2ch wide red box.
+<div id=three><div>This text should have a 2ch wide green background and should wrap on every word.</div></div>
+<div id=four>II</div>