See also: Previous and Next (View all)
I haven’t been maintaining this column for a while but I’ve been learning a lot of new things.
I’ve been enjoying the CSS videos of Kevin Powell. Which units to use (I’ve never heard of ch), mastering css layouts, combinators, etc. Basically I’ve been using a small subset of CSS supported in epubs, and it was refreshing (I guess) to do some css for some static pages I was creating here and here. I have been growing more and more alarmed at the rapid increase in surfing from mobile devices (and I’m not talking about tablets!). So designing for responsiveness has taken higher priority (except for this blog, whose facelift I keep putting off). Some revelations
- Designers have been talking about browser widths, talking about 60-70 ch, which shocked me a bit. (I ended up using 75). Also, designers have talked about font-size in the 1.8 rem range which also kind of shocked me. (I assumed wrongly that it was more along the lines of 1.0 rem). I actually used media queries for smaller displays, which worked fine overall, except for this one page where the long URLs seemed to force the font-size to revert to their lowest value.
- For the generated HTML output from Docbook, I had to tweak the navigation controls using better CSS. (I didn’t want to try anything fancy on XSLT unless absolutely necessary). For example on this page, I changed one of the top titles to color: white to hide it and div.navfooter tr:nth-child(2) td:nth-child(2) to target the 2nd row of navigation.
- Docbook has some built in parameters for XSLT which I know how to use. I was able to tweak the META tags in the headers to include Google Analytics tracking scripts.
- Speaking of which, I was appalled at how often Amazon URLs and Google tracking scripts get flagged as invalid HTML (Amazon because they use lots of ampersands in URLs, Google because they don’t give values to some of their attributes).
I learned a little bit about web caching. When updating and testing my websites, I had the damnest time flushing my cache. I tried all sorts of browser steps, then moved onto different devices, and then different ISPs — and I still couldn’t view the latest CSS! After a quick email to my hosting service, I learned that you can purge cache directly from Cloudflare — which I did. Suddenly everything worked like magic.