wpt / css / css-backgrounds / background-clip-text-and-blend-mode.html

Status: FAIL | Duration: 26ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-backgrounds/background-clip-text-and-blend-mode.html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>CSS Backgrounds and Borders: background-clip color backgrounds</title>
    <link rel="match" href="reference/background-clip-text-and-blend-mode-ref.html">
    <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-clip">
    <style>
        .box {
            margin: 20px;
            width: 400px;
            border: 1px solid black;
            padding: 20px;
            font-size: 40pt;
            font-weight: 900;
            font-family: sans-serif;
            text-align: center;
            color: transparent;
        }

        .single-background {
            background-clip: text;
            background-image: url('resources/green-100.png');
            background-color: blue;
            background-blend-mode: lighten;
        }

        .middle-background {
            background-clip: text, border-box;
            background-image: url('resources/green-100.png'), url('resources/blue.png');
            background-color: cyan;
            background-blend-mode: difference, lighten;
        }

        .last-background {
            background-clip: border-box, text;
            background-image: url('resources/green-100.png'), url('resources/blue.png');
            background-color: yellow;
            background-blend-mode: difference, lighten;
        }
    </style>
</head>
<body>
    <div class="box single-background">Cyan text on white</div>
    <div class="box middle-background">Blue text on cyan</div>
    <div class="box last-background">Red text on lime</div>
</body>
</html>

/css/css-backgrounds/reference/background-clip-text-and-blend-mode-ref.html

<!DOCTYPE html>
<html>
<head>
    <style>
        .box {
            margin: 20px;
            width: 400px;
            border: 1px solid black;
            padding: 20px;
            font-size: 40pt;
            font-weight: 900;
            font-family: sans-serif;
            text-align: center;
        }

        .single-background {
            color: cyan;
        }

        .middle-background {
            background-color: cyan;
            color: blue;
        }

        .last-background {
            background-color: lime;
            color: red;
        }
    </style>
</head>
<body>
    <div class="box single-background">Cyan text on white</div>
    <div class="box middle-background">Blue text on cyan</div>
    <div class="box last-background">Red text on lime</div>
</body>
</html>