Understanding Font Rules in CSS

Quite often, developers or designers include a list of fonts within their CSS. As an example, one might define a CSS rule such as: font-family: ‘Segoe UI’, Arial, Tahoma, Helvetica; However, what some developers or designers may not realize is that the font, Tahoma, will never be reached. The reason for this is that Arial is much more prevalent than Tahoma. In fact, most Mac users would not see the site render using the Helvetica font as one may expect. This is because the Arial font has been included with Macs since OS X. If your application targets the Windows … Continue reading Understanding Font Rules in CSS

Detecting Caps Lock with JavaScript

Earlier today, I saw a user attempt to type his password in both Internet Explorer 9 and Chrome. In both browsers, he failed to successfully type it in. After 3 failed attempts, he realized it was due to his caps lock key being pressed. In some cases, a keyboard driver will inform you on screen when you press the caps lock button. If you are lucky enough to use Internet Explorer 10, you’ll notice that it is built into the browser as shown below: However, not all users are using Internet Explorer 10 and some users have a tablet that … Continue reading Detecting Caps Lock with JavaScript