Using quirks within an operating system to create better Experiences

November 20, 2018

Most operating systems have a have a neat integration that allows users to interact with text, which when integrated with the BEM method of writing CSS allows a developers to quickly read, but more importantly update their CSS selectors.

Let’s take this series of characters, that when combined create a CSS selector:

.stage_decoration

Given the above selector I could click either word, “stage” or “decoration” and it would select stage_decoration. Pretty neat! This is because most operating systems treat an underscore “_” as something that doesn’t separate words.

Now if we modify the above modifier to include a --left variant:

.stage_decoration--left

With this above selector, if I click “stage_decoration” it would not highlight “–left”.

Why does this matter? Well folks are pretty good arguing about things — how to write CSS being one of them — but highlighting the inherent benefits that the operating system that you’re working with provides, free and out of the box can help prevent those conversations from going off the rails.