More and more of the sites I’m building recently are using webfonts, and some of these fonts are very heavy. I care about load time and page weight, so I set about finding ways to ensure I could use webfonts while minimising some of the associated problems, viz. FOUT and missing content.
I’m building a thing that’s not quite finished yet, and it uses the geolocation API to get latitude and longitude. I wanted to put them into an object and use it for calculations.
JavaScript is something I have been trying to get better at for a couple of years now, and I’ve been concentrating on writing vanilla JS while paying very little attention to libraries such as jQuery. However I realise jQuery isn’t going to go away. I will have to deal with it in other people’s code and I still use it to cover my ass for things like AJAX, where I wouldn’t be confident that I could write good cross browser vanilla JS.
AJAX has become a big part of responsive design for me. I use it to load secondary content into larger viewports to make it easier to find/view than if it is behind a small link in the footer or somewhere like that.
The only times I’ve had cause to use flexbox in anger is for content re-ordering, or as Jordan Moore more eloquently puts it, content choreography. Even at that I’ve only ever used vertical re-ordering and that’s all I’ll be talking about in this post. Other more comprehensive resources are listed at the end.
For me the classList API is one of the most useful parts of HTML5. Manipulating classes is an everyday part of JavaScript on the web, but is a cowpath that required a sure foot to tread before before getting the full treatment from the pavers in the form of classList.
Here’s the scenario: you work on a branch called something like offline, commit the work, then spot an issue that can be fixed with CSS. Acting like you’re a magpie who’s seen something shiny you forget you’re on the offline branch and save a bunch of work.