Color inheritance experiment
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
/** | |
* Color inheritance experiment | |
*/ | |
html { | |
color: magenta; | |
font-size: 120%; | |
} | |
input, button, p, select { | |
font-size: inherit; | |
color: inherit; | |
/* don't set border color, so it will inherit from element's color*/ | |
border: 1px solid; | |
background: transparent; | |
} | |
[type="range"] { | |
-webkit-appearance: none; | |
min-width: 200px; | |
} | |
/* Borders color work for these inputs, | |
but selected state is not showing */ | |
[type="checkbox"], [type="radio"] { | |
-webkit-appearance: none; | |
width: 20px; | |
height: 20px; | |
} | |
[type="radio"] { | |
border-radius: 50%; | |
} |
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
<input type="color" value="#ff00ff" onchange="document.body.style.color = this.value" ></input> <-- change me<br><br> | |
<input type="text" value="Text Input" ></input> <input type="date" ></input> | |
<select><option>Item 1</option></select> <button>Button</button> | |
<input type="checkbox"></input><input type="radio"></input> | |
<input type="range"></input> | |
<p>Some content</p> |
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-vertical","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