When i use the GitHub prefers color scheme feature, i can't hide multiple languages #3235
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
Hey @xxxVitoxxx, I think the problem you are experiencing is due to how GitHub handles caching of the card when creating dynamic themes using GitHub's media feature. It looks like the card cache is not reloaded when parameters are changed. I tried to break the cache by appending Regular card (MD)Languages hidden responsive theme (HTML)<picture>
<source
srcset="https://github-readme-stats.vercel.app/api/top-langs/?username=xxxVitoxxx&theme=dark&hide=go,CSS,javascript,HTML"
media="(prefers-color-scheme: dark)"
/>
<source
srcset="https://github-readme-stats.vercel.app/api/top-langs/?username=xxxVitoxxx&hide=go,CSS,javascript,HTML"
media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
/>
<img src="https://github-readme-stats.vercel.app/api/top-langs/?username=xxxVitoxxx&hide=go,CSS,javascript,HTML"/>
</picture> Hidden languages (HTML) |
Beta Was this translation helpful? Give feedback.
-
@xxxVitoxxx You can use GitHub theme context tag to get desired result. <a href="https://github.com/xxxVitoxxx#gh-light-mode-only"><img src="https://github-readme-stats.vercel.app/api/top-langs/?username=xxxVitoxxx&layout=compact&theme=radical&count_private=true&hide=html,javascript" /></a>
<a href="https://github.com/xxxVitoxxx#gh-dark-mode-only"><img src="https://github-readme-stats.vercel.app/api/top-langs/?username=xxxVitoxxx&layout=compact&count_private=true&hide=html,javascript" /></a> |
Beta Was this translation helpful? Give feedback.
-
I just received an email from GitHub support that validates the comment of @octatone. The right syntax should be: <img src="https://github-readme-stats.vercel.app/api/top-langs/?username=xxxVitoxxx&hide=go%2CCSS%2Cjavascript%2CHTML"/> |
Beta Was this translation helpful? Give feedback.
-
Okkkk, let's goooo! |
Beta Was this translation helpful? Give feedback.
I just received an email from GitHub support that validates the comment of @octatone.
The right syntax should be: