Last active
August 29, 2015 14:05
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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