Skip to content

Instantly share code, notes, and snippets.

@richthegeek
Created January 25, 2012 09:56
Show Gist options
  • Save richthegeek/1675691 to your computer and use it in GitHub Desktop.
Save richthegeek/1675691 to your computer and use it in GitHub Desktop.
Cheap and easy tooltips :)
@mixin tooltip($text, $top: 0px, $left: 0px) {
&:hover::after {
$top: $top - 7px;
$left: $left - 10px;
content: quote($text);
position: absolute;
@include transition(all, 0.3s);
@include linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8), transparent);
border-radius: 20px;
color: #fff;
font-size: 8px;
font-weight: bold;
margin: $top 0 0 $left;
padding: 7px 10px;
text-indent: 0px !important;
text-transform: lowercase;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment