/* tooltip class used for ref, fnote and other macros */ .refnotes-tooltip { position: relative; display: inline-block; cursor: pointer; } .refnotes-tooltip .refnotes-tooltiptext{ font-size: 0.90em; /* change if it is too small */ } .refnotes-tooltip .refnotes-tooltiptext { visibility: hidden; background-color: #fff; color: #222222; text-align: left; border-radius: 2px; padding: 5px 10px; max-width: 30vw; max-height:20em; overflow-y: auto; cursor: auto; width: max-content; width: -moz-max-content; width: -webkit-max-content; width: -o-max-content; /* Position the tooltip */ position: absolute; z-index: 1; bottom: 100%; left: 50%; margin-left: -40px; box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19); } .refnotes-tooltip:hover .refnotes-tooltiptext { visibility: visible; /*opacity: 0.9;*/ } /* for small screens */ @media screen and (max-width: 960px) { .refnotes-tooltip .refnotes-tooltiptext { /* Position the tooltip */ position:fixed; top:0; left: 0; margin-left: 0px; bottom: unset; width:100%; max-width: 100vw; z-index: 9999; } .refnotes-tooltip:hover .refnotes-tooltiptext { opacity: 1; } }