Skip to content

Instantly share code, notes, and snippets.

@zhangchiqing
Created April 26, 2014 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangchiqing/11312326 to your computer and use it in GitHub Desktop.
Save zhangchiqing/11312326 to your computer and use it in GitHub Desktop.
visible/hidden css pattern
// 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