This website has a new, slightly improved stylesheet!
The previous layout let the text flow through the browser viewport’s whole width. The idea was to get back to the origin of the web, and let readers decide how wide they wanted their text by adjusting the browser window.
Great idealistic idea in theory. But the result definitely felt unfinished by modern standards.
So here is a new variation with a
In the process, I experimented with two features that ended up being rolled back. Here’s why.
Wouldn’t it be nice to keep a minimal stylesheet by default, and offer prettier but heavier alternatives for the reader to choose from? Modern browsers support this out of the box, right?
Well, kind of. There is an HTML specification for it: just list your default stylesheet with
<link rel="stylesheet" …> and the other ones with additional
<link rel="alternate stylesheet" …> tags. Easy.
Except that the feature is only supported in Firefox, IE, and Opera. And (at least in Firefox) the selection is not sticky: switch to an alternate stylesheet, reload the page, and you’re back to the default stylesheet. Not useful in practice. Ah, and all stylesheets are queried on page load, defeating the initial performance purpose.
The jekyll-assets gem
Since I’m used to work on Rails projects, having assets managed by Sprockets for this Jekyll site seemed like a good idea.
There are a few annoyances and a quasi-show-stopper with this gem: the author is maintaining it alone, and doesn’t have a lot of time to do so. The documentation is a bit confusing in my opinion, and doesn’t document a breaking change (no more
And the show-stopper: the gem is not white-listed by GitHub Pages. Which means I can no longer push the main branch and have GitHub auto-build the site. The solution would be to pre-build locally, and push that. An additional deployment step that wasn’t worth the trouble in this case.
So, after a lot of RTFM and commits, the code is back to a KISS version, which is not so bad after all.