Hatin’ on Web Tech

Avatar of Chris Coyier
Chris Coyier on (Updated on )

This article “Shadow DOM” by Steven Wittens is only vaguely about the Shadow DOM. It’s mostly about how awful everything is. HTML sucks, CSS sucks, the DOM sucks, SVG sucks, MathML sucks… I don’t want to pick on Steven. He is, without a doubt, many (many) times smarter than I am and has well articulated points. Let’s go wider.

I see this regularly from people who have been at this a long time and are very smart. They develop a dislike of the systems we have to work with. They see all the warts, mistakes, and especially what they see as deep systemic flaws or historical turns down the wrong path. This is all made worse as we traipse forwards, building upon these perceived cracks in the foundation.

They always have very good points. It’s hard to do anything but nod, because they are right, the web does some whacky stuff and has failed us in many ways. Wouldn’t it be wonderful if we could throw it all away and work with some new perfectly designed system that meets everyone’s modern needs. Sure, of course it would. Do you want to live in your town or a utopian village? I’ll take utopia.

Obligatory follow up sentence: but utopia doesn’t exist!

There is no alternate layout language for the web. There is no alternative way to deliver accessible content. There is no better replacements vying for the lead here. That’s because that’s a monumental task. Any contender would need to:

  1. Develop a new system for everything is empirically better.
  2. Get a world of developers to agree that this new system is better and demand it.
  3. Get standards bodies (or something like it) to support it so there is oversight and an independent source of implementation information.
  4. Get all browsers to agree and implement it perfectly.

lol right.

All those things are so insurmountably difficult that it’s no wonder it is rarely even attempted. I’d argue that #1 is the hardest. There are plenty of flaws with our current system, but imagine starting from scratch with something this complex.

I feel like what is going on now in web tech is that these problems are trying to be solved on a smaller scale.

It sure is a bummer HTML is our content, but also responsible for semantics, right? It would be nice to do whatever we wanted in there and not worry if we were hurting semantics. Hopefully Shadow DOM can help with that. Maybe it can also help with CSS being too over-arching when you don’t want it to be.

Maybe flexbox, grid layout, and regions can be the truly powerful and intuitive layout system we’ve always needed, without the accessibility issues inherent to tables.

SVG isn’t perfect, but maybe it’s still better than using a raster image format for a vector image? Maybe SVG has the potential to help with icon systems on sites in a better way? Maybe we can start using a new image format that increasingly works with modern browsers.

Maybe preprocessors can be a solution to ease authoring of these complex languages and reduce complexity?

Perhaps we can extend the web right now how we might want to see it, using existing tech.

These things are proving that we can make the web better. We can do it slowly. We can do it with the help of standards bodies. We can educate developers and change their thinking over time. We can use the browsers already out there, so we don’t need to fight public behavior.

I think that sounds nice. And I don’t think we have much of a choice.