Skip to content

Top Languages Card having issues with picture and source elements for light and dark mode #3723

Closed Answered by qwerty541
kennethjmyers asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, @kennethjmyers! You have to URL encode the content of hide query string parameter when using picture and source elements. I will add an example below.

<picture>
  <source
    srcset="https://github-readme-stats.vercel.app/api/top-langs?username=kennethjmyers&show_icons=true&locale=en&layout=compact&theme=dark&hide=HTML%2CCSS%2CSCSS%2CRuby%2CJupyter%20Notebook"
    media="(prefers-color-scheme: dark)"
  />
  <source
    srcset="https://github-readme-stats.vercel.app/api/top-langs?username=kennethjmyers&show_icons=true&locale=en&layout=compact&hide=HTML%2CCSS%2CSCSS%2CRuby%2CJupyter%20Notebook"
    media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  />
  <img s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kennethjmyers
Comment options

@qwerty541
Comment options

Answer selected by kennethjmyers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3722 on April 13, 2024 10:28.