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

Changing functionality with darkmode #673

Closed
jkterry1 opened this issue Dec 15, 2020 · 3 comments
Closed

Changing functionality with darkmode #673

jkterry1 opened this issue Dec 15, 2020 · 3 comments

Comments

@jkterry1
Copy link

There needs to be a way to describe different things to happen if the website rendering the markdown is using a darkmode or lightmode. Without this, you get things like the images in the selected projects section of this readme.md file: https://github.com/niklasf/python-chess. In github darkmode, 2 and a half of the logos are invisible. There's no general and sensible way for this to be handled without serving different ones for darkmode, and markdown doesn't support this. For website favicons, they actually had to support this functionality too due to the rise in dark mode. Perhaps some sort of pairs could be used to encode this without if statements, like these:

#Lightmode
#Darkmode:

@jgm
Copy link
Member

jgm commented Dec 15, 2020

I think this is too special-case for even a syntax extension.
If you're targeting HTML, you can always embed raw HTML.

@Crissov
Copy link
Contributor

Crissov commented Dec 16, 2020

That’s a job better left to CSS.

@alerque
Copy link

alerque commented Dec 16, 2020

There are so many ways to approach this functionality (several for each output format that potentially runs into this, HTML being the most common but not the only) and none of the formats have a normalized data representation of this (because it's somewhere between style and function, not content) that it doesn't make any sense at all to bake it into the content syntax.

@jgm jgm closed this as completed Dec 16, 2020
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

4 participants