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 be...
For further actions, you may consider blocking this person and/or reporting abuse
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.
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.
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.
High5 ✋. CSS is great!
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
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.
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.
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.
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.
"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
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.
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.
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.
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.
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.
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.
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.
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?
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.
Thanks Brian, you make some great arguments.
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.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.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.
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?
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.
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.
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".
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/].