blob: 6e9ef2f9c1c7653c2fd52550bd2ea0997adc58bf [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>Forced colors mode - alpha channel.
Tests that the alpha channel for background colors are preserved in forced
colors mode.
<link rel="help" href="">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
div {
background-color: rgba(114, 173, 218, .3);
<body id="body">
<div id="div">
Background colors should maintain their alpha channels in forced
colors mode.
var body_color = getComputedStyle(body).backgroundColor;
var expected_div_color = body_color.replace(')', ', 0.3)').replace('rgb(', 'rgba(');
assert_equals(getComputedStyle(div).backgroundColor, expected_div_color);
}, "Checks that background color alpha channels are preserved in forced colors mode.");