
![CSS](https://res.cloudinary.com/nucliweb/image/upload/c_scale,dpr_auto,f_auto,q_auto,w_896/v1694444780/joanleon.dev/assets/css-maltratado/css.png)

A few days ago I commented on [Twitter](https://twitter.com/nucliweb/status/1344293139209707520) and on [LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6750058724720738304/), that the article with the most views I've had this year was one where I did some reviews of [CSS Books](/en/blog/css-books/). So far so good, I'm just sharing that there's some interest in those book reviews that talk about **CSS** 😊.

The trigger that led me to write this article was a comment made by my professional colleague [Hèctor](https://www.linkedin.com/in/hectorpascualc/), where he commented with the phrase that gives the article its title.

![It's curious how forgotten and mistreated CSS is](https://res.cloudinary.com/nucliweb/image/upload/c_scale,dpr_auto,f_auto,q_auto,w_896/v1694444780/joanleon.dev/assets/css-maltratado/comment.png)

<div style="margin-bottom: 4em" />

### Why don't people like CSS?

Honestly I don't know, I do love it, the only thing I can think of is **that they don't know it**.

> As a species, we have brains designed to reject the unknown. As a race, we have the facility to criticize or despise what's unknown.

I feel unable to judge a programming language, CSS isn't one... I see you coming _(but we'll talk about that when CSS Houdini is more advanced)_, they were created and designed to solve a specific problem, at a **specific moment**. Something that many people have a dislike for, the cascade, had its reason when CSS was born to style web content. And there's no point in criticizing it, if you know how it works and the reason why this functionality (it's not a bug) was decided to be implemented in the language, you'll know how to leverage it in your favor and how to avoid it when necessary.

I can't say that _"put your favorite language here"_ doesn't work, is poorly thought out or doesn't resemble this or that language I'm used to. I can't criticize something I don't know.

<div style="margin-bottom: 4em" />

### Why do they forget about CSS?

I don't know either. There's a lot of training that ignores or glosses over CSS topics. It's curious to see bootcamps that have a web development training program and in the curriculum the weight of CSS content is scarce or non-existent.

There's so much hype with JavaScript, and it's well deserved, that it overshadows CSS. Which is curious because CSS is part of the web.

I've seen in much code, CSS properties that contradict the previous property or unnecessary properties.

<div style="margin-bottom: 2em" />

#### Flexbox

This is code I've seen several times in Pull Requests.

```html
<section class="wrapper">
  <div>...</div>
  <div>...</div>
  <div>...</div>
</section>
```

<div style="margin-bottom: 2em" />

```css
.wrapper {
  display: flex;
  flex-direction: column;
}
```

<div style="margin-bottom: 2em" />

With `display: flex` we make the `<div>` elements flexible, but since we want them to display one below the other, `flex-direction: column` has been added. But **attention**, that would be the default behavior of `<div>` elements, there's no need to add flexbox in this case.

Knowing CSS, we'll know that we don't have to add `display: flex` by default, and we'd know that it would be very useful for controlling spacing and alignment between elements, changing their behavior between different media queries or changing the presentation order, where it would make sense to add it.

<div style="margin-bottom: 4em" />

#### !important

The use of `!important` is beyond our control, [more than 27 million](https://github.com/search?l=CSS&q=%21important&type=code) in public repositories on GitHub.

`!important` has its use, it's necessary and won't disappear. But using it incorrectly will bring us problems in maintaining that code. Remember, if you have to add an `!important` something is wrong, sometimes it's because you're using a framework or plugin that has behavior you don't want, which raises the question: do you really need that plugin or framework if it doesn't meet your needs? But well, that's another debate.

<div style="margin-bottom: 4em" />

### CSS is Part of the Web

Wanting to develop any solution with web technology implies knowing HTML, CSS, JavaScript and Web APIs. Defining yourself as FrontEnd, but not wanting to touch CSS, in my opinion, that person **is not frontend**.

`#CSSisPartOfTheWeb`

<div style="margin-bottom: 4em" />

### Dissemination and Support for CSS

Not everyone has to disseminate about CSS _(I'll continue doing it)_, but **no one should despise it**. After all, they are solutions that other people have decided on as a solution to a specific problem, at a given moment.
