How !important are we?

One of my favourite parts of CSS is the !important exception. It is a wonderful metaphor of the oft cited problem between CSS and JavaScript developers.

  • As a CSS developer, you know to avoid using it. It makes things too important and hard to overwrite.
  • As a developer that has to write CSS and doesn’t want to look deeper, it is the way to make CSS do what you want it to.
  • As a CSS developer finding it in a code base, it means someone wrote it that probably shouldn’t have.
  • As someone who doesn’t know CSS as all, !important means “not important”. And this is what I want to write about today. What is important and what isn’t? I feel we lost our ::focus.

I’ve spent the last 20 years on the web as a professional. I built products, contributed to libraries and tools. I wrote my blog, talks and recorded screencasts. I helped others do the same. Through all this time, I thought of my efforts worth-while as the open web is an amazing thing to support. I love the web. I love how it empowers people and gives them a voice. I love how it gives people a new chance for a second or third career when things didn’t go as planned.

But I am tired of the constant bickering and false sense of importance we still have as web developers. When you open any social media channel these days you encounter all kind of fights:

  • JavaScript vs. CSS
  • Frameworks vs. VanillaJS
  • Brevity vs. maintainability
  • Tooling vs. low barrier of entry
  • Client vs. Server vs. Isomorphic
  • Mac vs. PC
  • Native vs. Web
  • Mobile vs. Desktop We love to bicker about what people use and how they build things. We discuss what colour scheme they have in their editor of choice and which one is the most professional. We stay in our bubble and poke at each other and its walls from the inside. Not realising how petty and weird this is. Sure, it is rewarding to talk to your peers and find flaws to improve. It is also easier than talking to people who aren’t us. Or doing a reality check on what people use the web, mobiles and computers for. What is driving people? What do they expect from our products? What is a real issue, and what is a straw-man we keep erecting to tell people off for not following “best practices”? And – even more important – how much of an impact do we as frontend developers still have? Are we trying to optimise our own little world to the n-th degree as we don’t want to admit that we are not running the show?

Let’s recap how amazing the frontend world has become:

  • We have evergreen browsers, many based on the same open source engine
  • We have evergreen web views that allow us to build apps with web technologies
  • We have open sourced, customisable editors and IDEs
  • We have spaces to share code examples when we get stuck
  • We have live, collaborative coding experiences that help us fix issues without lots of emails back and forth
  • We have a version control system that is not terrible (remember SVN, CVS, Mercurial, Bazaar, Visual Source Safe, StarTeam…) and comes with hosting and collaboration tools
  • We have dozens of events each month, many of which release the videos of the talks for free
  • We have hundreds of online learning resources and interactive workshops
  • We have superb documentation on all the tech we use and we even have in-depth documentation if something is safe to use across browsers
  • We have dozens of hosting options, much more affordable than in the past. Many even come with automated setup of tools and CMS
  • We have best practice documentation, design systems, style guides and component libraries We should be high-fiving and congratulating each other on how far we’ve come since we wrote in textpad and FTPed our files to a live server. We should be concentrating on making this community better, more inclusive and welcoming. We should improve the tools we use and contribute great ideas from the past. Sure, it is frustrating to seeing a repetition of old mistakes. But didn’t we also learn by trial and error? It seems presumptious to expect people to learn our wise ways before creating something. And it is downright deluded to think developers hired to create a product get the time to really learn the craft first.

Instead of celebrating how far we’ve come we seem to be still in some weird competitive mode. When people release the smallest amount of code they use, we rejoice in throwing out truisms at them:

  • “This doesn’t work if the data you put in isn’t perfect!”
  • “This doesn’t perform when you have a lot of data!”
  • “This could be written much shorter!”
  • “This doesn’t work in old browsers!”
  • “This should be done in technology x and you use y!”
  • “This is not accessible!” These are all excellent points and a perfect product should have considered them. On closer inspection these are knee-jerk reactions designed to make us feel good. Do any of these stay applicable when you look at the context of the product? Or are they a perfect scenario we keep chasing as our end goal? Shorter code that is harder to read and maintain might not be the best idea. What does “this is not accessible” even mean? To whom? Under which circumstances? You can easily remove one barrier for a certain disability or condition and involuntarily create a barrier for others.

There are no winners

If you zoom out far enough, you can always make a true statement that makes the original creator look bad. And you look clever and caring about the web and people. You win. But who loses?

We all lose in the long run. The original creators lose as they get painted as people who don’t care or didn’t think it through. Spectators, especially people new to market, also lose. Their first impression is that anything public is ripped to shreds. That can discourage them to show their work – something we always cherished as a part of the open web.

I’d go as far as saying that even you don’t win anything. Yes, you appear the better person, but you also get discouraged by everything you see. You don’t feel like a part of a group of professionals that evolve over time. Instead you feel like you keep having to repeat the obvious as people don’t listen or try to get better.

The odd thing is that we don’t even realise how much time we spend complaining about the work of others. Time we could use to do things, to create things, to learn things. Time to encourage others and to give feedback to prevent mistakes from happening. It is a spiral of unhappiness and “it could be so much better” thinking. It is not fun being the person who knows better and sees mediocrity wherever you look. It is also called being a snob.

The web is a mess

There is no doubt that something, somewhere goes wrong. It is baffling to see that even with the amazing stack of tools and development products the web is a total mess.

The web is slow and big. According to a research by Katie Hempenius based on HTTPArchive, 90% of desktop web sites load 5.8MB of data.