Created
March 4, 2015 19:06
-
-
Save jdsteinbach/cf988bd0e070f0c0e897 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
| .box-1 | |
| .box-2 | |
| .box-3 | |
| .box-4 |
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
| // ---- | |
| // Sass (v3.4.12) | |
| // Compass (v1.0.3) | |
| // ---- | |
| .specials-group { | |
| @for $i from 1 through 5 { | |
| &:nth-last-child(#{$i}):first-child { | |
| &, | |
| & ~ * { | |
| .specials-group-title { | |
| position: absolute; | |
| right: 0; | |
| left: 0; | |
| z-index: 2; | |
| + * { | |
| padding-top: (1em * $i); | |
| } | |
| } | |
| @for $j from 1 through 5 { | |
| &:nth-child(#{$j}) { | |
| .specials-group-title { | |
| top: ($j - 1) * 4em; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
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
| .specials-group:nth-last-child(1):first-child .specials-group-title, .specials-group:nth-last-child(1):first-child ~ * .specials-group-title { | |
| position: absolute; | |
| right: 0; | |
| left: 0; | |
| z-index: 2; | |
| } | |
| .specials-group:nth-last-child(1):first-child .specials-group-title + *, .specials-group:nth-last-child(1):first-child ~ * .specials-group-title + * { | |
| padding-top: 1em; | |
| } | |
| .specials-group:nth-last-child(1):first-child:nth-child(1) .specials-group-title, .specials-group:nth-last-child(1):first-child ~ *:nth-child(1) .specials-group-title { | |
| top: 0em; | |
| } | |
| .specials-group:nth-last-child(1):first-child:nth-child(2) .specials-group-title, .specials-group:nth-last-child(1):first-child ~ *:nth-child(2) .specials-group-title { | |
| top: 4em; | |
| } | |
| .specials-group:nth-last-child(1):first-child:nth-child(3) .specials-group-title, .specials-group:nth-last-child(1):first-child ~ *:nth-child(3) .specials-group-title { | |
| top: 8em; | |
| } | |
| .specials-group:nth-last-child(1):first-child:nth-child(4) .specials-group-title, .specials-group:nth-last-child(1):first-child ~ *:nth-child(4) .specials-group-title { | |
| top: 12em; | |
| } | |
| .specials-group:nth-last-child(1):first-child:nth-child(5) .specials-group-title, .specials-group:nth-last-child(1):first-child ~ *:nth-child(5) .specials-group-title { | |
| top: 16em; | |
| } | |
| .specials-group:nth-last-child(2):first-child .specials-group-title, .specials-group:nth-last-child(2):first-child ~ * .specials-group-title { | |
| position: absolute; | |
| right: 0; | |
| left: 0; | |
| z-index: 2; | |
| } | |
| .specials-group:nth-last-child(2):first-child .specials-group-title + *, .specials-group:nth-last-child(2):first-child ~ * .specials-group-title + * { | |
| padding-top: 2em; | |
| } | |
| .specials-group:nth-last-child(2):first-child:nth-child(1) .specials-group-title, .specials-group:nth-last-child(2):first-child ~ *:nth-child(1) .specials-group-title { | |
| top: 0em; | |
| } | |
| .specials-group:nth-last-child(2):first-child:nth-child(2) .specials-group-title, .specials-group:nth-last-child(2):first-child ~ *:nth-child(2) .specials-group-title { | |
| top: 4em; | |
| } | |
| .specials-group:nth-last-child(2):first-child:nth-child(3) .specials-group-title, .specials-group:nth-last-child(2):first-child ~ *:nth-child(3) .specials-group-title { | |
| top: 8em; | |
| } | |
| .specials-group:nth-last-child(2):first-child:nth-child(4) .specials-group-title, .specials-group:nth-last-child(2):first-child ~ *:nth-child(4) .specials-group-title { | |
| top: 12em; | |
| } | |
| .specials-group:nth-last-child(2):first-child:nth-child(5) .specials-group-title, .specials-group:nth-last-child(2):first-child ~ *:nth-child(5) .specials-group-title { | |
| top: 16em; | |
| } | |
| .specials-group:nth-last-child(3):first-child .specials-group-title, .specials-group:nth-last-child(3):first-child ~ * .specials-group-title { | |
| position: absolute; | |
| right: 0; | |
| left: 0; | |
| z-index: 2; | |
| } | |
| .specials-group:nth-last-child(3):first-child .specials-group-title + *, .specials-group:nth-last-child(3):first-child ~ * .specials-group-title + * { | |
| padding-top: 3em; | |
| } | |
| .specials-group:nth-last-child(3):first-child:nth-child(1) .specials-group-title, .specials-group:nth-last-child(3):first-child ~ *:nth-child(1) .specials-group-title { | |
| top: 0em; | |
| } | |
| .specials-group:nth-last-child(3):first-child:nth-child(2) .specials-group-title, .specials-group:nth-last-child(3):first-child ~ *:nth-child(2) .specials-group-title { | |
| top: 4em; | |
| } | |
| .specials-group:nth-last-child(3):first-child:nth-child(3) .specials-group-title, .specials-group:nth-last-child(3):first-child ~ *:nth-child(3) .specials-group-title { | |
| top: 8em; | |
| } | |
| .specials-group:nth-last-child(3):first-child:nth-child(4) .specials-group-title, .specials-group:nth-last-child(3):first-child ~ *:nth-child(4) .specials-group-title { | |
| top: 12em; | |
| } | |
| .specials-group:nth-last-child(3):first-child:nth-child(5) .specials-group-title, .specials-group:nth-last-child(3):first-child ~ *:nth-child(5) .specials-group-title { | |
| top: 16em; | |
| } | |
| .specials-group:nth-last-child(4):first-child .specials-group-title, .specials-group:nth-last-child(4):first-child ~ * .specials-group-title { | |
| position: absolute; | |
| right: 0; | |
| left: 0; | |
| z-index: 2; | |
| } | |
| .specials-group:nth-last-child(4):first-child .specials-group-title + *, .specials-group:nth-last-child(4):first-child ~ * .specials-group-title + * { | |
| padding-top: 4em; | |
| } | |
| .specials-group:nth-last-child(4):first-child:nth-child(1) .specials-group-title, .specials-group:nth-last-child(4):first-child ~ *:nth-child(1) .specials-group-title { | |
| top: 0em; | |
| } | |
| .specials-group:nth-last-child(4):first-child:nth-child(2) .specials-group-title, .specials-group:nth-last-child(4):first-child ~ *:nth-child(2) .specials-group-title { | |
| top: 4em; | |
| } | |
| .specials-group:nth-last-child(4):first-child:nth-child(3) .specials-group-title, .specials-group:nth-last-child(4):first-child ~ *:nth-child(3) .specials-group-title { | |
| top: 8em; | |
| } | |
| .specials-group:nth-last-child(4):first-child:nth-child(4) .specials-group-title, .specials-group:nth-last-child(4):first-child ~ *:nth-child(4) .specials-group-title { | |
| top: 12em; | |
| } | |
| .specials-group:nth-last-child(4):first-child:nth-child(5) .specials-group-title, .specials-group:nth-last-child(4):first-child ~ *:nth-child(5) .specials-group-title { | |
| top: 16em; | |
| } | |
| .specials-group:nth-last-child(5):first-child .specials-group-title, .specials-group:nth-last-child(5):first-child ~ * .specials-group-title { | |
| position: absolute; | |
| right: 0; | |
| left: 0; | |
| z-index: 2; | |
| } | |
| .specials-group:nth-last-child(5):first-child .specials-group-title + *, .specials-group:nth-last-child(5):first-child ~ * .specials-group-title + * { | |
| padding-top: 5em; | |
| } | |
| .specials-group:nth-last-child(5):first-child:nth-child(1) .specials-group-title, .specials-group:nth-last-child(5):first-child ~ *:nth-child(1) .specials-group-title { | |
| top: 0em; | |
| } | |
| .specials-group:nth-last-child(5):first-child:nth-child(2) .specials-group-title, .specials-group:nth-last-child(5):first-child ~ *:nth-child(2) .specials-group-title { | |
| top: 4em; | |
| } | |
| .specials-group:nth-last-child(5):first-child:nth-child(3) .specials-group-title, .specials-group:nth-last-child(5):first-child ~ *:nth-child(3) .specials-group-title { | |
| top: 8em; | |
| } | |
| .specials-group:nth-last-child(5):first-child:nth-child(4) .specials-group-title, .specials-group:nth-last-child(5):first-child ~ *:nth-child(4) .specials-group-title { | |
| top: 12em; | |
| } | |
| .specials-group:nth-last-child(5):first-child:nth-child(5) .specials-group-title, .specials-group:nth-last-child(5):first-child ~ *:nth-child(5) .specials-group-title { | |
| top: 16em; | |
| } |
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
| <div class='box-1'></div> | |
| <div class='box-2'></div> | |
| <div class='box-3'></div> | |
| <div class='box-4'></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment