DEV Community

Seth Corker
Seth Corker

Posted on • Originally published at blog.sethcorker.com on

Reasons developers avoid CSS


Break the CSS Stigma: Real developers don’t design and don’t use CSS

The reason developers avoid CSS

Not all web developers know CSS well and some I’ve spoken to believe they don’t need to. Other than the challenge to master CSS which I’ve written about in What is the biggest mistake new developers make when learning CSS? An underlying and systemic problem exists that I want to address. Design is not always respected from the perspective of developers. It is seen as an afterthought. The last piece of the puzzle that every developer dreads. It is seen as a necessary evil that gets in the way of real work. This sad reality impacts the relationship developers have with CSS and design as a whole. It drives a wedge between developers and designers and reinforces negative stereotypes and biases. Why is CSS relegated to the last minute hack or simply passed on to the resident CSS expert?

Why is CSS seen as inferior by developers?

Through my experience as a developer and study of design, I’m intrigued by the perception that CSS has through the eyes of many developers. There is a rivalry between languages and technologies that is inescapable. It comes up through jokes and strong opinions that fill a room, but CSS seems to garner more pervasive disdain than any other language.

It’s not a real language

On the surface, arguments against CSS are justifiable. It isn’t the most intuitive language or the easiest to master. CSS doesn’t have the features of a scripting language like JavaScript. It requires a different way of thinking, which conflicts with existing assumptions. All these culminate because developers tell themselves, CSS isn’t a real language, so why should I learn it?

By perceiving the CSS as not a real language, it’s seen as inferior and challenging to do anything useful in. Once this mindset is in place, it often receives the least focus. It’s left until the last minute and is a frequent cause of bugs because of the rush to get something done or the lack of understanding about best practices. A large and or long-lived code base exacerbates the problem and instils fear in developers. The mentality becomes that of a knight going into battle against a dragon; the developer is up against an insurmountable foe. They are congratulated when they struggle to hack the CSS into submission and update styling without breaking the whole website. The fear of ‘wasting time doing CSS’, reinforces another argument that design is less important.

It doesn’t matter, it’s only design

It’s difficult to pinpoint exactly why some developers feel design is unimportant. Perhaps it’s the lack of understanding of design that means developers lack appreciation. Maybe it’s a defence mechanism to avoid having to put on armour and do battle with the dragon. I’ve heard groans when a design changes. I’ve even expressed frustration over the specificity of a design. If you think design doesn’t matter on the web, then consider these truths:

It’s not possible to ship a successful website with just CSS.

It’s unlikely that you could ship a successful website without CSS.

Design is seen as purely aesthetics, where the core focus is to deliver value to the target audience. This leads to CSS being perceived as a secondary concern. It’s the last piece of the puzzle and gets limited attention. This feeds into another lie that I’ve heard many times. Directly as “We’ll worry about the design later, just get it working” and indirectly as “The functionality is what’s important so focus on that first”.

Design is important, and it’s difficult to argue it isn’t. Poor design is easy to spot by even the untrained eye. With a great selection of well-designed websites and products available, design is a differentiator. It is the user’s first experience of your site and helps a user determine if they trust your product. This leads to an interesting perception of design; it’s a feminine subject.

Why is design perceived as feminine?

In high school I took programming classes alongside art and design. In university I studied graphic and media design alongside computer science. Computer science and design seem to be fields which have huge gender imbalances. In my design classes, women outnumbered men by a very small margin. In computer science classes however, there was a significant difference with men making up at least 80% of the class. I only know a few others who were studying both computer science and media design alongside me.

I highlight this imbalance because graphic and media design has a perception as a feminine subject [1]. Whereas computer science is perceived as a masculine subject [2]. It’s unfortunate this perception exists, I believe both fields should be equal, but it’s a difficult perception to break. This dynamic is complicated further by tension between STEM subjects and art subjects. In my experience, some developers hold an underlying belief that they are more important than designers. This false unconscious bias is at the core of why design is perceived as inferior when it’s not. We must all work to overcome these challenges and introspect to avoid falling into the trap of believing design is unimportant.

How can we overcome the CSS stigma?

CSS is part of the whole picture that makes up the web. You can’t just ignore it and hope it will go away. It won’t. The best thing to do is to do what developers do best and learn. Once you consider that CSS is an integral part of your web developer’s toolkit, embrace it. Make understanding your top priority to overcome any fear or harboured resentment you have for CSS. Fear is the unknown, so the only way to dispel it is to learn deeply about it and become the torchbearer for others.

If you have limited experience of design, then you might not appreciate the important work and deep thought that goes into design. UI design isn’t just about more white space here or there. It’s not just about which colours to use or how big the title should be. Many factors inform design just like programming is. Design is about communicating your intent without saying a word. It’s the guiding searchlight in the night that attracts people to your product. It’s the invisible hand that points users in the right direction. It’s the glue that connects the pieces together. Take some time to learn about design and you’ll grow to appreciate it a little more.

There is no merit in putting up walls between developers and designers or anyone in your team for that matter. Empathy is a powerful tool to break down barriers and ditch cognitive biases. It’s important to treat the input of your team equally. Design and CSS should be incorporated into planning and development as a core pillar of building a product on the web. To leave it until the last minute is signalling you value your time more than your designer.


Footnotes

[1] Media, D. N. (2014, July 30). Women in Graphic Design (and why we need to talk about them). Retrieved from https://desktopmag.com.au/features/women-in-graphic-design-and-why-we-need-to-talk-about-them/

[2] Gallup, Inc. (2017, June 8). Public Believes Men, Women Have Equal Abilities in Math, Science. Retrieved from https://news.gallup.com/poll/15202/public-believes-men-women-equal-abilities-math-science.aspx

Oldest comments (24)

Collapse
 
gayanhewa profile image
Gayan Hewa • Edited

The main reason I avoided css for soo long because I couldnt just get it. I always had this realization that I cant do any design because of my struggles to align something correctly or choose colors etc. But since getting used to tailwindcss, Now I read about color theroy and other UI/UX videos and articles and they make so much sense. I dont have to be an expert, I just have enough tools in my toolbox to be able to try something new side project without getting bogged down by the sheer though of having to do a design.

Collapse
 
darthknoppix profile image
Seth Corker

CSS can be difficult to tackle but it's not insurmountable, I'm happy that you found the tools that worked for you and have developed a interest in design as a result of it. If you ever want to delve deeper into CSS, I recommend learning about some of the foundational knowledge like how cascading and specificity works. Although tailwind is a great tool, I still think learning the underlying platform is great for understanding.

Collapse
 
gayanhewa profile image
Gayan Hewa

Yeah, I agree. I guess, having found a way to not run away from it will eventually build curiosity to get a better deep understanding.

Collapse
 
themattyg profile image
Matt Graham

I consider myself a real developer, I prefer server side, but I get a kick out of hacking CSS to bring someone’s design from a photoshop file to something interactive and (to a certain extent) responsive. Or maybe I’m just weird.

Collapse
 
darthknoppix profile image
Seth Corker

That's great to hear, although "hacking" is the term I encounter a lot when devs talk about CSS. I will admit that there are sometimes hacks in modern CSS (more so in the past) but I would say with some understanding, you're just writing/crafting/developing CSS.

I don't think it's weird to take a break from backend and dive deep into something like design on the frontend, it means a more varied workflow which keeps things interesting. It's fun doing something you don't often do too.

Collapse
 
seanability profile image
Seanability

I stopped doing any regular front-end development about 15 years ago. Prototype.js was the only library around and we were just converting our table layouts to CSS. Fast-forward to recent years and I just can't seem to wrap my head around it. Even something that should be simple, e.g., centering a single React component on the screen with Bootstrap led me down many SO questions and answers, all complicated, none seeming to work as inteded. I eventually combined a few answers and got my component horizontally centered, and decided that was good enough. The fact that something trivial became complicated is what made me say, "nuts to this".

Collapse
 
darthknoppix profile image
Seth Corker

I'm sorry you had such a difficult time, I don't think CSS is especially straight forward in some cases and vertical centring is one of these cases. I would like to say that although this has been a notoriously difficult problem in CSS, once you understand the fundamentals of CSS - it's much easier.

Modern CSS makes the problem almost trivial if you use Flexbox or Grid positioning, if you've been away from the frontend for a while or even just want to brush up on flexbox - I recommend taking a look at (Flexbox Froggy)[flexboxfroggy.com/].

Collapse
 
seibmacdaniel profile image
Mac Daniel

The arguments against CSS seem fair. It's tricky, messy, and not to mention frustrating. But as a designer who transitioned to designing largely in the browser, I have to agree that design (CSS) needs to be seen as a pillar of a web product.

This is because design is the first thing users see before interacting with anything in the website. It makes or break the experience. Just imagine a poorly styled or 'unstyled' e-commerce website. Users just won't be trusting enough to spend real money on it.

The way I look at it, design takes everything a level higher the same way 'information' is elevated from just 'data'. And I think this is where it gets annoying to some developers-- there's just a lot of intangible things and gray area about design and perception which seemingly work against the common mindset in programming.

Collapse
 
darthknoppix profile image
Seth Corker

Great points. CSS can be tricky to master and isn't always intuitive but it's a core pillar of the web. Design as a whole does seem to conflict with the common programming mindset and I think that's another reason developers, designers, business analysts, etc. should have a close working relationship with one another. The confluence of different priorities and perspectives create better products and mend divides.

Collapse
 
sym profile image
Ryan Carter

Css is one of my favorite, best languages. It is difficult but rewarding. I am usually alone in this opinion but that's okay. It is unique and wildly powerful to do so many things. It is definitely an acquired taste.

Collapse
 
darthknoppix profile image
Seth Corker

I like CSS too, there are certainly some quirks but I think CSS is very powerful. A website like A Single Div just goes to show how CSS can play a huge role in web development.

Collapse
 
workingwebsites profile image
Lisa Armstrong

Agreed! CSS can be crazy making sometimes, but it's very powerful. It's not just pretty colors, there's s fair amount of functionality there too. Good CSS/design will guide the user through your app.

Collapse
 
georgecoldham profile image
George

High5 ✋. CSS is great!

Collapse
 
kerryboyko profile image
Kerry Boyko

The reason I don't like CSS is because (strictly as a programming language) there are a lot of things that make it difficult to reason about and to use.

  • Everything is global, without an easy namespace protection.

It's hard to keep track of where classes are defined, and what priority they are given. As projects grow larger, different developers might need different definitions for .button but the browser can only access one at a time. How it "chooses" which .button attributes to use, and which to ignore can depend on a number of factors - order they're defined, specificity, the !important flag. This is one of the reasons you have the BEM syntax, which is very effective, but isn't a problem in other languages that have scope and encapsulation.

  • It's difficult to reason about layers.

Unlike Photoshop, you can't just position layers relatively. Strictly speaking, you can, but again, this requires understanding those pesky rules on what gets rendered first, the position attribute, etc. The "easiest" way is to use the z-index property, BUT since z-indexes are (as mentioned above), global, it can be difficult to keep track of what goes where.

  • The debug tools are not as good as other languages.

What I would give for some sort of tool that allows me to set breakpoints in CSS, that allows me to see what is getting loaded, in which file, in which order, where.

Don't get me wrong. There absolutely is a need for design on the web - and CSS was an amazing breakthrough in the late 1990s, but I can't believe that in the 20 years since it's introduction, nobody's come up with anything better for layout of web pages, only different ways to create the same hard-to-reason, hard-to-debug CSS code (Sass, Less, CSS-in-JS).

It's not that developers don't like CSS because they don't like design - but that the CSS language doesn't make design easy, it adds to the complexity of it.

Collapse
 
darthknoppix profile image
Seth Corker

Thanks Brian, you make some great arguments.

  1. Namespacing and specificity are certainly challenges which need to be addressed in some way. I think there are certain rules that should be followed in larger teams to avoid these issues like BEM, avoid using !important etc. The specific issue of scope and encapsulation being present in other languages doesn't make it impossible to abuse in those languages, as programmers we just follow rules like keeping functions small and avoiding making too much public.

  2. I haven't encountered many issues with layers though I understand the frustration. Complex layering is not intuitive with CSS and perhaps it's something that needs to be addressed. In modern CSS, I will often favour CSS grids to overlap layers effectively. I also follow a simple rule, HTML is rendered top to bottom and any 'layers' will be rendered back to front. The z-index is something to be used sparingly as there is often a way to achieve the same effect another way.

  3. Although there is no 'breakpoint' like functionality in CSS, I think browsers have done an excellent job of providing great tools for debugging. It's improved significantly in the past decade.

The developer console in Firefox 69.0 showing CSS rules
Using the developer console in any modern desktop browser will show which rules are contributing to the final output and where they are coming from. (This screenshot was taken on Firefox inspecting dev.to)

You make some solid points as to why CSS isn't the easiest to reason about. What are some systems of design you find more comfortable to work with out side of the context of web development?

Collapse
 
lesha profile image
lesha 🟨⬛️

What did I just read. Inferior? To what? Javascript? Even if they have different domains of application? Even if you have no option but to use it if you want styles?

CSS doesn’t have the features of a scripting language like JavaScript.

Yeah sure, you can't surf on your phone, does it make it a bad phone?

It requires a different way of thinking, which conflicts with existing assumptions.

Well yes if they assume that CSS is a programming language, no surprise they wonder why CSS doesn' have scripting features

Why is design perceived as feminine?

Those people are morons, hope they find a job suitable to their world view, because if css looks like a dragon to them, then webdev certainly is a bad career choice

Collapse
 
darthknoppix profile image
Seth Corker

Just to be clear, this post is based on the perception of CSS that I have observed talking to other developers, attending events/meetups/conferences etc.

I agree with your points, CSS fulfils a particular purpose and I think it does a respectable job at it. I have often see devs new to frontend, try to solve their problem using JavaScript when there is a much easier solution with CSS and HTML. When they then approach CSS, there are complaints about why they can't do the same things they do in JS. Some of the underlying conflict with CSS, in my experience, is related to the perception of design. I have seen solutions like plain Bootstrap and Material Design be used instead of investing in design because it is seen as having a lower precedence.

Collapse
 
kylefilegriffin profile image
Kyle Griffin

Everytime someone says that CSS is not a language, I seethe. CSS contains logic, it has rules, it can be extended, it can be minimized for efficiently and enqueued. It can even output html content and accomplish effects and DOM manipulation that we used to rely solely on Javascript to do. It even cooperates with the browser it's on to provide a dark mode wrapper if people want to do that.

Every year CSS is becoming more and more logical and it's not easy to master at all. To say that it's not a language clearly have misdefined what a language is.

This was not directed at you Seth as you know what you're talking about. But I feel that discussions where people need to take sides and divide the community, is partly why some people would argue that frontend development has some of the most toxic people in tech. Because people use this "it's not a language" argument to dismiss other developers who excel in CSS.

Collapse
 
darthknoppix profile image
Seth Corker

I agree with you wholeheartedly, I'm fairly proficient at CSS and I enjoy it but what I wrote about was the perception of CSS that I've encountered.

I want to encourage an open discussion on the reasons why CSS has a stigma and try to overcome it. I often hear division between various communities. At meetups/talks/events/discussions I hear comments like:

At least it's not JavaScript
Two backend devs talking

This developer writes PHP, he's old so of course he would
directly said to me

Who cares about the design, just use bootstrap and be done with it
an offhand joke at a talk

You're right in saying that CSS is a legitimate language which is powerful on the web, it's a shame it's often overlooked. I've often had to dissuade colleagues from writing something in JS that can easily be achieved with HTML and/or CSS alone. I think this comes down to a gap in knowledge and I've outlined some of the reasons why I think some developers prefer to forgo learning about CSS.

In your experience, have you encountered resistance to learning CSS?

Collapse
 
workingwebsites profile image
Lisa Armstrong • Edited

Thank you Seth for highlighting the perception that design and CSS is feminine and therefore not as valued as other areas of web development!

It sounds like a case of "I suck at this, therefore it must be bad."

CSS can be challenging, it's a different way of thinking, but thinking differently is a good thing.

Collapse
 
darthknoppix profile image
Seth Corker

Thanks for taking the time to comment.

It sounds like a case of "I suck at this, therefore it must be bad."

I definitely think this a common case which is a big barrier to taking to the first step and learning it. I agree that it good to flex your brain and undertake new challenges every now and then.

Collapse
 
aleduruy profile image
Alessandra Duruy

"I highlight this imbalance because graphic and media design has a perception as a feminine subject."
Couldn't agree more!

And it's funny because during a long time I've been the only girl on the Devs team, and I've always been good with CSS, but I honestly can't tell how much of my expertise got better because I really enjoy working with CSS and how much was because the team always seemed to assign the design/css tasks to me, the girl of the team lol

Collapse
 
darthknoppix profile image
Seth Corker

Couldn't agree with you more!

In my experience, there is always a resident CSS expert and everything goes to them. I've been in this situation before but I think the whole team can benefit from trying to get CSS. I've found pair programming is a great way to share CSS knowledge with others and get them more excited about CSS.

Collapse
 
phoinixi profile image
Francesco Esposito • Edited

Unfortunately most developers don’t see value in improving their CSS skills. However it’s not gender related IMO, at least not in the companies I have been working for.