wpt / css / css-gaps / multicol / multicol-gap-decorations-019.html

Status: PASS | Duration: 6ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-gaps/multicol/multicol-gap-decorations-019.html

<!DOCTYPE html>
<html class="reftest-wait">
<head>
    <title>column-rule-color declared with repeaters that depend on currentcolor should be recomputed when currentcolor changes</title>
    <link rel="match" href="../agnostic/gap-decorations-003-ref.html">
    <link rel="help" href="https://drafts.csswg.org/css-color-4/#resolving-other-colors">
    <link rel="author" href="mailto:javiercon@microsoft.com">
</head>
<style>
    body {
        margin: 0px;
    }

    #current {
        color: firebrick;
        columns: 6;
        column-gap: 2px;
        column-rule-style: solid;
        column-rule-width: 2px;
        column-fill: auto;
        height: 20px;
        column-rule-color: repeat(auto, currentColor);

        width: 72px;
        height: 20px;
    }

    .items {
        background-color: lightgreen;
        height: 20px
    }
</style>
</head>
<body>
    <div id="current">
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
    </div>
</body>
<script>
    // Use double requestAnimationFrame to remove need of setTimeout.
    // Wait for the first frame to ensure that the style is computed.
    requestAnimationFrame(() => {
        // Wait for the second frame to ensure that the style is painted.
        requestAnimationFrame(() => {
            document.getElementById("current").style.color = "hotpink";
            document.documentElement.classList.remove("reftest-wait");
        });
    });
</script>
</html>

/css/css-gaps/agnostic/gap-decorations-003-ref.html

<!DOCTYPE html>
<style>
    body {
        margin: 0px;
    }
    #current {
        columns: 6;
        column-gap: 2px;
        column-rule-style: solid;
        column-rule-width: 2px;
        column-fill: auto;
        height: 20px;
        column-rule-color: hotpink;
        width: 72px;
        height: 20px;
    }
    .items {
        background-color: lightgreen;
        height: 20px
    }
</style>
<body>
    <div id="current">
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
        <div class="items"></div>
    </div>
</body>
</html>