Skip to content

Instantly share code, notes, and snippets.

@cimmanon
Created June 30, 2015 13:52
Show Gist options
  • Save cimmanon/d445ba42563ec9d906c0 to your computer and use it in GitHub Desktop.
Save cimmanon/d445ba42563ec9d906c0 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div id="header">
<div id="title">
title
</div>
</div>
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@mixin image-move($image: "img"){
##{$image}{transition:all .2s ease;}
&:hover ##{$image}{margin-top:-5px;}
}
#header{
@include image-move("img.main");
}
#header #img.main {
transition: all .2s ease;
}
#header:hover #img.main {
margin-top: -5px;
}
<div id="header">
<div id="title">
title
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment