CSS and JS Are at War, Here’s How to Stop It
Tags: css, react, discuss, webdev
Published: 2019-01-29 13:36:31

---
title: CSS and JS Are at War, Here’s How to Stop It
published: true
canonical_url: https://evilmartians.com/chronicles/css-and-js-are-at-war-heres-how-to-stop-it
description: There are a lot of people who love both JS and UX/CSS. If we stop labeling people just as “JS developers” or “UX developers”, we can achieve a ceasefire in the current “JS vs. CSS” war and achieve a mutually benefiting peace.
tags: css, react, discuss, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/p2xgqt4rhw5ze9aoj8yn.png
---


**TL;DR:** There are a lot of people who love **both** JS and UX/CSS/etc. If we stop labeling people just as “JS developers” or “UX developers”, we can achieve a ceasefire in the current “JS vs. CSS” war and get closer to peace.


## The War is Real

Some call it [The Great Divide](https://css-tricks.com/the-great-divide/): the frontline is real, with JavaScript diehards on one side, and UX/CSS people who advocate non-JS approaches to interfaces—on another.

Front-end developers are afraid of losing their jobs if they avoid the whole JavaScript hype. And it is perfectly understandable: CSS is out of trends. There are significantly fewer CSS conferences and meetups compared to JS/React and friends. For instance, there are 6+ JS meetups in New York and 0 regular CSS meetups.

On the other hand, we see simple static websites being over-engineered out of a sheer [FOMO](https://en.wikipedia.org/wiki/Fear_of_missing_out). 

We see prominent figures in the front-end community passing the blame on each other every day and that is unfortunate, to say the least.


## Look Beyond

The warring factions are often labeled as:
1. **“JS-JS-JS”**: Developers who create SPA with client-side JavaScript frameworks like React, Vue.js, and Angular. They are heavy users of innumerable build tools (Babel, webpack, etc.) and JS libraries.
2. **“UX developers”, “CSS developers”, “HTML-JS-CSS developers”**: Developers who create static websites with vanilla JavaScript and plain CSS. Accessibility and performance are most important topics in their community.

But do we **have** to have this split? Maybe this dualism is based solely on our own bias? 

In my opinion, this bias is largely caused by two things.

First of all, there is a trend to separate CSS and JavaScript conferences. I think it got started by a very popular and successful JSConf/CSSConf family of events and by a trend for Put-Your-Own-City-Here.js meetups. Content platforms also support the divide: some of them publishe mostly React/JS articles, others focus on CSS and UX.

Second of all, social networks are good at [polarizing society](http://www.pewresearch.org/fact-tank/2016/01/27/the-demographic-trends-shaping-american-politics-in-2016-and-beyond/). We put ourselves in a bubble of likeminded individuals by subscribing to their feeds and make things even worse by reposting only the most aggressive opinions coming from the other side.

The modern web is incredibly complex. It is extremely hard to master all the technologies that power it and no one can really call oneself a 100% “full-stack” developer. But due to the fact that the JS and CSS/UX discourses have become so (artificially) separated, people with different, but not necessarily opposing passions are bing shoved into a black-and-white “JS vs. CSS” world view. React developers who are passionate about CSS animations and [a11y](https://en.wikipedia.org/wiki/Computer_accessibility) are labeled simple as “JS folks”. And a CSS developer who loves Babel and zero-runtime CSS-in-JS will still be painted as a “CSS guy/gal”. 


## People Who Love Them Both

As a creator of [PostCSS](https://postcss.org/), I could never really pick a side, even if I wanted to. On one hand, PostCSS is a tool for CSS (hence the name). On another hand, PostCSS is a **JavaScript** build tool and build tools are not well accepted in a modern CSS community.

And I am not alone, there are so many people like me: the creator of an amazing [React toolkit for animations](https://github.com/aholachek/react-flip-toolkit), or the creator of a [CSS a11y linter](https://github.com/YozhikM/stylelint-a11y), to name a few.

To say the truth, each of us knows only a small subset of technologies that exist out there. And one’s passions not necessarily come from a single topic either. It is OK to love both React and CSS. Or use complex build systems to be sure about you got your a11y right. Or you can dive into distributed systems because you want to make [great UX with a bad Internet connection](https://github.com/logux).

Even technologies themselves cannot be seen in black and white.

[BEM](http://getbem.com/) is often mentioned by the proponents of “CSS faction” as a way to avoid the possible confusion of CSS-in-JS. But few people know that it was not designed by [Yandex](https://yandex.com/company/) as a purely CSS technology! It also contains a JavaScript framework and originally had a set of ideas that were later used in React (like nesting small isolated components).

ESLint configs, popular in React community (like [AirBnB config](https://www.npmjs.com/package/eslint-config-airbnb)), contain [a lot of a11y rules](https://github.com/evcohen/eslint-plugin-jsx-a11y#supported-rules).


## The Solution

I think the war is real. I think we can stop this war if we stop dividing developers into black and white categories.

1. If you like technologies from both “sides”: say it out loud! Make it visible, so people can start a civilized discussion. Do you like modern JS frameworks, but also like creating static websites that don’t involve client-side rendering at all? Tell the world about it. Open source authors will create more frameworks for static websites, if they see the need.
2. Let’s have a public forum for a conversation between JS and CSS worlds. If you are organizing a JavaScript meetup, set aside a day for CSS/UX talks. Let’s “front-end” conferences instead of “JS conferences” and “CSS conferences”, where people from different camps could explain their daily problems and preferred solutions to their opponents.
3. Let’s try technologies coming from “the other side”:
   * If you are a CSS/UX developer, start with linters. [Stylelint](https://stylelint.io/) is a good CSS linter to start with. It will warn you about mistakes and allow you to share best practices across the team. And you can run it as a plugin for your favorite text editor, so you can start even without any bundlers.
   * If you are React developer, try some vanilla JS on your next landing page or a blog. This will allow you to better understand your framework’s internals. And your users will thank you for increased performance due to a lighter JavaScript bundle.

## Further Reading

Here is my article about [the future of PostCSS, linters, and CSS-in-JS](https://evilmartians.com/chronicles/five-years-of-postcss-state-of-the-union) at [Martian Chronicles](https://evilmartians.com/chronicles/).