mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6'
This commit is contained in:
parent
cfef75c99b
commit
bb34f95b33
1683 changed files with 37170 additions and 4252 deletions
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="block-start trimmed margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min-content;
|
||||
margin-trim: block-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-top="0" data-offset-y="8"></item>
|
||||
<item data-expected-margin-top="10" data-offset-y="68"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="trimmed inline-end margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min-content;
|
||||
margin-trim: inline-end;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
item:nth-child(1) {
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
item:nth-child(2) {
|
||||
margin-inline-end: -10px;
|
||||
}
|
||||
item:nth-child(3) {
|
||||
margin-inline-end: 30%;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-right="0" data-offset-x="8"></item>
|
||||
<item data-expected-margin-right="0" data-offset-x="8"></item>
|
||||
<item data-expected-margin-right="0" data-offset-x="8"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="block-start trimmed margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
width: 10px;
|
||||
height: 110px;
|
||||
margin-trim: block-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-offset-y="8" data-expected-margin-top="0"></item>
|
||||
<item data-offset-y="68" data-expected-margin-top="10"></item>
|
||||
<item data-offset-y="8" data-expected-margin-top="0"></item>
|
||||
<item data-offset-y="68" data-expected-margin-top="10"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="trimmed inline-end margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
width: min-content;
|
||||
height: 100px;
|
||||
margin-trim: inline-end;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-offset-x="8" data-expected-margin-right="10"></item>
|
||||
<item data-offset-x="8" data-expected-margin-right="10"></item>
|
||||
<item data-offset-x="68" data-expected-margin-right="0"></item>
|
||||
<item data-offset-x="68" data-expected-margin-right="0"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Make sure margins are no longer trimmed when margin-trim is changed to none on the flexbox">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min-content;
|
||||
margin-trim: block-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-top="10" data-offset-y="18"></item>
|
||||
<item data-expected-margin-top="10" data-offset-y="78"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
<script>
|
||||
// Force the first layout to trim margins, set margin-trim to none,
|
||||
// force a second layout, and then check to see if the margins were added back
|
||||
document.body.offsetHeight;
|
||||
document.querySelector("flexbox").style["margin-trim"] = "none";
|
||||
document.body.offsetHeight;
|
||||
checkLayout("flexbox > item");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="block-start trimmed margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
margin-trim: block-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-inline: 10px;
|
||||
}
|
||||
item:nth-child(1) {
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
item:nth-child(2) {
|
||||
margin-block-start: -10px;
|
||||
}
|
||||
item:nth-child(3) {
|
||||
margin-block-start: 30%;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-top="0" data-offset-y="8"></item>
|
||||
<item data-expected-margin-top="0" data-offset-y="8"></item>
|
||||
<item data-expected-margin-top="0" data-offset-y="8"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="trimmed inline-end margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
margin-trim: inline-end;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-inline-end: 20px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-right="20" data-offset-x="8"></item>
|
||||
<item data-expected-margin-right="20" data-offset-x="78"></item>
|
||||
<item data-expected-margin-right="0" data-offset-x="148"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="block-start trimmed margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: 100px;
|
||||
flex-wrap: wrap;
|
||||
margin-trim: block-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
item:nth-child(1) {
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
item:nth-child(2) {
|
||||
margin-block-start: -10px;
|
||||
}
|
||||
item:nth-child(3) {
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
item:nth-child(4) {
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-top="0" data-offset-y="8"></item>
|
||||
<item data-expected-margin-top="0" data-offset-y="8"></item>
|
||||
<item data-expected-margin-top="10" data-offset-y="68"></item>
|
||||
<item data-expected-margin-top="10" data-offset-y="68"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="trimmed inline-end margins should be reflected in computed style">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: 110px;
|
||||
flex-wrap: wrap;
|
||||
margin-trim: inline-end;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
item:nth-child(1) {
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
item:nth-child(2) {
|
||||
margin-inline-end: -10px;
|
||||
}
|
||||
item:nth-child(3) {
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
item:nth-child(4) {
|
||||
margin-inline-end: 50%;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('flexbox > item')">
|
||||
<div id="target">
|
||||
<flexbox>
|
||||
<item data-expected-margin-right="10" data-offset-x="8"></item>
|
||||
<item data-expected-margin-right="0" data-offset-x="68"></item>
|
||||
<item data-expected-margin-right="10" data-offset-x="8"></item>
|
||||
<item data-expected-margin-right="0" data-offset-x="68"></item>
|
||||
</flexbox>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.margin {
|
||||
margin-block-end: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox>
|
||||
<item class="margin"></item>
|
||||
</flexbox>
|
||||
<flexbox>
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<link rel="match" href="flex-column-style-change-triggers-layout-block-end-ref.html">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.initial-margin-trim {
|
||||
margin-trim: block-end;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-block-end: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox class="initial-margin-trim" id="to-no-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
<flexbox id="to-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.getElementById("to-no-margin-trim").style["margin-trim"] = "none";
|
||||
document.getElementById("to-margin-trim").style["margin-trim"] = "block-end";
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.margin {
|
||||
margin-block: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox>
|
||||
<item class="margin"></item>
|
||||
</flexbox>
|
||||
<flexbox>
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.margin {
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox>
|
||||
<item class="margin"></item>
|
||||
</flexbox>
|
||||
<flexbox>
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<link rel="match" href="flex-column-style-change-triggers-layout-block-start-ref.html">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.initial-margin-trim {
|
||||
margin-trim: block-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-block-start: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox class="initial-margin-trim" id="to-no-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
<flexbox id="to-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.getElementById("to-no-margin-trim").style["margin-trim"] = "none";
|
||||
document.getElementById("to-margin-trim").style["margin-trim"] = "block-start";
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<link rel="match" href="flex-column-style-change-triggers-layout-block-ref.html">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.initial-margin-trim {
|
||||
margin-trim: block;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-block: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox class="initial-margin-trim" id="to-no-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
<flexbox id="to-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.getElementById("to-no-margin-trim").style["margin-trim"] = "none";
|
||||
document.getElementById("to-margin-trim").style["margin-trim"] = "block";
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.margin {
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox>
|
||||
<item class="margin"></item>
|
||||
</flexbox>
|
||||
<flexbox>
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<link rel="match" href="flex-row-style-change-triggers-layout-inline-end-ref.html">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.initial-margin-trim {
|
||||
margin-trim: inline-end;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox id="to-no-margin-trim" class="initial-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
<flexbox id="to-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.getElementById("to-no-margin-trim").style["margin-trim"] = "none";
|
||||
document.getElementById("to-margin-trim").style["margin-trim"] = "inline-end";
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.margin {
|
||||
margin-inline: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox>
|
||||
<item class="margin"></item>
|
||||
</flexbox>
|
||||
<flexbox>
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.margin {
|
||||
margin-inline-start: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox>
|
||||
<item class="margin"></item>
|
||||
</flexbox>
|
||||
<flexbox>
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<link rel="match" href="flex-row-style-change-triggers-layout-inline-start-ref.html">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.initial-margin-trim {
|
||||
margin-trim: inline-start;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-inline-start: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox class="initial-margin-trim" id="to-no-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
<flexbox id="to-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.getElementById("to-no-margin-trim").style["margin-trim"] = "none";
|
||||
document.getElementById("to-margin-trim").style["margin-trim"] = "inline-start";
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex">
|
||||
<link rel="match" href="flex-row-style-change-triggers-layout-inline-ref.html">
|
||||
<meta name="assert" content="Flex items react to change in their flexbox's margin-trim value">
|
||||
<style>
|
||||
flexbox {
|
||||
display: flex;
|
||||
width: min-content;
|
||||
flex-wrap: wrap;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.initial-margin-trim {
|
||||
margin-trim: inline;
|
||||
}
|
||||
item {
|
||||
display: block;
|
||||
background-color: green;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-inline: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<flexbox class="initial-margin-trim" id="to-no-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
<flexbox id="to-margin-trim">
|
||||
<item></item>
|
||||
</flexbox>
|
||||
</body>
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.getElementById("to-no-margin-trim").style["margin-trim"] = "none";
|
||||
document.getElementById("to-margin-trim").style["margin-trim"] = "inline";
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue