Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-color/t44-currentcolor-inherited-c.xht - WPT Dashboard Interop Dashboard
<head>
<title>CSS Test: currentColor (with 'background-color')</title>
<link rel="match" href="t44-currentcolor-inherited-c-ref.xht" />
<meta name="assert" content="currentColor is a computed value" />
<style type="text/css"><![CDATA[
#one {
color: red;
background: currentColor;
}
#two {
color: green;
/* inherit currentColor, which then is green */
background: inherit;
}
#three {
color: white;
}
]]></style>
</head>
<body>
<div id="one"><div id="two"><p id="three">This paragraph should have a green background.</p></div></div>
</body>
</html>