Live data from Hacker News

You suck at CSS and that's okay (2022)

rexriepe.com

41–50 of 70 posts

Re: You suck at CSS and that's okay (2022)

#42
post #3

> The last big driver of time-wasting in CSS is the drive for pixel perfection I agree. Also users/product managers do not care. They will see UI that is a little bit “off” and think negatively about your brand. Congrats, now you have a ticket to make the UI look pixel perfect. I suppose the audience for this isn’t people who actually get paid to write CSS, but instead casual blog writers. It’s definitely ok and norm…

On the other hand, personal sites and side-projects are where you can afford to take as much time as you want in order to achieve pixel perfection without the pressure of shipping anything.

Re: You suck at CSS and that's okay (2022)

#43

And the fix is another framework, because of course it's another framework. Frameworks are to CSS what greige paint is to a house. Trying to implement the missing 5% of a CSS framework without knowing how to implement "complex" CSS from the ground up means you are never implementing the missing 5%. Your site or app or whatever is just going to look like every other site that uses that framework. Now that CSS is more…

The argument I make in the book is that the last 5% of CSS/design should be written by people who can write CSS. Nobody else should even be writing CSS because it turns into a huge mess when everyone jumps in. I mothballed this project because people were so incredibly cruel about it (a CSS project!). Remember that people who work on this stuff are people, and we're just trying to make things better. Also, you can pr…

lol.. I'm not sure what _you_ mean by .vertical-center but I wrote this last weekend for my latest project.

   .center { display: flex; justify-content: center; flex-direction: column; text-align:center}
   .vcenter { display: flex; justify-content: center; flex-direction: column; }
   .hcenter { text-align: center; }

Re: You suck at CSS and that's okay (2022)

#44

Tell that to a decent number of people I have worked with over the past 20 years. In fact, I know people to this day who have been writing CSS for decades who don't really know fundamental things like specificity, inheritance, or the cascade. Pattern matching into the sunset, not a single fundamental piece of CSS specifications ever internalized, still getting paid (its okay). https://www.w3.org/Style/CSS/specs.en.ht…

Can you explain what you mean by pattern matching? I’m not sure I understand.

Re: You suck at CSS and that's okay (2022)

#45

Tell that to a decent number of people I have worked with over the past 20 years. In fact, I know people to this day who have been writing CSS for decades who don't really know fundamental things like specificity, inheritance, or the cascade. Pattern matching into the sunset, not a single fundamental piece of CSS specifications ever internalized, still getting paid (its okay). https://www.w3.org/Style/CSS/specs.en.ht…

Can you explain what you mean by pattern matching? I’m not sure I understand.

Do you know what pattern matching is?

https://en.wikipedia.org/wiki/Pattern_matching

Also:

https://en.wikipedia.org/wiki/Pattern_recognition

And (early 2000s skeptics idea of the term, a useful abstraction):

https://www.youtube.com/watch?v=1AjLmU0Sfu4

Sometimes people call it:

https://en.wikipedia.org/wiki/Cargo_cult_programming

All just to say, w.r.t. CSS, if you are doing this, you don't really understand what you are doing, why browsers added a feature, what the language is, you are just replicating patterns because you saw other people do it.

You were assimilated into behaving a certain way, and you continue to look at the patterns your org or community follow and you just are a victim of the https://en.wikipedia.org/wiki/Bandwagon_effect or you never had time to learn and you are a https://en.wikipedia.org/wiki/Script_kiddie or https://en.wikipedia.org/wiki/Lamer (or what people used to refer to as hackers outside of IT).

You know you can do it, but you don't know how it works, why it matters, or why you should care.

Meanwhile, you can learn about these patterns, study them, comment on why people use them, critique their flaws, benefits, etc.

Those people used to be called a https://en.wikipedia.org/wiki/Software_architect or one who studied https://en.wikipedia.org/wiki/Sociology

Re: You suck at CSS and that's okay (2022)

#46

Hot take: you suck at CSS because you never bothered learning it. A long time ago, everyone in my team kept making excuses why they hate css. I went to Lynda.com and found a pretty good class. I can't remember the instructor, but it was so good that I still use the same patterns more than a decade later. I tried to get the whole team to take it, but no one wanted to. "It's a waste of time", "It's not even a programmi…

> you see divs with 20 or 30 classes in them

Isn’t that exactly how you’re supposed to use tailwind?

Re: You suck at CSS and that's okay (2022)

#47

Earlier quoted context omitted.

The argument I make in the book is that the last 5% of CSS/design should be written by people who can write CSS. Nobody else should even be writing CSS because it turns into a huge mess when everyone jumps in. I mothballed this project because people were so incredibly cruel about it (a CSS project!). Remember that people who work on this stuff are people, and we're just trying to make things better. Also, you can pr…

lol.. I'm not sure what _you_ mean by .vertical-center but I wrote this last weekend for my latest project. .center { display: flex; justify-content: center; flex-direction: column; text-align:center} .vcenter { display: flex; justify-content: center; flex-direction: column; } .hcenter { text-align: center; }

Basically the same idea, yep. CASS doesn't use abbreviations or numerals though.

Re: You suck at CSS and that's okay (2022)

#48

My view is that those who designed CSS suck when it comes to designing intuitive systems. I would not advocate constraint solvers, in the future I hope ViTs are so cheap to run that they can infer the right layout of things at any orientation and size in single digit milliseconds, solving the layout problem for good =)

I don't know if I've got it wrong in my head, but at some point it occurred to me that CSS is basically SQL for DOM.

The reason CSS is hard is the same reason that SQL is hard for some.

But I like SQL so I kinda like CSS.

Re: You suck at CSS and that's okay (2022)

#49
I enjoy working with CSS immensely. It takes some thought to get things right from the beginning, but I find it's always clear what can be done to improve it.

With modern features like CSS nesting, anyway; just a few years ago when IE support and whatnot was more relevant it was a different story. Now you can just throw everything into a flexbox.

Re: You suck at CSS and that's okay (2022)

#50
post #25

Tell that to a decent number of people I have worked with over the past 20 years. In fact, I know people to this day who have been writing CSS for decades who don't really know fundamental things like specificity, inheritance, or the cascade. Pattern matching into the sunset, not a single fundamental piece of CSS specifications ever internalized, still getting paid (its okay). https://www.w3.org/Style/CSS/specs.en.ht…

One reason I think Tailwind became so popular is that it makes it much easier to pattern match CSS. I don't think it's a good or bad thing, it's just a thing.

Yeah, I am not saying its bad in all applications, just that people who use CSS these days rarely really know CSS (who can know it all?), which isn't really any different from the past on a general level. Yet, I think we should push our peers to view the entirety of CSS as meaningful and worthy of attention.
Post reply on HN