Repositioning Cruises: A frugal traveler’s friend

I have been looking at the idea of a repositioning cruise for a while now.  A repositioning cruise is a cruise where the embarkation port is different than the disembarkation port.  Some repositioning cruises are short but most are long.  Cruise lines reposition their ships between seasons (since people don’t really want to take a …

Continue reading "Repositioning Cruises: A frugal traveler’s friend"

So, you want to enable dark mode on your website?

Starting with macOS Mojave, Windows 10 version 1903, and Android Pie, users can set a system-wide preference for dark mode or light more within apps.  The idea is supposed to be that you set a preference once and every application on the device then respects that preference.  So, how do you get your website to respect those system preferences?

Well, starting in recent versions of (chromium versions of) Edge, Firefox, Chrome, and Safari, you can use the prefers-color-scheme media query.

Since it is a media query (and uses a binary setting), you can default it in one direction or the other.

Light Mode by Default

See the Pen
How to implement light mode (by default) in CSS
by Joe Steinbring (@steinbring)
on CodePen.

Dark Mode by Default

See the Pen
How to implement dark mode (by default) in CSS
by Joe Steinbring (@steinbring)
on CodePen.

As you can see above, all you need to do is wrap a chunk of CSS in “@media screen and (prefers-color-scheme: light)” or “@media screen and (prefers-color-scheme: dark)”.

Have any questions?  Feel free to drop a comment, below.

2020 Goals

I mentioned back in October that I wanted to post more substantive content on this blog.  Starting on Thursday, I am going to start publishing weekly posts to the coding category.  A few weeks ago, I started posting regularly to photos.jws.  I want to try to do a photo-per-day kind of thing, moving forward.

My 2018 goals were to get reasonably good at the ukulele and travel somewhere adventurous.  I think that I succeeded.  My goals for 2019 were to keep traveling places and finish a side project before That Conference.  50% success is pretty good, I guess? 😉

My 2020 goals are to share more code (see above) and finish a side project.  I think that should be achievable?

How I Internet (2020 Edition)

Up until 2018, I posted on this blog very infrequently.  During some years, there were only 1 or 2 posts in total.  Last year, I decided to try to post something here every day (even if it is just a photo).  Moving forward, I want to tweak that.  I am going to post fewer “every day” photos and more traditional blog content.  You can expect one or two posts per week in 2020.

If you want to see more “every day” photos, you can check out my instagram, flickr, or tumblr accounts.  If you want to see a combined feed of my twitter and instagram posts, you can check out my mastodon feed.

Have a question or comment? Feel free to drop a comment, below.