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 GitHub theme-conditional images in README / Marketplace page #139556

Closed
eamodio opened this issue Dec 21, 2021 · 9 comments
Closed

Support GitHub theme-conditional images in README / Marketplace page #139556

eamodio opened this issue Dec 21, 2021 · 9 comments
Assignees
Labels
feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Dec 21, 2021

See https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/

Will only show on dark themes
![GitHub-Mark-Light](https://user-images.githubusercontent.com/3369400/139447912-e0f43f33-6d9f-45f8-be46-2df5bbc91289.png#gh-dark-mode-only)

Will only show on light themes
![GitHub-Mark-Dark](https://user-images.githubusercontent.com/3369400/139448065-39a229ba-4b06-434b-bc67-616e2ed80c8f.png#gh-light-mode-only)

Example (notice only 1 image will show up and be dependent on the light vs dark theme):
GitHub-Mark-LightGitHub-Mark-Dark

I've filed this as a bug, because if someone tries to use this on their GitHub README it will work great, but then break on the extension's page and the marketplace.

/cc @misolori @sandy081 @isidorn

@ghost
Copy link

ghost commented Dec 22, 2021

Does markdown-it render support this new syntax? I.e. is there 0 upstream dependency of this issue

Github uses CSS so I assume something will be added to the default preview styles to implement this, e.g:

@media (prefers-color-scheme: light) {
    :root[data-color-mode=auto] .entry-content [href$="#gh-dark-mode-only"],
    :root[data-color-mode=auto] .comment-body [href$="#gh-dark-mode-only"],
    :root[data-color-mode=auto] .readme [href$="#gh-dark-mode-only"] {
        display: none;
    }
}
@media (prefers-color-scheme: dark) {
    :root[data-color-mode=auto] .entry-content [href$="#gh-light-mode-only"],
    :root[data-color-mode=auto] .comment-body [href$="#gh-light-mode-only"],
    :root[data-color-mode=auto] .readme [href$="#gh-light-mode-only"] {
        display: none;
    }
}

@sandy081 sandy081 assigned isidorn and mjbvz and unassigned sandy081 Jan 3, 2022
@sandy081
Copy link
Member

sandy081 commented Jan 3, 2022

Assigning to @mjbvz for Markdown rendering and @isidorn for Marketplace request.

@isidorn
Copy link
Contributor

isidorn commented Jan 3, 2022

MP request is captured by this microsoft/vsmarketplace#281
Thus, let's keep this issue related to Markdown rendering only.

@isidorn isidorn removed their assignment Jan 3, 2022
@mjbvz mjbvz added the feature-request Request for new features or functionality label Jan 3, 2022
@Gruntfuggly
Copy link

This would also make the README.md look right on https://open-vsx.org/

@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
@eamodio
Copy link
Contributor Author

eamodio commented Dec 5, 2022

😢 -- have to say I'm disappointed with this one getting closed. There isn't a way for extension authors to have good looking logos/images, because VS Code is fully themeable, GitHub has light & dark, and the marketplace is always light (currently).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

8 participants
@Gruntfuggly @eamodio @isidorn @sandy081 @mjbvz @alexr00 @vscodenpa and others