quiltmc.org icon indicating copy to clipboard operation
quiltmc.org copied to clipboard

Persist low contrast setting across routes

Open ibbyu opened this issue 1 year ago • 6 comments

Fixes #169


See preview on Cloudflare Pages: https://preview-171.quiltmc-org.pages.dev

ibbyu avatar Oct 16 '23 11:10 ibbyu

In the generated Cloudflare Pages preview, the issue remains the same as before.

Southpaw1496 avatar Oct 16 '23 12:10 Southpaw1496

In the generated Cloudflare Pages preview, the issue remains the same as before.

Which browser?

Working on Google Chrome & Microsoft Edge. Encountering a CORS error on Firefox causes the remaining script to stop executing.

ibbyu avatar Oct 16 '23 12:10 ibbyu

I first tried Safari. If it also doesn't work in Firefox as you say, then being nonfunctional in two of the three major browser engines isn't really acceptable for us, so that would need to be fixed.

I notice that in Chrome the script works but the animation plays when switching pages as well as when toggling low contrast. This isn't ideal: is there a way to change that?

Thanks so much for the contribution, by the way

Southpaw1496 avatar Oct 16 '23 13:10 Southpaw1496

I've fixed the issue on other browsers.

I looked around to see if I could fix the animation issue but couldn't find a solution

ibbyu avatar Oct 18 '23 16:10 ibbyu

How would it look if the animation were removed altogether?

I think having no animation at all would be better if it fixed the issue.

Southpaw1496 avatar Oct 18 '23 17:10 Southpaw1496

Toggling low-contrast is a css transition. It has been applied in style-dark.min.css adding a transition to all elements.

All the css for quilt is in the quilt-bulma npm package so no way of changing it here. Removing the transition for low-contrast toggle would also remove all other transitions.

You can see the effects if you:

  1. Open dev tools
  2. Use element selector to select <html> tag,
  3. Scroll down in Styles and uncheck transition: filter 1s;

ibbyu avatar Oct 18 '23 18:10 ibbyu