diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-grid/grid-model/grid-computed-value-display-floated-items-001.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-grid/grid-model/grid-computed-value-display-floated-items-001.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/grid-model/grid-computed-value-display-floated-items-001.html | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-computed-value-display-floated-items-001.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-computed-value-display-floated-items-001.html new file mode 100644 index 0000000000..17c0fbd1b1 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-computed-value-display-floated-items-001.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: 'float' affects to the computed value of 'display' on grid items</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers"> +<link rel="help" href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo" title="9.7 Relationships between 'display', 'position', and 'float'"> +<meta name="flags" content="dom"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + #grid { + display: grid; + } + + #inline-grid { + display: inline-grid; + } + + .inline-table { + display: inline-table; + } + + .inline { + display: inline; + } + + .flex { + display: flex; + } + + .float { + float: left; + } +</style> +<div id="log"></div> + +<div id="grid"> + <div id="grid-inline-table" class="float inline-table"></div> + <div id="grid-inline" class="float inline"></div> + <div id="grid-flex" class="float flex"></div> +</div> +<div id="inline-grid"> + <div id="inline-grid-inline-table" class="float inline-table"></div> + <div id="inline-grid-inline" class="float inline"></div> + <div id="inline-grid-flex" class="float flex"></div> +</div> + +<script> + function testComputedStyleDisplay(element, value) { + assert_equals(getComputedStyle(element).getPropertyValue("display"), value, "getComputedStyle() display should be '" + value + "'"); + } + + var gridInlineTable = document.getElementById("grid-inline-table"); + test(function() { + testComputedStyleDisplay(gridInlineTable, "table"); + }, "Test display floated 'inline-table' grid item"); + + var gridInline = document.getElementById("grid-inline"); + test(function() { + testComputedStyleDisplay(gridInline, "block"); + }, "Test display floated 'inline' grid item"); + + var gridFlex = document.getElementById("grid-flex"); + test(function() { + testComputedStyleDisplay(gridFlex, "flex"); + }, "Test display floated 'flex' grid item"); + + var inlineGridInlineTable = document.getElementById("inline-grid-inline-table"); + test(function() { + testComputedStyleDisplay(inlineGridInlineTable, "table"); + }, "Test display floated 'inline-table' grid item within an inline grid"); + + var inlineGridInline = document.getElementById("inline-grid-inline"); + test(function() { + testComputedStyleDisplay(inlineGridInline, "block"); + }, "Test display floated 'inline' grid item within an inline grid"); + + var inlineGridFlex = document.getElementById("inline-grid-flex"); + test(function() { + testComputedStyleDisplay(inlineGridFlex, "flex"); + }, "Test display floated 'flex' grid item within an inline grid"); +</script> |