Reasons developers avoid CSS
(Source/Credits: https://dev.to/darthknoppix/reasons-developers-avoid-css-emb)
Break the CSS Stigma: Real developers donāt design and donāt use CSS Not all web devel...
title: Reasons developers avoid CSS published: true tags: CSS,Design,beginners,webdev canonical_url: https://blog.sethcorker.com/the-reason-developers-avoid-css/
Break the CSS Stigma: Real developers donāt design and donāt use 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
Comments section
aleduruy
•May 1, 2024
"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
darthknoppix Author
•May 1, 2024
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.
workingwebsites
•May 1, 2024
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.
darthknoppix Author
•May 1, 2024
Thanks for taking the time to comment.
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.
kylefilegriffin
•May 1, 2024
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.
darthknoppix Author
•May 1, 2024
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:
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?
lesha
•May 1, 2024
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?
Yeah sure, you can't surf on your phone, does it make it a bad phone?
Well yes if they assume that CSS is a programming language, no surprise they wonder why CSS doesn' have scripting features
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
darthknoppix Author
•May 1, 2024
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.
kerryboyko
•May 1, 2024
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.
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.
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.
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.
darthknoppix Author
•May 1, 2024
Thanks Brian, you make some great arguments.
!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.z-index
is something to be used sparingly as there is often a way to achieve the same effect another way.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?
sym
•May 1, 2024
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.
georgecoldham
•May 1, 2024
High5 ā. CSS is great!
workingwebsites
•May 1, 2024
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.
darthknoppix Author
•May 1, 2024
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.
seibmacdaniel
•May 1, 2024
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.
darthknoppix Author
•May 1, 2024
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.
seanability
•May 1, 2024
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".
darthknoppix Author
•May 1, 2024
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/].
themattyg
•May 1, 2024
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.
darthknoppix Author
•May 1, 2024
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.
gayanhewa
•May 1, 2024
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.
darthknoppix Author
•May 1, 2024
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.