UNPKG

tooltipster

Version:

A flexible and extensible jQuery plugin for modern tooltips.

157 lines (124 loc) 3.48 kB
/** * DEFAULT STYLE OF THE SIDETIP PLUGIN * * All styles are "namespaced" with .tooltipster-sidetip to prevent * conflicts between plugins. */ /* .tooltipster-box */ .tooltipster-sidetip .tooltipster-box { background: #565656; border: 2px solid black; border-radius: 4px; } .tooltipster-sidetip.tooltipster-bottom .tooltipster-box { margin-top: 8px; } .tooltipster-sidetip.tooltipster-left .tooltipster-box { margin-right: 8px; } .tooltipster-sidetip.tooltipster-right .tooltipster-box { margin-left: 8px; } .tooltipster-sidetip.tooltipster-top .tooltipster-box { margin-bottom: 8px; } /* .tooltipster-content */ .tooltipster-sidetip .tooltipster-content { color: white; line-height: 18px; padding: 6px 14px; } /* .tooltipster-arrow : will keep only the zone of .tooltipster-arrow-uncropped that corresponds to the arrow we want to display */ .tooltipster-sidetip .tooltipster-arrow { overflow: hidden; position: absolute; } .tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow { height: 10px; /* half the width, for centering */ margin-left: -10px; top: 0; width: 20px; } .tooltipster-sidetip.tooltipster-left .tooltipster-arrow { height: 20px; margin-top: -10px; right: 0; /* top 0 to keep the arrow from overflowing .tooltipster-base when it has not been positioned yet */ top: 0; width: 10px; } .tooltipster-sidetip.tooltipster-right .tooltipster-arrow { height: 20px; margin-top: -10px; left: 0; /* same as .tooltipster-left .tooltipster-arrow */ top: 0; width: 10px; } .tooltipster-sidetip.tooltipster-top .tooltipster-arrow { bottom: 0; height: 10px; margin-left: -10px; width: 20px; } /* common rules between .tooltipster-arrow-background and .tooltipster-arrow-border */ .tooltipster-sidetip .tooltipster-arrow-background, .tooltipster-sidetip .tooltipster-arrow-border { height: 0; position: absolute; width: 0; } /* .tooltipster-arrow-background */ .tooltipster-sidetip .tooltipster-arrow-background { border: 10px solid transparent; } .tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-background { border-bottom-color: #565656; left: 0; top: 3px; } .tooltipster-sidetip.tooltipster-left .tooltipster-arrow-background { border-left-color: #565656; left: -3px; top: 0; } .tooltipster-sidetip.tooltipster-right .tooltipster-arrow-background { border-right-color: #565656; left: 3px; top: 0; } .tooltipster-sidetip.tooltipster-top .tooltipster-arrow-background { border-top-color: #565656; left: 0; top: -3px; } /* .tooltipster-arrow-border */ .tooltipster-sidetip .tooltipster-arrow-border { border: 10px solid transparent; left: 0; top: 0; } .tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-border { border-bottom-color: black; } .tooltipster-sidetip.tooltipster-left .tooltipster-arrow-border { border-left-color: black; } .tooltipster-sidetip.tooltipster-right .tooltipster-arrow-border { border-right-color: black; } .tooltipster-sidetip.tooltipster-top .tooltipster-arrow-border { border-top-color: black; } /* tooltipster-arrow-uncropped */ .tooltipster-sidetip .tooltipster-arrow-uncropped { position: relative; } .tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-uncropped { top: -10px; } .tooltipster-sidetip.tooltipster-right .tooltipster-arrow-uncropped { left: -10px; }