Skip to content

Instantly share code, notes, and snippets.

@bumbeishvili
Created March 10, 2020 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumbeishvili/cd507ffc0589d816228f5c22c7c851c3 to your computer and use it in GitHub Desktop.
Save bumbeishvili/cd507ffc0589d816228f5c22c7c851c3 to your computer and use it in GitHub Desktop.
.d3-tip {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.4;
padding: 12px;
pointer-events: none;
color: #203d5d;
box-shadow: 0 4px 20px 4px rgba(0, 20, 60, .1), 0 4px 80px -8px rgba(0, 20, 60, .2);
background-color: #fff;
border-radius: 4px;
}
/* Creates a small triangle extender for the tooltip */
.d3-tip:after {
box-sizing: border-box;
display: inline;
font-size: 10px;
width: 100%;
line-height: 1;
color: #fff;
position: absolute;
pointer-events: none;
}
/* Northward tooltips */
.d3-tip.n:after {
content: "\25BC";
margin: -1px 0 0 0;
top: 100%;
left: 0;
text-align: center;
}
/* Eastward tooltips */
.d3-tip.e:after {
content: "\25C0";
margin: -4px 0 0 0;
top: 50%;
left: -8px;
}
/* Southward tooltips */
.d3-tip.s:after {
content: "\25B2";
margin: 0 0 1px 0;
top: -8px;
left: 0;
text-align: center;
}
/* Westward tooltips */
.d3-tip.w:after {
content: "\25B6";
margin: -4px 0 0 -1px;
top: 50%;
left: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment