diff options
author | bptato <nincsnevem662@gmail.com> | 2024-10-05 19:46:20 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-10-05 20:11:09 +0200 |
commit | 954cef984a70c6e81ec9921a7a9c6982b9ff66e0 (patch) | |
tree | cb0baac7aa844ef5a38a6c730cd5d053bb77db9a /test | |
parent | 1f6314978683e71abd09b8d028934705119f9633 (diff) | |
download | chawan-954cef984a70c6e81ec9921a7a9c6982b9ff66e0.tar.gz |
layout: fix floats overriding margin/padding
Diffstat (limited to 'test')
-rw-r--r-- | test/layout/float-with-margins.expected | 4 | ||||
-rw-r--r-- | test/layout/float-with-margins.html | 21 | ||||
-rw-r--r-- | test/layout/float_negative_margin.expected | 1 | ||||
-rw-r--r-- | test/layout/float_negative_margin.html | 13 |
4 files changed, 25 insertions, 14 deletions
diff --git a/test/layout/float-with-margins.expected b/test/layout/float-with-margins.expected new file mode 100644 index 00000000..d45d0559 --- /dev/null +++ b/test/layout/float-with-margins.expected @@ -0,0 +1,4 @@ +testing aside +1 2 + 3 + 4 diff --git a/test/layout/float-with-margins.html b/test/layout/float-with-margins.html new file mode 100644 index 00000000..864a4e2b --- /dev/null +++ b/test/layout/float-with-margins.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<body> +<div style="width: 20ch"> +<div style="float: left; width: 20ch"> +testing +</div> +<aside style="float: left; margin-right: -10ch"> +aside +</aside> +</div> +<br> +<!-- test if margins & padding do not get consumed after a float --> +<div style="float: left">1</div> +<div style="margin-left: 3ch; padding-left: 3ch"> +2<br> +3<br> +4 +</div> +</body> +</html> diff --git a/test/layout/float_negative_margin.expected b/test/layout/float_negative_margin.expected deleted file mode 100644 index 0b4af186..00000000 --- a/test/layout/float_negative_margin.expected +++ /dev/null @@ -1 +0,0 @@ -testing aside diff --git a/test/layout/float_negative_margin.html b/test/layout/float_negative_margin.html deleted file mode 100644 index 70dcfa0c..00000000 --- a/test/layout/float_negative_margin.html +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE html> -<html> -<body> -<div style="width: 200px"> -<div style="float: left; width: 200px"> -testing -</div> -<aside style="float: left;margin-right: -100px;"> -aside -</aside> -</div> -</body> -</html> |