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

Dark mode showing white bg on scroll #111

Open
allan2 opened this issue Jun 24, 2021 · 3 comments
Open

Dark mode showing white bg on scroll #111

allan2 opened this issue Jun 24, 2021 · 3 comments

Comments

@allan2
Copy link

allan2 commented Jun 24, 2021

Originally opened at seed-rs/seed#610

During scrolling in dark mode, the white background is visible at the bottom. Once the scroll stops, it disappears. It's like a flicker during scroll only.

Its only at the top part of the page. Scrolling down more doesn't show any white.

On both Google Chrome and Firefox on Android.

Screenshot captured during scroll with finger on the screen

@MartinKavik
Copy link
Member

There were two goals when I was writing seed-rs.org:

  1. The previous website was unusable. I had to resolve it quickly but I didn't have time to design and write something fancy and without any bugs. However it had to be written in Seed to demonstrate that it's possible to write a larger app with good SEO in Seed.
  2. I had to write a larger Seed app to test how new Seed API works and resolve bugs and badly designed API along the way.

So:

  • The website design is basically a rewritten free template for TailwindCSS.
  • The dark mode is just a click-through layer on the top of the page with a filter. That's why you see that white stripe - (mobile) browser doesn't respect height: 100% during the scroll so the filter layer doesn't cover the whole screen.
  • The white flash while the app is loading is caused by a prerendered HTML with a light theme. Then the app is initiated and the page is rerendered with the correct theme according to the user settings.
  • Some browsers accidentally show too big Seed logos because a Webpack plugin or a prerendering JS pipeline changes HTML a bit.

I think the best solution would be to migrate on a platform for writing docs like Docusaurus or even a CMS. It would also make contributing much easier.

What do you think?

@allan2
Copy link
Author

allan2 commented Jun 24, 2021

That's a good idea. It would be cool to have docs built in Seed but Seed isn't an SSG and I'm not sure how up-to-date Seed webpack is.

No complaints with Docusaurus here.

I think you've got something good going on with Rust-tooled templating and Rust-tooled styling. I'm keen to contribute to the docs to help grow the project.

@MartinKavik
Copy link
Member

I'm keen to contribute to the docs to help grow the project.

Awesome!
seed-rs.org guides are written in MD (https://github.com/seed-rs/seed-rs.org/tree/master/crate/guides) so I hope it won't be too hard to migrate from Seed + Webpack to a real SSG. So if you want to help with docs, you can try to migrate it to a SSG like Docusaurus or VuePress or Gatsby or Zola or another one. Don't hesitate to write me on Discord when you need something of course.

P.S.
I'm not using the Webpack template in my client projects now so I don't really know now how up-to-date is it.

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

No branches or pull requests

2 participants