Skip to content

Instantly share code, notes, and snippets.

@jsocol
Created September 26, 2012 19:28
Show Gist options
  • Select an option

  • Save jsocol/3790030 to your computer and use it in GitHub Desktop.

Select an option

Save jsocol/3790030 to your computer and use it in GitHub Desktop.
Specificity
<!DOCTYPE html>
<html>
<head>
<style>
a {
display: block;
}
a.foo {
background-color: green;
}
a.foo.selected {
background-color: blue;
}
a.foo:hover {
background-color: red;
}
a.foo.selected:hover {
background-color: white;
}
</style>
</head>
<body>
<a href="#" class="foo">blagityblag</a>
<a href="#" class="foo selected">blargity</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment