wpt / css / css-grid / grid-definition / grid-minimum-contribution-with-percentages.html

Status: FAIL | Duration: 56ms | Subtests: 8/16 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
auto - columnsPASS
auto - rowsPASS
min - columnsFAILassert_equals: grid-template-columns expected "50px" but got "100px"
min - rowsFAILassert_equals: grid-template-rows expected "50px" but got "100px"
max - columnsPASS
max - rowsPASS
size - columnsPASS
size - rowsPASS
min max - columnsFAILassert_equals: grid-template-columns expected "50px" but got "100px"
min max - rowsFAILassert_equals: grid-template-rows expected "50px" but got "100px"
min size - columnsFAILassert_equals: grid-template-columns expected "50px" but got "100px"
min size - rowsFAILassert_equals: grid-template-rows expected "50px" but got "100px"
max size - columnsPASS
max size - rowsPASS
min max size - columnsFAILassert_equals: grid-template-columns expected "50px" but got "100px"
min max size - rowsFAILassert_equals: grid-template-rows expected "50px" but got "100px"

/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: minimum contribution with percentages</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-grid/#minimum-contribution">
<meta name="assert" content="Checks that the minimum contribution is the minimum size when the preferred size is 'auto' or contains a percentage.">
<style>
#grid {
  display: grid;
  height: 50px;
  width: 50px;
  grid: auto / auto;
}
#item {
  background: cyan;
}
#content {
  height: 100px;
  width: 100px;
}
.min {
  min-height: calc(100% + 50px);
  min-width: calc(100% + 50px);
}
.max {
  max-height: calc(100% - 50px);
  max-width: calc(100% - 50px);
}
.size {
  height: calc(100% + 10px);
  width: calc(100% + 10px);
}
</style>
<div id="log"></div>
<div id="grid">
  <div id="item">
    <div id="content"></div>
  </div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";
const cs = getComputedStyle(document.getElementById("grid"));
const item = document.getElementById("item");
function check(name, size) {
  item.className = name;
  test(function() {
    assert_equals(cs.gridTemplateColumns, size + "px", "grid-template-columns");
  }, name + " - columns");
  test(function() {
    assert_equals(cs.gridTemplateRows, size + "px", "grid-template-rows");
  }, name + " - rows");
}

// The minimum contribution is the automatic minimum size (100px)
// because the preferred size is 'auto'.
check("auto", 100);

// The minimum contribution is the minimum size (50px)
// because the preferred size is 'auto'.
check("min", 50);

// The minimum contribution is the automatic minimum size (100px)
// because the preferred size is 'auto'.
check("max", 100);

// The minimum contribution is the automatic minimum size (100px)
// because the preferred size depends on the containing block.
check("size", 100);

// The minimum contribution is the minimum size (50px)
// because the preferred size is 'auto'.
check("min max", 50);

// The minimum contribution is the minimum size (50px)
// because the preferred size depends on the containing block.
check("min size", 50);

// The minimum contribution is the automatic minimum size (100px)
// because the preferred size depends on the containing block.
check("max size", 100);

// The minimum contribution is the minimum size (50px)
// because the preferred size depends on the containing block.
check("min max size", 50);
</script>