textpattern-com-website icon indicating copy to clipboard operation
textpattern-com-website copied to clipboard

Use prefers-colour-scheme within SVGs when Safari supports it

Open philwareham opened this issue 4 years ago • 0 comments

We can reduce the size of our CSS file by using prefers-colour-scheme within a single SVG file to provide dark mode support - instead of the two separate files we currently use. This will reduce the CSS file size by ~12kb.

I have now amended the SVG files in our branding repo to support this approach.

Unfortunately, can't put it into production yet as Safari doesn't support prefers-colour-scheme in embedded SVG files (all other major browsers work as expected).

Safari bug tracker

philwareham avatar Apr 20 '21 14:04 philwareham