Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 9c17374

Browse files
CSS: Test height and width do not inherit
WPT to verify the width and height properties do not inherit. https://drafts.csswg.org/css-sizing-3/#propdef-width Change-Id: Ib35db7d4d5b55a5bc1b56db38eff49ec0fb4c427 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741785 Reviewed-by: Emil A Eklund <[email protected]> Commit-Queue: Emil A Eklund <[email protected]> Auto-Submit: Eric Willigers <[email protected]> Cr-Commit-Position: refs/heads/master@{#685251}
1 parent b1fd38d commit 9c17374

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

css/css-sizing/inheritance.html renamed to css/css-sizing/inheritance-001.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
assert_not_inherited('max-width', 'none', '10px');
2626
assert_not_inherited('min-height', 'auto', '10px');
2727
assert_not_inherited('min-width', 'auto', '10px');
28-
29-
// height, width not yet tested.
3028
</script>
3129
</body>
3230
</html>

css/css-sizing/inheritance-002.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Inheritance of CSS Intrinsic & Extrinsic Sizing properties</title>
6+
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#property-index">
7+
<meta name="assert" content="Properties do not inherit.">
8+
<meta name="assert" content="Properties have initial values according to the spec.">
9+
<script src="/resources/testharness.js"></script>
10+
<script src="/resources/testharnessreport.js"></script>
11+
<script src="/css/support/inheritance-testcommon.js"></script>
12+
<style>
13+
#target {
14+
position: absolute;
15+
}
16+
</style>
17+
</head>
18+
<body>
19+
<div id="container">
20+
<div id="target"></div>
21+
</div>
22+
<script>
23+
// Without position absolute, the initial value
24+
// 'auto' gives the size of the parent element.
25+
assert_not_inherited('height', '0px', '10px');
26+
assert_not_inherited('width', '0px', '10px');
27+
</script>
28+
</body>
29+
</html>

0 commit comments

Comments
 (0)