Our SVG icon set can be accessed by BuzzFeed employees in the Solid icon repo. We inline all of our SVGs for performance and accessibility reasons, which you can read more about here.
Six sizing classes are available for SVGs.
svg-1
svg-2
svg-3
svg-4
svg-5
svg-6
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" class="svg-6">
<title>Viral Arrow</title>
<path/>
</svg>
Style the fill
attribute of SVG icons by applying SVG fill color classes directly to the parent svg
.
svg-red
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" class="svg-3 svg-red">
<title>Viral Arrow</title>
<path/>
</svg>
Accessibility should be considered in all usage of SVG icons. Each icon should include a meaningful title
, customized for context. Their unique application will determine the appropriate treatments, covered here by CSS Tricks in more detail. Additionally, a screenreader shouldn't read the icon if only acts as decoration for a static text label. To avoid redundancy, add aria-hidden="true"
to the svg
element.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" class="svg-4 svg-green" aria-hidden="true">
<title>Success</title>
<path/>
</svg>
<span class="xs-text-4 text-green">Post was published successfully.</span>