screen.width is still useless

In a 2013 article, Peter-Paul Koch concluded that “screen.width/height is completely unreliable.” The main reason being that some browsers provide values in physical pixels, while others measure “the width and height of the ideal viewport; the one you get when using width=device-width.

Which option is the preferred one? Is there an “official” definition? Currently there is no official definition, however there has been some past work which has aimed at providing a standard. The in CSSOM View Module, W3C Working Draft 17 December 2013 states:

The width attribute must return the width of the output device, in CSS pixels.
The height attribute must return the height of the output device, in CSS pixels.

In January 2015, we decided to Continue reading

Weekly #11

A touch screen keyboard implemented in JavaScript. A bit buggy on mobiles but who knows, maybe you need it one day.

Did you know there is a W3C API to access timing information related to navigation and elements? Measuring Mobile Site Performance Using the W3C Navigation Timing API

Cutter.js: Truncate HTML code to limit its length by number of words without losing markup.

The Most Important Parts of HTML5

7 Chrome Tips Developers & Designers May Not Know