mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Update web-platform-tests to revision fc33be9acfbf8e883fd9683c527aab22d842542b
This commit is contained in:
parent
d232705106
commit
09b1413275
32 changed files with 1112 additions and 577 deletions
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Box Alignment Test: computed value of normal on *-gap properties</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap">
|
||||
<meta assert="The computed value of [row-|column-]?gap is normal for all elements it applies to. Checking explicitely because earlier version of the spec called for 0px in some cases.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#col,
|
||||
#grid,
|
||||
#flex {
|
||||
/* Not using the shorthand because that's not what we're interested in,
|
||||
and there are implementations that support column-gap without supporting the shorthand */
|
||||
colum-gap: normal;
|
||||
row-gap: normal;
|
||||
float: right; /* for shrinkwrap*/
|
||||
}
|
||||
#col {
|
||||
column-count: 2;
|
||||
column-width: 50px;
|
||||
}
|
||||
#grid {
|
||||
display: grid;
|
||||
grid-template-columns: 50px 50px;
|
||||
grid-template-rows: 50px 50px;
|
||||
}
|
||||
#flex {
|
||||
display: flex;
|
||||
}
|
||||
#flex * { width: 50px; height: 50px;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<div id=col></div>
|
||||
<div id=grid></div>
|
||||
<div id=flex><span></span><span></span></div>
|
||||
|
||||
<script>
|
||||
test(
|
||||
function(){
|
||||
var target = document.getElementById("col");
|
||||
assert_equals(getComputedStyle(target).columnGap, "normal");
|
||||
}, "colum-gap:normal computes to normal on multicol elements");
|
||||
test(
|
||||
function(){
|
||||
var target = document.getElementById("col");
|
||||
assert_equals(getComputedStyle(target).rowGap, "normal");
|
||||
}, "row-gap:normal computes to normal on multicol elements");
|
||||
test(
|
||||
function(){
|
||||
var target = document.getElementById("grid");
|
||||
assert_equals(getComputedStyle(target).columnGap, "normal");
|
||||
}, "colum-gap:normal computes to normal on grid");
|
||||
test(
|
||||
function(){
|
||||
var target = document.getElementById("grid");
|
||||
assert_equals(getComputedStyle(target).rowGap, "normal");
|
||||
}, "row-gap:normal computes to normal on grid");
|
||||
test(
|
||||
function(){
|
||||
var target = document.getElementById("flex");
|
||||
assert_equals(getComputedStyle(target).columnGap, "normal");
|
||||
}, "colum-gap:normal (main axis) computes to normal on flexbox");
|
||||
test(
|
||||
function(){
|
||||
var target = document.getElementById("flex");
|
||||
assert_equals(getComputedStyle(target).rowGap, "normal");
|
||||
}, "row-gap:normal (cross axis) computes to normal on flexbox");
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Box Alignment Test: used value of *-gap:normal on grid</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap">
|
||||
<meta assert="The used value of row-gap and column-gap normal for grids is 0">
|
||||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
|
||||
<style>
|
||||
#grid {
|
||||
colum-gap: normal;
|
||||
row-gap: normal;
|
||||
display: grid;
|
||||
grid-template-columns: 50px 50px;
|
||||
grid-template-rows: 50px 50px;
|
||||
|
||||
position: absolute;
|
||||
}
|
||||
#grid * { background: green; }
|
||||
#red {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
|
||||
<div id=grid><span></span><span></span><span></span><span></span></div>
|
||||
<div id=red></div>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Box Alignment Test: used value of *-gap:normal on flexbox</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap">
|
||||
<meta assert="The used value row-gap:normal and column:normal normal is 0px in flexbox">
|
||||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
|
||||
<style>
|
||||
#flex {
|
||||
colum-gap: normal;
|
||||
row-gap: normal;
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
max-width: 145px; /* more than 100, less than 150, to force wrapping and get 2 items per line*/
|
||||
|
||||
position: absolute;
|
||||
}
|
||||
#flex * {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: green
|
||||
}
|
||||
#red {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
|
||||
<div id=flex><span></span><span></span><span></span><span></span></div>
|
||||
<div id=red></div>
|
Loading…
Add table
Add a link
Reference in a new issue