When I added the CSS rules for dark mode, I used these three new colors, along with the original color variables, and made a passable dark mode that took me less than a half an hour to implement. Because I use a variables file, I just set up a few new colors: /\* Dark Mode Theme Colors \*/Īnd that was it. I used the dark gray and light gray background colors, and the slightly off-white text color from the system to make my site look natural in dark mode. To make dark mode easy for me, I basically just stole macOS’s colors. 1 If you’re using Jekyll and not using variables, you’re missing out. I use a Jekyll blog engine on Github, and I’ve set my site up to use a variables file. This is a simple CSS (prefers-color-scheme: dark) You just need to add a CSS tag to your site’s CSS file to let Safari know to ask the system what color scheme it’s in. That’s a pretty fucking tiny percentage of the world right now. You need to be on Mojave, and you need to be running Safari Technology Preview, you need to be in dark mode, and you need to be reading this blog. There are probably 4 people on the planet who will see this post in dark mode in 2018. It took just 43 lines of CSS to make it happen, and that’s probably more than you need to deal with. That being said, I like to stay on top of trends, so I’ve implemented dark mode here on Cocktails
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |