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 light/dark #395

Merged
merged 2 commits into from
Mar 13, 2024
Merged

support light/dark #395

merged 2 commits into from
Mar 13, 2024

Conversation

greggman
Copy link
Collaborator

@greggman greggman commented Mar 12, 2024

No worries if this is not desired. I just thought I'd take a stab at it.

Here's the results

Screenshot 2024-03-11 at 21 19 23
Screenshot 2024-03-11 at 21 21 33

I can look into the codemirror stuff later.

#392

note: read this and 😭
https://fvsch.com/transparent-iframes

This works for Safari and Chrome but AFAICT there is no solution on Firefox. There, samples are always white ATM. Maybe there is though and I just didn't find it.

@greggman
Copy link
Collaborator Author

note: I pulled out the left/right scrolling source tabs. It's a nice idea but

  1. it's not discoverable. You have to scroll left and right with a trackpad/mouse. Clicking/hovering never shows anything so you don't know it can do it.

  2. it's not mobile friendly. AFAICT You can only scroll left/right once the scrollbar appears but there is no way to make it appear on mobile

At least that's how it seemed. It's fine if it's put back in but I didn't have time to address the issues. One issue might be to add add < and > buttons. Another might a drop down when the list is too large (devtools does this with » menu). Or we can just leave it as is. The list now shows just filename and no path which means the tabs are shorter so more often than before they all fit.

@toji
Copy link
Contributor

toji commented Mar 12, 2024

This all looks good to me, and I like that the whole site is responsive to theme preferences now. The source tab behavior seems OK to me for now, in that it simply starts wrapping the tabs. Not particularly elegant, but functional.

Screenshot 2024-03-12 10 57 14 AM

The one issue I found, which can be addressed in a follow up if you'd prefer, is that when the side bar collapses on a narrow window or on mobile the hamburger icon is not responsive to the theme, It looks OK in the light theme but is so dark that you can hardly see it in the dark theme.

Screenshot 2024-03-12 10 54 58 AM (1)

@greggman greggman enabled auto-merge (rebase) March 13, 2024 03:22
@greggman greggman merged commit f174e35 into webgpu:main Mar 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants