-
-
Save svgeesus/63385c5b47840b175c54f8e60e3d569b to your computer and use it in GitHub Desktop.
Test inherited value of currentColor is the keyword currentColor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Test inherited value of currentColor is the keyword currentColor | |
"This happens at used-value time, which means that if the value is inherited, it’s | |
inherited as currentcolor, not as the value of the color property, so descendants | |
will use their own color property to resolve it." | |
*/ | |
.outer {color: red; | |
background-color: currentColor; | |
font-size: 200%; | |
width: 6em; | |
height: 6em; } | |
.middle {background-color: inherit; | |
width: 6em; | |
height: 6em;} | |
.inner {color: green; | |
background-color: inherit; | |
width: 6em; | |
height: 6em; | |
font-weight: bold;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> <p>Test passes if you see a green square, and no red.</p> | |
<div class="outer"><div class="middle"><div class="inner">FAIL</div></div></div> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment