zwbetz-gh / cupper-hugo-theme

An accessibility-friendly Hugo theme, ported from the original Cupper project.
https://cupper-hugo-theme.netlify.app/
MIT License
301 stars 190 forks source link

First attempt at fixing firefox dark mode #22

Closed rignato closed 4 years ago

rignato commented 4 years ago

This PR is in regards to Issue #11, where the dark mode toggle causes the navbar to stop scrolling when the dark mode button is clicked on Firefox. I believe the issue is related to this StackOverflow post which mentions how applying a filter to the parent breaks child positioning.

This fix is a little hacky as it mainly just removes the filter from the entire html and instead applies it to the two child classes ("intro-and-nav" and "main-and-footer"), but I think this is a step in the right direction. Please let me know if this fix works on your browsers.

In addition to the Firefox dark mode fix, I also changed the text selection color to better fit the black/white theme. This is a more subjective fix, feel free to remove it if you want.

zwbetz-gh commented 4 years ago

Hi @rignato -- thank you for your PR. It works in my firefox testing. Your fix is not hacky in my opinion. Nice touch on the text selection color. Merging this ❤️

rignato commented 4 years ago

Thank you, this was my first open-source contribution, so I'm happy to hear you liked it! :smiley:

zwbetz-gh commented 4 years ago

Glad the cupper theme was your first contribution! Keep up the good work 💪