-
Notifications
You must be signed in to change notification settings - Fork 10
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 does not auto switch #383
Comments
@andinus From the screen recording I see that you are using a browser based tool to switch from light to dark mode, rather than the toggle at the bottom of each page, which uses in-site javascript to change between themes. |
It's not a browser based tool, but the MacOS theme switcher that switches the theme of the entire OS. Similar tools exist on Windows, Gnome and KDE. Browsers can pick that up. The Dark Reader issue (#252) is different in that Dark Reader is a browser addin that modifies websites. I personally rely on the dark theme websites provide and only use Dark Reader for the others that don't have a dark theme. GitHub is an interesting example. They let you chose a specific theme, but also have a "sync with system" option. (See Settings -> Appearance) |
Yes, the tool modifies
However, it's not a bad idea to allow the user to override the theme. Maybe we can have an event when browser's |
@andinus @patrickbkr I appreciate the feedback. I also looked to see what Bulma does natively. I think this issue has highlighted a design flaw that I was vaguely aware of before, but now is a bit clearer. The Bulma framework has an extensive section on themes and I'm pretty certain, it will take care of the different ways to change themes. To be frank, when I adapted the new website design to run with Collection, instead of Documentable, I cut and pasted as much of the basic design as possible, which included an ad-hoc theme changer. I have extended this to other plugins (tablemanager, secondaries, announcements, option-search &c). IMHO its a bit of a hack. My thought is rather than adding to the hacks to get this issue corrected, and even to allow for more than two themes, the approach needs to change. The basic SCSS variables need to be set in one place, and to be available to all plugins, in some way. Then theme changes should be done by a Bulma component. This will take some time ... (My current priority is writing a RakuAST-RakuDoc renderer to replace Raku-Pod-Render, followed by a CMS to replace Collection). If someone can suggest some patches that would quickly change things, I'd appreciate it. |
@coke @patrickbkr @dontlaugh To get consistent themes will require some extensive refactoring. Before I start working on this, here is the goal, and the steps needed to achieve it. Please let me know as soon as possible if you have significant concerns in order to prevent time being wasted. I propose to manage the refactoring using the Goal:
To achieve this goal, the following refactoring needs to happen:
In addition, all the CSS files can be treated as "artifacts" for the containerisation process, and so will not need to be regenerated at each BUILD session. |
Describe the bug
When visiting docs.raku.org, if you change the dark mode preference, docs.raku.org does not auto switch.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The website should switch from dark to light mode, it stays dark mode even after a refresh.
Screenshots
I'm attaching a screen recording:
Screen.Recording.2024-05-15.at.10.46.46.AM.mov
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: