Skip to content

Instantly share code, notes, and snippets.

@EvanLovely
Last active August 29, 2015 14:05
Show Gist options
  • Save EvanLovely/061cce70422e28ae35b6 to your computer and use it in GitHub Desktop.
Save EvanLovely/061cce70422e28ae35b6 to your computer and use it in GitHub Desktop.
Debug SCSS grid layouts (like Singularity) by adding the grid order and classes assigned to it over the item
.grid-container {
//debugger
counter-reset: grid-item;
[class*="grid-span-"] {
outline: dotted 1px red;
position: relative;
&:hover {
&:before,
&:after {
background: hsla(0,0%,0%,0.0);
font-size: 1px;
}
}
&:before {
content: counter(grid-item);
counter-increment: grid-item;
color: white;
font-size: 40px;
font-weight: bold;
text-align: center;
z-index: 1;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: hsla(0, 0%, 0%, 0.5);
padding-top: 15px;
}
&:after {
content: "class: " attr(class);
position: absolute;
top: 70px;
font-size: 18px;
color: white;
text-align: center;
z-index: 2;
display: block;
width: 100%;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment