A peculiar bug in Safari
On weekend mornings, I have the inescapable habit of looking at my website and seeing what I can change, what I can remove, what I can improve in terms of HTML, CSS, layout, links, etc. This Saturday, as I wanted to look closer at the way the period at the end of a sentence rendered when appearing just after a word in italic (I know), I noticed something curious.
When I zoomed in the page, using “Command – Plus Sign” (⌘+), I could see that the line length was changing with the size of the text. The bigger the text, the longer the line. You see, I’m very protective of the max-width I use on this site — 50ch — especially for Mac users, who see it in the Charter font.*1 This value sets an ideal number of characters for each line making it, when paired with the right line height, easier to read (supposedly).
Zooming in on text shouldn’t change the line length, so I looked around and realised that I was a bit clueless when it comes to identifying bugs, and even checking if they were already reported. I found a few bug reports related to zooming in, but none of them described my issue. Not only that, but I didn’t really know if this was a Webkit problem, or a Safari problem. So instead of working my way to either confirming an existing bug or filing a new one, I did what I usually do when facing a problem: I avoided it altogether rather than trying to solve it.
Therefore I changed 50ch to 28em in my CSS, resulting in a similar line length for Charter.*2 With em as the unit, zooming doesn’t modify the line length, so I’m pretty happy with this easy fix.
Bonus point: 28em takes up the same number of bytes as 50ch in my default CSS, still capped at 132 bytes. Imagine the extra-byte horror if I had to use something like 700px or 25rlh? It would have ruined my sunny Saturday morning.
This little website update made me realise something: my site design is pretty much done, and I hadn’t changed anything for a few weeks or even months.
I actually miss the satisfaction of changing something at the end of my little routine. Checking every detail on every page, revisiting every line of code just to see what can be improved, even if it’s just removing extra quotation marks in an attribute or an optional closing tag, is not as fun when there is nothing to do at the end.
I really like my site’s current design, and even if there might be a few tiny tweaks like this one in the future, I feel that the overall look and feel is pretty much final. It’s a weird feeling, but now I have no excuse for not writing more, and publishing more posts, even if they are unfinished, or shorter than usual.