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

Support dark mode embeds #6842

Closed
wants to merge 3 commits into from

Conversation

tpaulshippy
Copy link

@tpaulshippy tpaulshippy commented Nov 29, 2024

Resolves #5119

Purpose

Support dark mode when embedding posts on other sites.

Approach

Detect the browser's preferred color scheme using javascript and swap out background and text colors accordingly.

Testing

Ran locally.

I have to say, getting the bskyembed app to function in a local dev environment was not easy. I have written up an issue with documentation of my hacky workaround.

Screenshots/Video

DarkEmbeds3.mov

@gaearon
Copy link
Collaborator

gaearon commented Nov 30, 2024

The border looks a bit weird to me, is it supposed to be so strong?

@tpaulshippy
Copy link
Author

Good question. I did not touch the border style. Perhaps it needs a border color?

@tpaulshippy
Copy link
Author

Made the border black. See my screenshots in the PR. How's that?

@gaearon
Copy link
Collaborator

gaearon commented Nov 30, 2024

I think we'd want to keep the border (and the horizontal separator — they should share the color) visible, but they need to be very subtle in the dark mode, just like they're currently very subtle in the light mode. Maybe we could try #2e4052, which matches the border in the app?

@tpaulshippy
Copy link
Author

Updated. What do you think?

@tpaulshippy
Copy link
Author

Closing in favor of #6912

@tpaulshippy tpaulshippy closed this Dec 4, 2024
@tpaulshippy tpaulshippy deleted the dark-embeds branch December 4, 2024 22:56
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.

[Embeds] Dark/night theme
2 participants