diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-logical/inheritance.html')
-rw-r--r-- | testing/web-platform/tests/css/css-logical/inheritance.html | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-logical/inheritance.html b/testing/web-platform/tests/css/css-logical/inheritance.html new file mode 100644 index 0000000000..5546a20d6c --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/inheritance.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Inheritance of CSS Logical Properties and Values properties</title> +<link rel="help" href="https://www.w3.org/TR/css-logical-1/#property-index"> +<meta name="assert" content="Properties do not inherit."> +<meta name="assert" content="Properties have initial values according to the spec."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/inheritance-testcommon.js"></script> +</head> +<body> +<div id="reference-container"> + <div id="reference"></div> +</div> +<div id="container"> + <div id="target"></div> +</div> +<style> +#reference-container { + width: 300px; +} +#reference-container, #reference { + border-style: solid; /* Avoid border-top-width computed style 0 */ + border-top-width: medium; +} + +#container, #target { + border-block-end-style: solid; /* Avoid border-block-end-width computed style 0 */ + border-block-start-style: solid; + border-inline-end-style: solid; + border-inline-start-style: solid; +} + +#container { + color: blue; + width: 300px; +} +</style> +<script> +'use strict'; +const blue = "rgb(0, 0, 255)"; +const green = "rgb(0, 128, 0)"; +const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px +const referenceWidth = getComputedStyle(reference).width; // e.g. 294px + +assert_not_inherited('block-size', '0px', '10px'); + +assert_not_inherited('border-block-end-color', blue, green); +assert_not_inherited('border-block-end-style', 'none', 'dotted'); +assert_not_inherited('border-block-end-width', mediumWidth, '10px'); + +assert_not_inherited('border-block-start-color', blue, green); +assert_not_inherited('border-block-start-style', 'none', 'dotted'); +assert_not_inherited('border-block-start-width', mediumWidth, '10px'); + +assert_not_inherited('border-end-end-radius', '0px', '10px 20px'); +assert_not_inherited('border-end-start-radius', '0px', '10px 20px'); + +assert_not_inherited('border-inline-end-color', blue, green); +assert_not_inherited('border-inline-end-style', 'none', 'dotted'); +assert_not_inherited('border-inline-end-width', mediumWidth, '10px'); + +assert_not_inherited('border-inline-start-color', blue, green); +assert_not_inherited('border-inline-start-style', 'none', 'dotted'); +assert_not_inherited('border-inline-start-width', mediumWidth, '10px'); + +assert_not_inherited('border-start-end-radius', '0px', '10px 20px'); +assert_not_inherited('border-start-start-radius', '0px', '10px 20px'); + +assert_not_inherited('inline-size', referenceWidth, '10px'); + +assert_not_inherited('inset-block-end', 'auto', '10px'); +assert_not_inherited('inset-block-start', 'auto', '10px'); +assert_not_inherited('inset-inline-end', 'auto', '10px'); +assert_not_inherited('inset-inline-start', 'auto', '10px'); + +assert_not_inherited('margin-block-end', '0px', '10px'); +assert_not_inherited('margin-block-start', '0px', '10px'); +assert_not_inherited('margin-inline-end', '0px', '10px'); +assert_not_inherited('margin-inline-start', '0px', '10px'); + +assert_not_inherited('max-block-size', 'none', '10px'); +assert_not_inherited('max-inline-size', 'none', '10px'); +assert_not_inherited('min-block-size', '0px', '10px'); +assert_not_inherited('min-inline-size', '0px', '10px'); + +assert_not_inherited('padding-block-end', '0px', '10px'); +assert_not_inherited('padding-block-start', '0px', '10px'); +assert_not_inherited('padding-inline-end', '0px', '10px'); +assert_not_inherited('padding-inline-start', '0px', '10px'); +</script> +</body> +</html> |