Last active
August 29, 2015 14:06
-
-
Save Guilh/2b73ddf20172ed64c025 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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.1) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin child($pos) { | |
@if $pos == "first" { | |
&:#{$pos}-child { | |
float: left; | |
} | |
} | |
@else if $pos == "last" { | |
&:#{$pos}-child { | |
float: right; | |
} | |
} | |
@else { | |
@error "`#{$pos}` is not a valid pseudo-class."; | |
} | |
} | |
.foo { | |
@include child(last); | |
} |
This file contains 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
.foo:last-child { | |
float: right; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment