.js-tooltip { position: relative; .tooltip__handle { background-color: var(--color-dark); border-radius: 50%; height: 1.5rem; width: 1.5rem; line-height: 1.5rem; font-size: 1.2rem; color: white; display: inline-block; text-align: center; cursor: default; margin: 0 10px; } .tooltip__content { position: absolute; top: -10px; transform: translateY(-100%); left: 3px; width: 275px; z-index: 10; background-color: #fafafa; border-radius: 4px; padding: 13px 17px; box-shadow: 0 0 20px 4px rgba(0, 0, 0, 0.1); // display: none; &.to-left { left: auto; right: 3px; &::after { left: auto; right: 10px; } } &::after { content: ''; width: 16px; height: 16px; background-color: #fafafa; transform: rotate(45deg); position: absolute; left: 10px; // box-shadow: 0 0 4px black; // outline: 1px solid red; bottom: -8px; } } .hidden { display: none; } }