Skip to content

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

Description

@philwareham

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions