You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the picture element to switch between light and dark mode views for the top-langs card but I am running into visual issues that I don't see with the stats card. I'm including two tests, one for the version I'm trying to include in my readme, and one where I remove the light mode source. I'm noticing a few things:
Light mode and dark mode get used, but everything after the first query seems to get ignored.
in my first test HTML is placed first in the list of languages to hide. This indeed seems to get filtered out, but we can see jupyter notebook and css get left in and are not filtered out as expected.
In my second test, jupyter notebook is placed first. Now jupyter notebook is filtered out but HTML is allowed in
This seems mainly an issue with the source element because if you remove the light-mode source and let it default to the img tag, then light mode turns out fine (third test)
What's odd is I'm only seeing this issue on github and not my IDE's preview (I've included screenshots of this, I'm using pycharm in case that's relevant). So Is this somehow an issue on Github's end? I have tested this in chrome and safari and I'm seeing the same results.
First test (copied from readme example, but changed the src link so it uses the top-langs card):
kennethjmyers
changed the title
Top Languages Card having issues picture and source elements for light and dark mode
Top Languages Card having issues with picture and source elements for light and dark mode
Apr 13, 2024
Describe the bug
I'm trying to use the
picture
element to switch between light and dark mode views for the top-langs card but I am running into visual issues that I don't see with the stats card. I'm including two tests, one for the version I'm trying to include in my readme, and one where I remove the light modesource
. I'm noticing a few things:img
tag, then light mode turns out fine (third test)What's odd is I'm only seeing this issue on github and not my IDE's preview (I've included screenshots of this, I'm using pycharm in case that's relevant). So Is this somehow an issue on Github's end? I have tested this in chrome and safari and I'm seeing the same results.
First test (copied from readme example, but changed the src link so it uses the top-langs card):
html:
What I'm seeing right now on github (dark mode):
What I see in my IDE preview (dark mode):
IDE preview looks right.
What I'm seeing on github (light mode):
Both light mode and dark mode filter out HTML, but not the others
Second Test - put jupyter notebook first
html:
What I'm seeing right now on github (dark mode):
Jupyter notebook is filtered out (because it is first) but HTML is not filtered out.
What I see in my IDE preview (dark mode):
IDE preview still looks right
Third Test - remove the source element for light color-scheme
html:
What I'm seeing right now on github (dark mode):
What I see in my IDE preview (dark mode):
(same as first test, looks correct)
What I'm seeing on github (light mode):
So it seems correct if you don't try to use the
source
element for light mode.Expected behavior
All of the query elements should be filtered out, not just the first onw.
Screenshots / Live demo link
see above
Additional context
No response
The text was updated successfully, but these errors were encountered: