Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
philwareham opened this issue Apr 20, 2021 · 0 comments
Open

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

philwareham opened this issue Apr 20, 2021 · 0 comments
Assignees

Comments

@philwareham
Copy link
Member

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 philwareham self-assigned this Apr 20, 2021
@philwareham philwareham changed the title Use prefers-colour-scheme within SVGs when Safari finally supports it Use prefers-colour-schem within SVGs when Safari supports it Apr 20, 2021
@philwareham philwareham changed the title Use prefers-colour-schem within SVGs when Safari supports it Use prefers-colour-scheme within SVGs when Safari supports it Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant