Created
December 30, 2015 23:18
-
-
Save jasonujmaalvis/86bdc40e7f5e1793f070 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
| // ---- | |
| // libsass (v3.3.2) | |
| // ---- | |
| // Pseudo-elements placeholder | |
| %pseudos { | |
| display: block; | |
| content: ''; | |
| position: absolute; | |
| } | |
| // Pseudo-elements mixin | |
| @mixin p-el($el, $el-w: null, $el-h: null) { | |
| @if $el == "before" or $el == "after" { | |
| &:#{$el} { | |
| @extend %pseudos; | |
| width: $el-w; | |
| height: $el-h; | |
| @content; | |
| } | |
| } | |
| @else { | |
| @error "`#{$el}` is not a valid pseudo-element."; | |
| } | |
| } | |
| .example { | |
| @include p-el(before, 10px, 20px) { | |
| background: grey; | |
| top: 10px; | |
| } | |
| } |
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
| .example:before { | |
| display: block; | |
| content: ''; | |
| position: absolute; | |
| } | |
| .example:before { | |
| width: 10px; | |
| height: 20px; | |
| background: grey; | |
| top: 10px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment