Skip to content

Instantly share code, notes, and snippets.

@jwerre
Created November 3, 2012 23:42
Show Gist options
  • Save jwerre/4009345 to your computer and use it in GitHub Desktop.
Save jwerre/4009345 to your computer and use it in GitHub Desktop.
tooltip written in stylus
.tooltip
display: inline-block
position: relative
margin-left: 5px
vertical-align: baseline
width: 14px
height: 14px
cursor: pointer
.tip
display:none
z-index: 9
position: absolute
left: 25px
top: -20px
width: 300px
padding 20px
background-color: #f5f5f0
bxsh(4px 0 10px rgba(0,0,0,.3))
bdrz(10px)
font: 15px "Helvetica Neue","Helvetica",sans-serif;
&:after
content: "";
position: absolute;
width: 0;
height: 0;
border-width: 10px;
border-style: solid;
border-color: transparent #f5f5f0 transparent transparent;
top: 19px;
left: -20px;
p
padding 0
p+p
padding-top: 15px
&:hover .tip
display:block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment