Live data from Hacker News

Mistakes in the Design of CSS (2013)

wiki.csswg.org

101–110 of 147 posts

Re: Mistakes in the Design of CSS (2013)

#101

Flexbox is obsolete and as with JavaScript you are supposed to wrestle with a subset of css aka the good parts. Sensible user interfaces are a solved problem and it is totally fine that the tutorial industry shows all the other possibilities you have when you don’t need to display content while the framework industry points to general one size fits all solutions from which you can pick the one that fits your specific…

Wait what??? Since when is flexbox obsolete I use it all the time, I think I used it today. What had replaced it? Don’t say grid, that’s better for 2d layouts.

Re: Mistakes in the Design of CSS (2013)

#102
post #73

Earlier quoted context omitted.

Note that the Tailwind team strongly anti-recommends @apply and regrets ever putting it in there. As for creating utility classes, well, those are still utility classes. If you do semantic classes then you are fighting against the philosophy of Tailwind as detailed in the Refactoring UI book.

> Note that the Tailwind team strongly anti-recommends @apply and regrets ever putting it in there Please link to something that supports this claim, because it's not the first time I've seen it made on HN, but only found it on HN

It's accurate. Here you go: https://twitter.com/adamwathan/status/1559250403547652097?la...

https://twitter.com/adamwathan/status/1226511611592085504?la...

https://twitter.com/adamwathan/status/1296770370209566720?la...

Re: Mistakes in the Design of CSS (2013)

#103
post #76

Make flexbox the default layout for everything, and add a flex-snap feature that will snap to the nearest multiple of some given size. I'm not sure we actually would still need grids. I also wonder if you couldn't have a more transparent and parameterizable auto width algorithm based on a lowest cost solver. So you could say "If this element wraps, it's cost 50", meaning you want all the boxes to stay on as few lines…

How would your flex box solution handle a simple two column layout where the first column is a variable size? There isn’t a fixed multiple to “snap” to.

You could snap to a percentage width.

Re: Mistakes in the Design of CSS (2013)

#104
post #73

Earlier quoted context omitted.

Note that the Tailwind team strongly anti-recommends @apply and regrets ever putting it in there. As for creating utility classes, well, those are still utility classes. If you do semantic classes then you are fighting against the philosophy of Tailwind as detailed in the Refactoring UI book.

> Note that the Tailwind team strongly anti-recommends @apply and regrets ever putting it in there Please link to something that supports this claim, because it's not the first time I've seen it made on HN, but only found it on HN

There is a Twitter post saying putting it in was a mistaken and that he wouldn't do it again. https://twitter.com/adamwathan/status/1559250403547652097

Re: Mistakes in the Design of CSS (2013)

#105
post #94
post #50

Earlier quoted context omitted.

Well the `!important` is a good example if general misunderstanding of the core basics of the CSS: the cascade. People usually think it means something like "override everything what was declared up until now in a way I don't need to check the selector specificity" , while in reality it means *"teleport this certain declaration to the higher mirror cascade origin realm"*, what is way cooler yet mostly unknown concept…

Whoa, that's weird. So once there is `!important`, the order of precedence flips? I'm sure there was a good reason for that...

I believe the reason is to allow users to override websites.

Re: Mistakes in the Design of CSS (2013)

#106
post #35

Backwards compatibility may be a fundamental design philosophy of the web, but wouldn't it still be possible to support a different document format with a new programming model that gives us a clean break from the past? It's a naive question, I realize, but it's tantalizing to imagine what we could have if we went that route. Then again, the cynic in me thinks we'd just endlessly fight over the design decisions anywa…

A clean break is hard to manage because of chicken and egg things. If you want to deploy it to your web pages, either you need to ship the required viewer too (and have the user buy in for that), it needs to translate into something today's browsers can use, or you need to do the work both ways. If your new system is translatable to the old system, it's often not clear what that brings you. And you often end up in th…

You could do it like picture tags do for images. Define a list of sources inside a new tag, and let the browser pick up the first one it understands with a default old style link tag placed last.

Re: Mistakes in the Design of CSS (2013)

#108
post #42
post #38

Earlier quoted context omitted.

And this illustrates why margin as defined in CSS doesn’t really make sense at all. Outer margin is not usually a property of the element itself, but its container.

To be fair, it makes sense when you look at the use-case that spawned margins in the first place: , , , , etc... It does make for a fairly elegant way of handling all of those permutations with a reasonable amount of attributes. That comes in to play particularly in cases where you don't have control over which will show up in the wild (e.g. when dealing with Markdown content)

There is no way to define proper rhythm hierarchy (multiple paragraphs with own titles with greater gravity) with only collapsing margins in CSS it's almost always hacks with fist/last children.

Re: Mistakes in the Design of CSS (2013)

#109

Flexbox is obsolete and as with JavaScript you are supposed to wrestle with a subset of css aka the good parts. Sensible user interfaces are a solved problem and it is totally fine that the tutorial industry shows all the other possibilities you have when you don’t need to display content while the framework industry points to general one size fits all solutions from which you can pick the one that fits your specific…

> Flexbox is obsolete

Not it's not.

Re: Mistakes in the Design of CSS (2013)

#110
post #69
post #67

Earlier quoted context omitted.

> The myth that you could change an entire site design just by changing the CSS is a complete myth. You should tell that to this site which has been doing exactly that for 20 years: https://csszengarden.com/

I am old enough to remember when the css zen garden first came out! I've seen hundreds and hundreds of clever tech demos. I even believed in some of them for a time. Now I realize they were carefully constructed gimmicks. css zen garden is made explicitly to do one thing and it manages to do that one thing. It's hard for me to even say that it does it very well, clicking through the featured designs. Unfortunately, t…

I'm also old enough to remember that.

But I think it was clear from the very beginning that it was meant to be aspirational. Nobody is really claiming that today with CSS you can arbitrarily change the design of a page just by modifying CSS. If you look at the evolution from earlier designs on the CSS zen garden to later ones, it's clear that advances in CSS itself has made some designs possible. The ::before and ::after pseudo elements I believe are one of these advances that are critical.

> Unfortunately, the dream of redesigning a website that wasn't purpose-made for this particular trick remains but a dream.

I'm not disagreeing that this is a dream. I'm stating that it is meant to be a dream gradually becoming real.

Post reply on HN