Skip to content

Instantly share code, notes, and snippets.

@seanmadden
Forked from anonymous/grid.html
Created April 3, 2015 17:37
Show Gist options
  • Save seanmadden/a1aaf19d9bda9126e15e to your computer and use it in GitHub Desktop.
Save seanmadden/a1aaf19d9bda9126e15e to your computer and use it in GitHub Desktop.
<div data-grid="4">
<div data-span="4"></div> <!-- Select -->
<div data-span="1"></div>
<div data-span="1"></div>
<div data-span="3"></div>
<div data-span="1"></div>
<div data-span="2"></div>
<div data-span="1"></div>
<div data-span="1"></div>
</div>
Write a CSS selector that matches [data-span] elements whose cycling
sibling sum of the [data-span] attribute value is equal to the parent's
[data-grid]value. In this case its the first, fifth, and last
[data-span] element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment