Created
July 23, 2012 16:08
-
-
Save GeorgeTzellis/3164440 to your computer and use it in GitHub Desktop.
:valid selector, RegExp patterns
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
/* :valid selector, RegExp patterns */ | |
:valid {background-color: lightgreen;} | |
:invalid {background-color: red;} | |
form { | |
margin: 4em 1em 0 1em; | |
} |
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
<form><fieldset>Type "sugar"<br> | |
<label>Feed me: </label><input type="text" pattern="sugar"> | |
<label>Me too: </label><input type="text" pattern="(s|su|sug|suga|sugar)"> | |
<label>Don't touch:</label><input type="text" pattern="^\d*$"> | |
</fieldset> | |
</form> |
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