mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1555402 [wpt PR 14948] - [css-logical] Inheritance, initial values, a=testonly
Automatic update from web-platform-tests [css-logical] Inheritance, initial values (#14948) Test that CSS Logical Properties and Values properties do not inherit. Test that initial values match the spec. https://www.w3.org/TR/css-logical-1/#property-index Co-authored-by: Eric Willigers <ericwilligers@chromium.org> -- wp5At-commits: f6a6bd5e4353ec9f236e53b7af1389cab0aae3a9 wpt-pr: 14948
This commit is contained in:
parent
06489a248f
commit
0c79618b1e
95
testing/web-platform/tests/css/css-logical/inheritance.html
Normal file
95
testing/web-platform/tests/css/css-logical/inheritance.html
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user