Last active
August 29, 2015 14:26
-
-
Save idflood/69ff87dd5ef2891349b4 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@mixin hover() { | |
@if ($current_block != false) { | |
#{$current_block}:hover & { | |
@content; | |
} | |
} | |
@else { | |
@warn "Hover mixin called outside of a block"; | |
} | |
} | |
@mixin element($element) { | |
$current_block: #{&} !global; | |
&__#{$element} { | |
@content; | |
} | |
// Step out of the current module. | |
$current_block: false !global; | |
} | |
.story-box { | |
@include element(header) { | |
font-weight: 500; | |
@include hover() { | |
text-decoration: underline; | |
} | |
} | |
} |
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
.story-box__header { | |
font-weight: 500; | |
} | |
.story-box:hover .story-box__header { | |
text-decoration: underline; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment