Last active
August 29, 2015 14:03
-
-
Save breezhang/3d915de0080afc59705a to your computer and use it in GitHub Desktop.
The Complete Set
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
stylesheet.insertRule(rule, index) | |
https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet.insertRule | |
CSSStyleSheet.deleteRule() | |
document.styleSheets[0].insertRule('#elid:hover { background-color: red; }', 0); | |
document.styleSheets[0].cssRules[0].style.backgroundColor= 'red'; | |
=== | |
document.styleSheets[0].addRule('#elid:hover', 'background-color: red', 0); | |
document.styleSheets[0].rules[0].style.backgroundColor= 'red'; |
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
:first-child :first-of-type :only-child | |
:last-child :last-of-type :only-of-type | |
:nth-child :nth-of-type | |
:nth-last-child :nth-last-of-type | |
::first-letter ::first-line ::first-word | |
::last-letter ::last-line ::last-word | |
::nth-letter ::nth-line ::nth-word | |
::nth-last-letter ::nth-last-line ::nth-last-word |
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
window.Sizzle = jQuery.find; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment