Skip to content

Instantly share code, notes, and snippets.

@roblg
Last active December 19, 2015 20:48
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 roblg/eb2629d69982e2e8135c to your computer and use it in GitHub Desktop.
Save roblg/eb2629d69982e2e8135c to your computer and use it in GitHub Desktop.
Simple test case for chaining duplicate CSS selectors.
<html>
<head>
<!--
Uncomment this if you want to have IE pretend to be IE8
<meta http-equiv="X-UA-Compatible" content="IE=8">
-->
<style type="text/css">
.examples .first.first { color: green;}
.examples .first { color: red;}
#list#list .second {color: green;}
#list .second {color: red;}
#list > :last-child:last-child {color: green;}
#list > :last-child {color: black;}
</style>
</head>
<body>
<div id="list" class="examples">
<div class="first example">If chaining class selectors works, this will be green.</div>
<div class="second example">If chaining ID selectors works, this will be green.</div>
<div class="third example">If chaining psuedoclasses works, this will be green.</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment