Topics /

Web & Frontend

The most popular blog posts about web & frontend on Hacker News. 444 posts.

2012
312

CSS px is an Angular Measurement

The “px” unit in CSS doesn't really have anything to do with screen pixels, despite the poorly chosen name. It's actually an non-linear angular measurement. The formulæ to convert between radians and px are as follows:

315

OOCSS + Sass = The best way to CSS

Object-oriented CSS is awesome. But littering your markup with non-semantic classes is not awesome. Those classes sprinkled all over your HTML are going to change, and that’s not gonna be fun. But if you combine OOCSS and Sass you get the best of both worlds: modular CSS without bloated, hard-to-maintain HTML.