Created
March 26, 2015 18:54
-
-
Save timgthomas/b1c0563e388808061e35 to your computer and use it in GitHub Desktop.
Universal Selector Gotcha
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
/* This is bad, as it doesn't allow values to cascade. */ | |
* { | |
box-sizing: border-box; | |
font-weight: 500; | |
/* ... */ | |
} | |
/* This is good. Do this instead. */ | |
* { | |
box-sizing: inherit; | |
font-weight: inherit; | |
/* ... */ | |
} | |
html { | |
box-sizing: border-box; | |
font-weight: 500; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment