One of my favorite ways of adding icons to a site is by including them as data URL background images to pseudo-elements (e.g.
::after) in my CSS. This technique offers several advantages:
- They don’t require any additional HTTP requests other than the CSS file.
- Using the
background-sizeproperty, you can set your pseudo-element to any size you need without worrying that they will overflow the boundaries (or get chopped off).
- They are ignored by screen readers (at least in