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

[Markdown] Adding support for GitHub themed images #137820

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

lostintangent
Copy link
Member

@lostintangent lostintangent commented Nov 24, 2021

GitHub recently added support for appending #gh-dark-mode-only / #gh-light-mode-only to the end of a Markdown image's URL, in order to hide/show images based on the end-user's active color theme (Details). This PR simply adds the equivalent support to the VS Code markdown preview.

Images

Note: I added this support to the built-in github extension, since the URL marker is technically GitHub specific, and therefore, felt appropriate being a part of the core GitHub capabilities. That said, let me know if this seems like it should be part of a different built-in extension 👍🏼

@mjbvz
Copy link
Collaborator

mjbvz commented Dec 1, 2021

@lostintangent
Copy link
Member Author

The main reason I was thinking it might make sense to include this in a VS Code built-in extension, is so it would be available in Remote Repositories, GitHub.dev, Codespaces, etc. without needing to install anything else. That way it felt like a native experience for GitHub contexts, just like this is natively supported in GitHub.com.

That said, we could also just auto-install the extension you mentioned in GitHub.dev and Codespaces, and achieve the same effect. So I'm cool with whichever approach you think makes the most sense 👍

@mjbvz mjbvz added this to the December 2021 milestone Dec 7, 2021
@mjbvz mjbvz merged commit 1921071 into microsoft:main Dec 7, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 7, 2021

Thanks for the details @lostintangent

I agree having it in core makes sense then

@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants