How to add icons to external links with CSS
SMRTR summary
Use CSS attribute selectors with `:not()` and `:has()` to automatically style external links, excluding buttons, SVGs, and internal URLs. An SVG icon is injected via `::after` using `mask` and `background-color`, with alt text for accessibility.
SMRTR provides this summary for quick context. The original article belongs to Go Make Things.
Read the original article