wpt / css / css-align / default-alignment / parse-justify-items-003.html

Status: PASS | Duration: 67ms | Subtests: 22/22 | 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
Checking justify-items: normalPASS
Checking justify-items: stretchPASS
Checking justify-items: leftPASS
Checking justify-items: rightPASS
Checking justify-items: startPASS
Checking justify-items: endPASS
Checking justify-items: self-startPASS
Checking justify-items: self-endPASS
Checking justify-items: centerPASS
Checking justify-items: flex-startPASS
Checking justify-items: flex-endPASS
Checking justify-items: baselinePASS
Checking justify-items: first baselinePASS
Checking justify-items: last baselinePASS
Checking justify-items: safe flex-endPASS
Checking justify-items: unsafe endPASS
Checking justify-items: safe endPASS
Checking justify-items: unsafe flex-startPASS
Checking justify-items: safe centerPASS
Checking justify-items: legacy leftPASS
Checking justify-items: legacy centerPASS
Checking justify-items: legacy rightPASS

/css/css-align/default-alignment/parse-justify-items-003.html

<!DOCTYPE html>
<meta charset=utf-8>
<title>Default-Alignment: justify-items - setting values via JS</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-self-position" />
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-baseline-position" />
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-overflow-position" />
<meta name="assert" content="Check that the computed value is the specified value and the same than the JS value."/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
<div id="log"></div>
<script>
    element = document.createElement("div");
    document.body.appendChild(element);

    let classes = Object.assign({"Normal":"normal", "Stretch":"stretch", "Left":"left", "Right":"right"},
                                selfPositionClasses, baselineClasses, overflowClasses, legacyClasses);

    for (var key in classes) {
        let specifiedValue = classes[key];
        test(function() {
            element.style.justifyItems = "";
            element.style.justifyItems = specifiedValue;
            if (specifiedValue === "first baseline")
                checkValues(element, "justifyItems", "justify-items", "baseline", "baseline");
            else
                checkValues(element, "justifyItems", "justify-items",  specifiedValue, specifiedValue);
        }, "Checking justify-items: " + specifiedValue);
    }
</script>