outline: 0; } .highlight-wrap .copy-btn { transition: opacity .3s ease-in-out; opacity: 0; padding: 2px 6px; position: absolute; right: 4px; top: 8px; } .highlight-wrap:hover .copy-btn, .highlight-wrap .copy-btn:focus { opacity: 1 } .highlight-wrap { position: relative; }