forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-sizing] Computed min/max width/height (web-platform-tests#18521)
The computed value for the following properties is as specified, with <length-percentage> values computed. - min-width - min-height - max-width - max-height https://drafts.csswg.org/css-sizing-3/#min-size-properties https://drafts.csswg.org/css-sizing-3/#max-size-properties
- Loading branch information
1 parent
071a2e4
commit a655237
Showing
4 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS basic box model: getComputedStyle().maxHeight</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height"> | ||
<meta name="assert" content="max-height computed value is as specified, with <length-percentage> values computed"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("max-height", "none"); | ||
test_computed_value("max-height", "min-content"); | ||
test_computed_value("max-height", "max-content"); | ||
|
||
test_computed_value("max-height", "10px"); | ||
test_computed_value("max-height", "20%"); | ||
|
||
test_computed_value('max-height', 'calc(10% + 40px)'); | ||
test_computed_value('max-height', 'calc(10px - 0.5em)', '0px'); | ||
test_computed_value('max-height', 'calc(10px + 0.5em)', '30px'); | ||
|
||
// fit-content not yet tested | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS basic box model: getComputedStyle().maxWidth</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-width"> | ||
<meta name="assert" content="max-width computed value is as specified, with <length-percentage> values computed"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("max-width", "none"); | ||
test_computed_value("max-width", "min-content"); | ||
test_computed_value("max-width", "max-content"); | ||
|
||
test_computed_value("max-width", "10px"); | ||
test_computed_value("max-width", "20%"); | ||
|
||
test_computed_value('max-width', 'calc(10% + 40px)'); | ||
test_computed_value('max-width', 'calc(10px - 0.5em)', '0px'); | ||
test_computed_value('max-width', 'calc(10px + 0.5em)', '30px'); | ||
|
||
// fit-content not yet tested | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS basic box model: getComputedStyle().minHeight</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-height"> | ||
<meta name="assert" content="min-height computed value is as specified, with <length-percentage> values computed"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("min-height", "min-content"); | ||
test_computed_value("min-height", "max-content"); | ||
|
||
test_computed_value("min-height", "10px"); | ||
test_computed_value("min-height", "20%"); | ||
|
||
test_computed_value('min-height', 'calc(10% + 40px)'); | ||
test_computed_value('min-height', 'calc(10px - 0.5em)', '0px'); | ||
test_computed_value('min-height', 'calc(10px + 0.5em)', '30px'); | ||
|
||
// fit-content not yet tested | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS basic box model: getComputedStyle().minWidth</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width"> | ||
<meta name="assert" content="min-width computed value is as specified, with <length-percentage> values computed"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("min-width", "min-content"); | ||
test_computed_value("min-width", "max-content"); | ||
|
||
test_computed_value("min-width", "10px"); | ||
test_computed_value("min-width", "20%"); | ||
|
||
test_computed_value('min-width', 'calc(10% + 40px)'); | ||
test_computed_value('min-width', 'calc(10px - 0.5em)', '0px'); | ||
test_computed_value('min-width', 'calc(10px + 0.5em)', '30px'); | ||
|
||
// fit-content not yet tested | ||
</script> | ||
</body> | ||
</html> |