Here's a method I'm using to incorporate icons through the use of :before
or :after
pseudo content:
<span class="icon icon__example is-content-visually-hidden">assistive text</span>
Is there a way to hide the assistive text visually without affecting the visibility of the .icon
pseudo content? The goal is for neither the assistive text nor the space it occupies to be visible, allowing these icons to be used inline. Once .is-content-visually-hidden
is turned off, the text should become visible again. I've experimented with techniques like text-indent: -9999px
without success.