Skip to content

Instantly share code, notes, and snippets.

@jdlrobson
Created April 20, 2012 20:38
Show Gist options
  • Save jdlrobson/2431740 to your computer and use it in GitHub Desktop.
Save jdlrobson/2431740 to your computer and use it in GitHub Desktop.
wildcard css for mahemoff
<!DOCTYPE HTML>
<html>
<head>
<title>css fun</title>
<style type="text/css">
[class^="when-"] {
display: block;
}
[class^="when-not-"] {
display: none;
}
</style>
</head>
<body>
<div class='when-not-foo'>
.when-not-foo
</div>
<div class='when-not-bar'>
.when-not-bar
</div>
<div class='when-foo'>
.when-foo
</div>
<div class='when-bar'>
.when-bar
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment