Skip to main content Accessibility Feedback

CSS vs. JavaScript

This week, Mandy Michael published the very good, provocatively titled, “Is there any value in people who cannot write JavaScript?”

We’d just finished a set of talks about CSS, and during the panel we got a question along the lines of (paraphrasing): “Is there a place in the industry for people who just write css and html”… What I am very concerned about is that many still don’t see value in being skilled in CSS & HTML.

The article picked up steam on Twitter this week, with many who specialize in CSS sharing their stories.

The insanely talented Mina Markham shared:

I was frequently told I wasn’t “senior” enough or “technical” enough, which I interpreted to mean “you don’t know enough JS.”

If you think Mina isn’t technical enough, you’re a fucking idiot. Also, go read her whole thread. There’s a lot of goodness there.

CSS genius Sara Soueidan noted:

To all those arguing that CSS isn’t good or important enough:

A challenge: rip you sites of CSS for a day? How well would that go?

And personally, I’ve found that it’s hard to find jobs when you only know HTML and CSS, and the ones you do find pay less.

The reason I started learning JavaScript in the first place was to have more career opportunities—and it worked.

I have some thoughts

First, I’ve never gotten the impression that people feel CSS isn’t important, though Sara has almost certainly had a lot more conversations with people about this topic than I have.

I don’t doubt there are people who’ve said something along those lines to her, but I don’t believe it’s the mainstream or norm. I do think there are people who think CSS involves less skill than JavaScript, though.

Here’s what I believe is the cause of a lot of this: it’s easier to learn the basics of CSS than the basics of JavaScript, and that has some market implications.

The Basics of CSS vs. JavaScript

I think CSS is a bit like skiing, and JavaScript is a bit like snowboarding.

CSS is easy to tip-toe into. You can write one line of code and immediately see results.

body {
    background-color: rebeccapurple;
}

A lot of it is very plain english in nature, too. background-color. color. width. Those all make sense.

document.querySelector(). Say what, now?

I teach beginner’s JavaScript. Most of the folks I talk to find the basics of JS completely overwhelming.

If you’ve ever tried skiing, the basic mechanics are pretty natural. Face forward, two legs independent, turn to steer. Successfully going down a slope takes you a day or less. Not well, mind you, but you’re moving.

Learning snowboarding is hard. You spend the first two days falling over and over again with a plank strapped to your legs. You end the day cold and bruised with almost nothing to show for it.

Learning CSS is like learning to ski. Learning JavaScript is like learning to snowboard.

The basics vs. mastery

Here’s the thing, though: mastering skiing is a lifetime pursuit.

The basics are easy. Becoming truly good is quite difficult. Same goes for CSS. I know so many senior JavaScript developers who don’t truly understand or appreciate the cascading aspect of CSS (it’s a feature, not a bug).

Snowboarding may be hard to learn, but once you pass a certain point (in my experience, being able to go from one edge of the board to another), you advance very rapidly. You can get pretty good in just a season or two.

JavaScript is like snowboarding. Hard to learn at first, but easier to master in the long run.

This causes some free market effects

What this means is two things:

  1. A lot of people who know HTML and CSS, but not JavaScript.
  2. A lot of JavaScript developers who know basic CSS.

Right now, the demand for JavaScript developers is high, the supply is lower than that of CSS developers, and as such, pay for JS roles is higher.

You also unfortunately see companies relying far too much on JS developers to write CSS, which results in bloated, poorly written CSS that doesn’t scale well.

It also causes an over-reliance on JS for things that would more easily be solved with HTML and CSS alone.

CSS and JavaScript are equals

As projects scale, you cannot downplay the importance of scalable CSS. It’s the difference between slow, buggy projects and fast, easily maintainable ones.

There are JavaScript developers who are very competent CSS developers as well.

But, things like the movement towards CSS-in-JS this year show me that, as a whole, the sub-field of JavaScript doesn’t really understand CSS that well.

I’d love to see more organizations value senior CSS roles in the same way that they do senior JavaScript roles.