-
-
Save pbroschwitz/2408345 to your computer and use it in GitHub Desktop.
The ampersand
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
/* scss */ | |
#nav { | |
li a { | |
color: maroon; | |
body.admin & { border-bottom: dotted 1px maroon; } // <-- Awesome-sauce right there | |
&:hover { | |
color: purple; | |
} | |
} | |
} | |
/* output */ | |
#nav li a { color: maroon; } | |
body.admin #nav li a { border-bottom: dotted 1px maroon; } | |
#nav li a:hover { color: purple; } |
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
/* scss */ | |
#nav { | |
li a { | |
color: maroon; | |
&:hover { | |
color: purple; | |
} | |
} | |
} | |
body.admin #nav li a { border-bottom: dotted 1px maroon; } | |
/* output */ | |
#nav li a { color: maroon; } | |
#nav li a:hover { color: purple; } | |
body.admin #nav li a { border-bottom: dotted 1px maroon; } |
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
/* scss */ | |
#nav { | |
li a { | |
color: maroon; | |
&:hover { | |
color: purple; | |
} | |
} | |
} | |
/* output */ | |
#nav li a { color: maroon; } | |
#nav li a:hover { color: purple; } |
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
/* scss */ | |
@mixin quicksandlight() { | |
visibility: hidden; | |
.wf-active &, .msie.wf-loading &, .msie.wf-inactive & { | |
visibility:visible; | |
font-family: 'QuicksandLight', Arial, sans-serif; | |
} | |
} | |
#sample span { @include quicksandlight; } | |
/* output */ | |
#sample span { visibility: hidden; } | |
.wf-active #sample span, | |
.msie.wf-loading #sample span, | |
.msie.wf-inactive #sample span { | |
visibility: visible; | |
font-family: 'QuicksandLight', Arial, sans-serif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment