I'm new to Front-end development. I was wondering if it would be possible to allow the user to toggle between themes/css properties using the same color configurations specified using minimal_mistakes_skin: "default"
Like this? https://codepen.io/sashatran/pen/rPaLgG
Yes that's right. Another example of it is the following Hugo theme https://academic-demo.netlify.com
This is how i _(a noob)_ achieved/reverse-engineered it in Minimal-Mistakes
main.css and dark.cssmain.css with the variables.light class to the <body> tagyou can see it in action here _(shameless plug)_ - my dev site
There are a few other decorations on the site which are not directly from the dark theme but the above is the gist.
I am sure Michael will come up with a better solution than that of the above monstrosity. Eagerly waiting as this issue has been marked with the Enhancement label.
Not exactly sure how I'd handle this without bloating the theme with a bunch of extra CSS.
The way the stylesheet works now is at build it injects "skin" dependent Sass variables to give everything the correct colors.
Which means the dark skin's styling isn't available to the "light" or vice/versa. Does bundling in all the skins in a stylesheet really the best thing for those who don't care about a light/dark toggle? I dunno...
There's also the issue of the theme not having a canonical "light" skin anymore. There are essentially 10 different color palettes someone can choose... and they don't all compliment each other. Which means probably designing 9 or so more color schemes to invert them.
Personally I've never much cared for sites that add this sort of thing. I'd rather see it happen at the system or browser level. There are browser extensions that do just this which might have better results vs. me trying to maintain consistency across 10 color palettes x 2 modes (20 palettes if you're counting at home).
@mmistakes see https://inclusive-components.design/a-theme-switcher/
That said I see this as a passing fad. Everyone scrambling to add a light/dark mode to their themes when the OS + browser should be responsible for this behavior.
OS + browser can go all dark mode on their browser menu but they can only go as far as just applying a dark contrast mode on the website content, which may lead to the website visuals getting all messed up. So it is actually upto the website developer to manage/feature their own dark mode.
I agree it's up to the site to control how it looks, but feel the toggle needs to be elsewhere which it seems like macOS is moving wards with Mojave as illustrated by @paulmillr here: https://paulmillr.com/posts/using-dark-mode-in-css/
This issue has been automatically marked as stale because it has not had recent activity.
If this is a bug and you can still reproduce this error on the master branch, please reply with any additional information you have about it in order to keep the issue open.
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.
I was wondering if we could resume the discussion around Mojave dark mode, since I'm considering using this theme for docs and not having a dark/light toggle is a bit of a pain point (not insurmountable, just a very nice to have).
I know this issue has been marked as closed, but I was wondering if we could continue this discussion as per @rcarmo's suggestion. I'm aware that there is no canonical light or dark theme, but it would be great if some form of customization functionality could be added with a toggling option, i.e. allow users to enable a toggle with two themes specified in _config.yml?
I'd also very much like to be able to achieve this.
Since my website is supposed to have both showcase pages and posts I'd like for users to be able to switch to the light theme when reading.
@astrob0t Hi, I'm a noobie in web dev here. Do you mind sharing your solution in more details?
Most helpful comment
I'd also very much like to be able to achieve this.
Since my website is supposed to have both showcase pages and posts I'd like for users to be able to switch to the light theme when reading.