AngularJS - ngHide for old IEs


Yeah yeah I know, old IEs are dumb and should be run over by a bus or thrown off a bridge and blah blah blah. But sometimes 20% of your client's users are using IE7, and another 20% on top of that use IE8, so you've got to deal with it.

The trouble is, some pretty basic AngularJS built-in directives don't work in these browsers. In this short post I'll show you how we wrote our own directive to enable us to use ngHide across browsers.

Read this post

Simple Check for Old IEs


On a recent project I needed to be able to detect if a user was browsing using IE8 or 7, and serve different functionality to them if that was true.

After looking around a really easy way to do this is to simply check whether the browsers supports the leadingWhiteSpace feature, using jQuery's $.supports method.

if ($.support.leadingWhitespace == false) {
     var oldIE = true;

Old versions of Internet Explorer don't support this feature, and therefore oldIE will be false on these browsers. You could then apply a conditional class to your body tag to style something differently, or write a quick if statement to check the value of oldIE before executing some script for example.

A Couple of Problems I've Found Using Flexbox


I recently tried using flexbox for laying out products in a grid, and came across a few problems. I think the main issue is down to browser support, but there's also some quirks in the implementation that mean I can't quite use it how I would like.

This post summarises the issues I found.

Read this post

Responsive breakpoints - It's in the name


I just read this quote in .Net magazine:

“…rather than [device-specific] breakpoints, I’d decrease browser width until things looked broken or cramped, add a breakpoint and repeat…”

Dan Tello

This is what I’ve always done and is exactly the way we should approach making sure responsive layouts behave properly.

I never thought the idea of having pre-defined breakpoints for iPhone, iPad and desktop etc was particularly useful, and in fact it seems much more aligned with an adaptive layout. Even when responsive design was just a baby there were already hundreds of devices with different widths so setting a few different breakpoints has never made sense.

At the end of the day it’s in the name: breakpoint. Find out where your design breaks, then fix it.