27th January 2020 at 17:11

? CSS pro tip

If you want to select SVG elements, use this CSS.

Super handy as SVG won’t fill the width if they’ve just got max-width: 100% on them.

Gist: https://gist.github.com/hankchizljaw/958b1f46d39931bfaed63c2b3e09f59d

CSS that reads: img[src*='.svg'] { min-width: 100%; }


Back to blog