Created
April 26, 2014 05:15
-
-
Save zhangchiqing/11312326 to your computer and use it in GitHub Desktop.
visible/hidden css pattern
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
// bulb is invisible without power | |
.bulb, | |
.bulb-inline, | |
.bulb-inline-block { | |
display: none; | |
} | |
// bulb is visible with power | |
.power .bulb { display: block; } | |
.power .bulb-inline { display: inline; } | |
.power .bulb-inline-block { display: inline-block; } | |
// darkness is visible without power, but is invisible with power | |
.power .darkness { display: none; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment