Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-gaps/agnostic/gap-rule-layout-invalidation-row.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Gap Decorations: Layout invalidation when row gap rules become visible</title>
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
<style>
.box {
display: flex;
flex-direction: column;
width: 100px;
height: 25px;
gap: 5px;
row-rule-width: 5px;
row-rule-style: solid;
background: red;
}
.box > div {
flex: 1;
background: green;
}
#alpha-zero {
rule-color: transparent;
}
#alpha-nonzero {
rule-color: rgba(0, 128, 0, 0.01);
}
#alpha-zero.active, #alpha-nonzero.active {
rule-color: green;
}
#width-zero {
row-rule-width: 0px;
row-rule-color: green;
}
#width-zero.active {
row-rule-width: 5px;
}
#currentcolor-transparent {
color: transparent;
}
#currentcolor-transparent.active {
color: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="alpha-zero" class="box"><div></div><div></div></div>
<div id="alpha-nonzero" class="box"><div></div><div></div></div>
<div id="width-zero" class="box"><div></div><div></div></div>
<div id="currentcolor-transparent" class="box"><div></div><div></div></div>
<script>
document.body.offsetTop;
document.getElementById("alpha-zero").classList.add("active");
document.getElementById("alpha-nonzero").classList.add("active");
document.getElementById("width-zero").classList.add("active");
document.getElementById("currentcolor-transparent").classList.add("active");
</script>