Colorful pattern

React components bake HTML semantics into their implementation. Take this component example:

While this isn’t a particularly interesting or robust component, it will help illustrate a useful concept. This component creates an HTML element, applies a prop set to to style it, and then allows…


One of the most common questions I hear when discussing CSS best practices is “what unit should I use?” Most of us think and speak in terms of pixels but the unit is rarely the best choice. Here’s how this all breaks down:

TL;DR

  • Use , , and units…


In this post, I aim to answer two questions:

  1. What is BEM?
  2. How should BEM be applied to styling React components?

BEM is an acronym for Block Element Modifier. It’s not a framework or library. It is but a small piece of a larger CSS architecture puzzle. Specifically, BEM is…

Eric Masiello

Software Engineer & UI Architect at Vistaprint

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store