Skip to content

Instantly share code, notes, and snippets.

@alejandroiglesias
Created August 12, 2013 19:01
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 alejandroiglesias/6213966 to your computer and use it in GitHub Desktop.
Save alejandroiglesias/6213966 to your computer and use it in GitHub Desktop.
/* Tooltips */
.has-tip {
border-bottom: dotted 1px #cccccc;
cursor: help;
font-weight: bold;
color: #333333; }
.has-tip:hover, .has-tip:focus {
border-bottom: dotted 1px #196177;
color: #2ba6cb; }
.has-tip.tip-left, .has-tip.tip-right {
float: none !important; }
.tooltip {
display: none;
position: absolute;
z-index: 999;
font-weight: bold;
font-size: 0.9375em;
line-height: 1.3;
padding: 0.5em;
max-width: 85%;
left: 50%;
width: 100%;
color: white;
background: black;
-webkit-border-radius: 3px;
border-radius: 3px; }
.tooltip > .nub {
display: block;
left: 5px;
position: absolute;
width: 0;
height: 0;
border: solid 5px;
border-color: transparent transparent black transparent;
top: -10px; }
.tooltip.opened {
color: #2ba6cb !important;
border-bottom: dotted 1px #196177 !important; }
.tap-to-close {
display: block;
font-size: 0.625em;
color: #888888;
font-weight: normal; }
@media only screen and (min-width: 768px) {
.tooltip > .nub {
border-color: transparent transparent black transparent;
top: -10px; }
.tooltip.tip-top > .nub {
border-color: black transparent transparent transparent;
top: auto;
bottom: -10px; }
.tooltip.tip-left, .tooltip.tip-right {
float: none !important; }
.tooltip.tip-left > .nub {
border-color: transparent transparent transparent black;
right: -10px;
left: auto;
top: 50%;
margin-top: -5px; }
.tooltip.tip-right > .nub {
border-color: transparent black transparent transparent;
right: auto;
left: -10px;
top: 50%;
margin-top: -5px; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment