Skip to content

Conversation

@davidfischer
Copy link

I noticed that the blog started using an adaptive color scheme, but the ads looked off in dark mode. The ad client supports an adaptive color scheme:
https://ethical-ad-client.readthedocs.io/en/latest/#adaptive-color-scheme.

This will work correctly in dark, light and auto mode. However, it required a small change to work in auto mode. To detect that the site uses an adaptive color scheme in auto mode, it needs to set data-theme=auto. Instead, your blog was removing data-theme when in auto mode. This change makes the site set data-theme=auto and the CSS will look for that or fallback to data-theme being unset which is what users with JS disabled will get.

I noticed that the blog started using an adaptive color scheme, but the
ads looked off in dark mode. The ad client supports an adaptive color
scheme:
https://ethical-ad-client.readthedocs.io/en/latest/#adaptive-color-scheme.

This will work correctly in dark, light and auto mode. However, it
required a small change to work in auto mode. To detect that the site
uses an adaptive color scheme in auto mode, it needs to set
`data-theme=auto`. Instead, your blog was removing `data-theme` when
in auto mode.
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

Successfully merging this pull request may close these issues.

1 participant