Discussions are ongoing about supporting color schemes on GitHub, but they require time. Meanwhile, I would appreciate a solution for the following cases in the interim.
I’m working with CSS frameworks such as open-props, Bootstrap (used in Shiraz), Bulma, and FeatherCSS, among others.
TiddlyWiki utilizes color palettes to switch between dark and light themes. I would like to implement a global dark or light mode based on the selected palette.
For instance, in Bootstrap 5.3.3, to enable global dark mode, it’s common to add the data-bs-theme="dark" attribute to the <html> element of the HTML page. This action applies the dark mode theme globally to all Bootstrap components on the page, unless overridden by a specific data-bs-theme attribute.
My question is: Is there a WikiText/CSS/Html method to automatically apply a global dark mode when selecting a dark palette in TiddlyWiki, or a global light mode when opting for a light palette?
Much appreciated Saq!
This does not allow me to add data-bs-theme="dark" attribute to the page template, but easily add my class to page template.
So I can use my CSS as:
Those are placeholders for functions that can check if the palette is for dark mode or light. I assume you plan to somehow designate a palette as belonging to dark mode or light mode.