CSS: Is It That Scary?

December 1, 20210

When I started learning Web Development, I was thinking that it was going to be hard. I wondered how all the UI was done. I was expecting that there was a special styling programming language that requires a lot of skills and experience to make things look beautiful. I started with an important programming language – HTML. Big deal, right? And after a couple of hours – I felt like a real web developer. I wrote my first website and it was opening in a real browser (locally, of course)! It had links and several pages, so I could navigate. More than that, it had a header and a footer like a real website. Just one thing made me a little bit upset – my website was ugly as a nuclear war!

Plain black text, square images and ugly font. This wasn’t a Mona Lisa for sure.

So, CSS was inevitable.

His majesty – CSS

At the very beginning, I thought it’s going to be some sort of rocket science. I started googling “How to make font color red in CSS”? I was waiting for weird symbols and a creepy syntax. But the answer was – “color: red”. Hold on, it can’t be so straightforward. Another request: “How to set the height to 100px in CSS”. Answer – “height: 100px”. Further – it is more. At that moment I realized that CSS is just a set of properties that are written in English and that’s it. It is not even a programming language, just a sheet with the rules.

5 minutes later, my website got a green background, red font and rounded image. This was my triumph, I was sure that tomorrow I’ll get a call from Google with a job offer. Spoiler: no, I didn’t.

From that moment, I got fond of making beautiful pages, looked for free designs and tried to implement them to get some practice. Later, I got my first job where I had to create UI for different websites. And the best part for me was styling. Because it was easy and fast. And you could make beautiful things and see the result of your work every moment. I worked in a small team of 1 designer, 2 full-stack developers and me. Every time some styling tasks appeared, other developers were delegating these tasks to me. When I didn’t know how to deal with something and was asking for help, the only answer was – “just Google it”. I thought they just don’t have time or want to teach me, so I googled, discovered new features, new CSS possibilities and learned them. Years later, when I was working in another company, one full-stack developer asked me to write some simple CSS for him. I asked – Why don’t you do it yourself? And the answer was – I’m freaking afraid of it!

You what?

Let me explain, this guy knew how to write the CSS, he even knew what he needed to do in that specific case, but he was afraid that it would behave not the way he expected. I started talking to other developers (mostly backend), and realized that for 70% of them the CSS is a nightmare, despite the fact that they knew the CSS! They easily use the CSS frameworks solutions, but when it comes to writing some custom CSS, they get stuck. Clever people, senior developers, who write very complex solutions in various programming languages, who are not afraid of dealing with the database on production, are afraid of Cascading Style Sheets?! The most common explanation was that CSS is not intuitive, it’s unpredictable and the layout gets ruined in one place while you’re trying to fix it in another. I can understand that.

Indeed when you just start using CSS and are trying to change the layout, you can get confused with the various options of doing that. At the very beginning, we had just HTML tags for layouting. And, it was clear because the concept of “table” is understandable for everybody. There was no need to use CSS to place an element in the header or sidebar. When “float” appeared, it became a little bit less predictable, but still easy. You had just a list of blocks and had to imagine where the blocks should be positioned depending on their neighbors. At this point, the developer had to activate his spatial imagination to understand the positioning of the elements. Already, here, some of them decided that “table” is much easier and kept using it.

Then appeared “flex” – a much more powerful and useful instrument of layouting. And people who still didn’t get familiar with the “float” got completely lost. The situation was getting more difficult because of the growing gap between frontend and backend. If before web developers were mostly full-stack, now design got more complex, front-end developers started using modern features like “flex” and a full-stack developer, who yesterday was writing the CSS, now gets lost in all these features and decides to focus on the backend only. Since that moment all styling tasks, even the smallest ones are delegated to frontend developers – it’s their job. I don’t even talk about “css-grid”, animations, sass/less/postcss, prefixes, responsiveness and other css features.

 

Is the CSS indeed scary?

 

I have never heard of somebody being afraid of MySQL, or even Java, Python, PHP and so on. If you just don’t know a language, when somebody asks you to write some code for production in it, you’ll just refuse. If it’s not your field, it is absolutely fine to delegate it to somebody who is proficient in it. With no fear.

But why are people not afraid of complex technologies, but get scared of some simple lines like these?

display: flex; 
  justify-content: center; 
  align-items: start; 
  transition: all .3s; 
  @media only screen and (max-width: 600px) { 
    body { 
      padding: 10px; 
    } 
  } 

I think It’s because CSS became not as clear at the first sight as before, but it is still not considered as something difficult and worth learning. And, anything that is not clear, but looks simple, is scary. People used to write the CSS, so when a task comes, they try to deal with it, but with no success, and it scares them. So they don’t like it.

It’s like driving a car for several years and feeling comfortable with it and at one moment changing it and realizing that in the new car the steering wheel was not the best option to turn left or right anymore. Or, to slow down there are 3 different pedals with individual braking behavior and you have no idea which one to press to just stop. And finally, my car doesn’t fit in my garage anymore. Moreover – all cars from now are like that, no old cars allowed on the road anymore, I would get freaking afraid of it, for sure! But I used to drive! Why, the hell, I can’t do it now?

So in this case I’ll have 2 options:

  • Invest time and effort in learning and getting familiar with the new behavior of a known thing that was simple and clear before. This is not always possible, I just can not have time for that or have more important things to learn.
  • Hire a driver, who for sure knows how to deal with all these new features and don’t waste time on that.

Is the CSS so scary? Of course not, it just needs some time to get familiar with and requires experience to make fewer mistakes. As anything in the world.

Or just find a guy who likes it and will do the styling for you 😉

Leave a Reply

Your email address will not be published.

https://isd-soft.com/wp-content/uploads/2022/08/whitelogo150.png
Connect with us
Bulgara Street 33/1, Chisinau MD-2001, Moldova
+ 373 22 996 170
info@isd-soft.com
De Amfoor 15, 5807 GW Venray-Oostrum, The Netherlands
+ 31 478 502944

Subscribe to our newsletter today to receive updates on the latest news, releases and special offers.

Copyright ©2022, ISD. All rights reserved | Cookies Policy | Privacy Policy