Using quirks within an operating system to create better Experiences

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”.

This is cool to know because if you are modifying classes it is more beneficial to have quick access to highlighting the various sections of the selector rather than the entire selector itself. Better yet an entire method of writing css has been formed around this quirk. Although it could be argued that the creator didn’t quite know that he was using this quirk.

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.

About the Author

Headshot of Mathias Rechtzigel with some sweet lazers in the background. Like the type you would find in a cheesy Sears photoshoot. Yeah those ones.

Mathias Rechtzigel is a web creator, his skills range from development, design, user experience and sometimes content creation.

He lives in Minneapolis, Minnesota with his partner (Ellen), dog (Bard), and two cats ( Pippi & Misti ).

Connect with me on

Join me on my journey

Sign up and I'll send you a weekly email with links to my posts, and other valuable links that I find througout the week.