wpt / css / css-color / color-mix-currentcolor-003.html

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

/css/css-color/color-mix-currentcolor-003.html

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="match" href="color-mix-currentcolor-003-ref.html">
<title>currentColor is inherited correctly in color-mix()</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<style>
body {
    color: green;
}
div {
    color: color-mix(in srgb, currentColor 50%, white);
}
div > div {
    color: inherit;
}
</style>
<div>
    <div>This text should be pale green</div>
</div>

/css/css-color/color-mix-currentcolor-003-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>Reference: currentColor is inherited correctly in color-mix()</title>
<style>
div {
    color: color-mix(in srgb, green 50%, white);
}
</style>
<div>
    <div>This text should be pale green</div>
</div>