css

Understanding the Humble Clearfix

Ryan — January 20th ’14
Front-end developers with some experience will be familiar with the notion of “clearfixing”. Typically, we run across this problem early in our careers, learn the fix, then don’t think much about it again. But sometimes it’s useful to return to familiar things to deepen what we already know.
As part of a recent movement to think critically about our front-end best practices, many of us are reconsidering the merits of presentational class names, previously frowned upon as “unsemantic”. Building on these ideas, I’ll show how character escapes, a little-known feature of CSS, can help make these presentational classes both more versatile and more readable.