Skip to content

Instantly share code, notes, and snippets.

@rogden
Last active July 25, 2016 21:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogden/9745711 to your computer and use it in GitHub Desktop.
Save rogden/9745711 to your computer and use it in GitHub Desktop.
Rising Underline on Hover Effect (LESS Mixin)
// @example: http://jsbin.com/huharale/1/edit?html,css,output
.rising-underline(@color, @thickness, @distance: 3px) {
position: relative;
text-decoration: none;
&:after {
content: "";
position: absolute;
bottom: -@distance;
left: 0;
width: 100%;
height: @thickness;
background-color: @color;
opacity: 0;
pointer-events: none;
transition: all .2s ease-out;
}
&:hover:after {
bottom: 0;
opacity: 1;
transition: all .15s ease-out;
}
}
@rogden
Copy link
Author

rogden commented Mar 24, 2014

See an example of usage here: http://jsbin.com/huharale/1/edit?html,css,output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment