.container { width: 100%; padding: 20px; } .document { h1, h2, h3, h4, h5, h6 { :global { .anchor { visibility: hidden; background-image: url('../../assets/icons/anchor.svg'); background-repeat: no-repeat; background-size: 100%; background-position: 0 center; margin-left: -26px; width: 20px; display: inline-block; } } &:hover { :global { .anchor { visibility: visible; } } } } }