DEV Community

Silvestar Bistrović
Silvestar Bistrović

Posted on

When was the last time you wrote CSS code without preprocessors?

Every once in a while I work on a project that doesn't use preprocessors. No variables, mixins, functions, nesting. Just pure CSS.

It is a challenge, at least for me. The most common mistake I make the very first second I open CSS file is I try to nest selectors. This feature is so simple and powerful that I don't notice it. It is part of my daily routine and getting back to writing old-school selectors is hard suddenly. It is hard to debug and search "flat" selectors, too. Maybe it is just me, but I cannot live without preprocessors anymore.

New developers are emerging every day. Do you learn preprocessors from the start or do you learn pure CSS first?
What about experienced developers, how do you behave when you write pure CSS nowadays? Do you enjoy writing pure CSS?
Did we take preprocessors for granted?

Top comments (3)

Collapse
 
scottishross profile image
Ross Henderson

I have never used a CSS preprocessor. So for me, on a nearly day-to-day basis. CSS, to me, is such a simple descriptive code.

I would highly recommend learning vanilla CSS and becoming fluent in it, so when you learn preprocessors they become a tool rather than law. I'd suggest to treat it a lot like JS actually.

Collapse
 
moopet profile image
Ben Sinclair

When? Earlier today.
The front end of the site I'm working on has a build process involving Sass, but the admin interface is out-the-box and requires CSS overrides.
Other times I might be changing one-off CSS values with javascript, but that's pretty rare and smelly.

CSS preprocessors aren't that far from the CSS they produce; they're just wrappers. I don't see why anyone wouldn't learn CSS first - that seems like a recipe for frustration when they end up using a different preprocessor if nothing else.

Collapse
 
starbist profile image
Silvestar Bistrović

I am aware that learning CSS first is mandatory. I was wondering if preprocessors are introduced at the beginning of the learning process or later.

If I was to start learning CSS today and I was introduced with preprocessors, I think I would embrace it as default. Everybody uses it and makes your life easier.