Last active
December 18, 2015 04:58
-
-
Save cironunes/5728885 to your computer and use it in GitHub Desktop.
is-observable state
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
/*= @group State | |
---------------------------------------------------------------------- */ | |
.is-hidden { | |
display: none; | |
} | |
.is-hidden--floated { | |
position: absolute; | |
visibility: hidden; | |
@include opacity(0); | |
@include transition(opacity .3s ease-in-out); | |
} | |
/** | |
* is-observable state | |
* e.g.: | |
* | |
<div class="is-observable"> | |
<button class="is-hidden--floatead">I'll be revealed on hover</button> | |
<button class="is-hidden">Me too, but I occupy space</button> | |
</div> | |
* | |
*/ | |
.is-observable:hover { | |
.is-hidden { | |
display: block; | |
} | |
.is-hidden--floated { | |
visibility: visible; | |
@include opacity(0); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment