Heydon Pickering 11/7/2013

Tetris And The Power Of CSS

Read Original

This article argues for the power of vanilla CSS over preprocessors, using a practical example of a three-column grid with a variable number of items. It demonstrates how to elegantly handle an orphaned last item (making it full-width) using the :last-child pseudo-class, emphasizing CSS's inherent capabilities for layout logic without template or JavaScript hacks.

Tetris And The Power Of CSS

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week