Skip to content

Instantly share code, notes, and snippets.

@yjose
Last active May 5, 2017 08:46
Show Gist options
  • Save yjose/e99fd4f6883b4ca1e1935674a76a5bcf to your computer and use it in GitHub Desktop.
Save yjose/e99fd4f6883b4ca1e1935674a76a5bcf to your computer and use it in GitHub Desktop.
[tooltip-position='left']::before{
left:0%;
top:50%;
margin-left:-12px;
transform:translatey(-50%) rotate(-90deg)
}
[tooltip-position='top']::before{
left:50%;
}
[tooltip-position='bottom']::before{
top:100%;
margin-top:8px;
transform: translateX(-50%) translatey(-100%) rotate(-180deg)
}
[tooltip-position='right']::before{
left:100%;
top:50%;
margin-left:1px;
transform:translatey(-50%) rotate(90deg)
}
[tooltip-position='left']::after{
left:0%;
top:50%;
margin-left:-8px;
transform: translateX(-100%) translateY(-50%);
}
[tooltip-position='top']::after{
left:50%;
}
[tooltip-position='bottom']::after{
top:100%;
margin-top:8px;
transform: translateX(-50%) translateY(0%);
}
[tooltip-position='right']::after{
left:100%;
top:50%;
margin-left:8px;
transform: translateX(0%) translateY(-50%);
}
@RichDonnellan
Copy link

Please update the code with the correct spelling of tooltip.

- [toltip-position]
+ [tooltip-position]

@yjose
Copy link
Author

yjose commented May 4, 2017

thank you @RichDonnellan

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