Live data from Hacker News

Incomplete List of Mistakes in the Design of CSS

wiki.csswg.org

11–20 of 154 posts

Re: Incomplete List of Mistakes in the Design of CSS

#11
post #7
post #5

(1) it should have been designed around what people actually try to do: three column layouts with headers and footers, aligning content in the middle, pinstriping (this one isn’t as popular anymore), drop shadows, etc. Instead, all of these things required either hacky workarounds, or stepping outside of CSS entirely. The first decade of CSS was “look at all these things you can do that you don’t want to, and you can…

> three column layouts with headers and footers I was appalled when I saw what was needed to make this use case, used by 1/2 he web pages in existence.

originally CSS had no layout facilities. (as it should be, see other comment). Layout was hacked in to css by abusing the "float" property into doing things it was never meant to be doing.

Re: Incomplete List of Mistakes in the Design of CSS

#12

here's my pet peeves: 1. CSS should not have adopted a hyphenated naming scheme for properties, since it makes it difficult to access css properties from javascript or other languages. 2. CSS should never have been used for layout, and nobody should have suggested it should be. CSS defines properties on individual elements, while layout fundamentally needs to define relationships between elements, which requires real…

pointer-events: none; is actually pretty useful in many cases when you temporarily need to disable interactions, like drag/drop

Re: Incomplete List of Mistakes in the Design of CSS

#13

here's my pet peeves: 1. CSS should not have adopted a hyphenated naming scheme for properties, since it makes it difficult to access css properties from javascript or other languages. 2. CSS should never have been used for layout, and nobody should have suggested it should be. CSS defines properties on individual elements, while layout fundamentally needs to define relationships between elements, which requires real…

pointer-events: none; is actually pretty useful in many cases when you temporarily need to disable interactions, like drag/drop

It's useful as long as every browser supports it. When it doesn't, and you want to polyfill, the polyfill needs to download all linked CSS files a second time, implement a CSS parser to find the pointer-events properties, and after all that, patch in not entirely identical behaviour with javascript.

But then, this is behavior. what's it doing in a language that's supposed to be strictly about style/presentation? Why isn't it an html attribute instead?

Re: Incomplete List of Mistakes in the Design of CSS

#14
post #5

(1) it should have been designed around what people actually try to do: three column layouts with headers and footers, aligning content in the middle, pinstriping (this one isn’t as popular anymore), drop shadows, etc. Instead, all of these things required either hacky workarounds, or stepping outside of CSS entirely. The first decade of CSS was “look at all these things you can do that you don’t want to, and you can…

> pinstriping (this one isn’t as popular anymore)

That almost seems like an argument against designing CSS for what "people actually try to do" - what people try to do changes depending on the design language du jour. Better to have a generic specification for maximum flexibility, no?

Re: Incomplete List of Mistakes in the Design of CSS

#15
post #8
post #4

Earlier quoted context omitted.

Color is not a property of font so I'd stick with "text-color"

color is as much a property of font as size is

Traditionally, font is just the shape of the characters (size, weight, italics). Other things (alignment, underline, wrap, color).

This is because "fonts" were originally physical typesetting blocks.

Some designers go further and say font refers only to the files and file formats; other things are the "typeface".

Re: Incomplete List of Mistakes in the Design of CSS

#16
post #5

(1) it should have been designed around what people actually try to do: three column layouts with headers and footers, aligning content in the middle, pinstriping (this one isn’t as popular anymore), drop shadows, etc. Instead, all of these things required either hacky workarounds, or stepping outside of CSS entirely. The first decade of CSS was “look at all these things you can do that you don’t want to, and you can…

> pinstriping (this one isn’t as popular anymore) That almost seems like an argument against designing CSS for what "people actually try to do" - what people try to do changes depending on the design language du jour. Better to have a generic specification for maximum flexibility, no?

No, because CSS is still chock-full of things that nobody ever wanted to do. Things in it that people used to want to do, but don’t as often anymore, are still more useful than those.

Re: Incomplete List of Mistakes in the Design of CSS

#19
> Box-sizing should be border-box by default.

It was for many years for >98% of the users when IE had near-total market dominance. But W3C rejected sanity and refused to fix the spec, insisting that IE should break every website on the planet and implement the W3C box model.

This was a major PITA for anyone who cared enough to design a website that worked equally well in IE, Firefox, and Opera, which became an increasingly annoying problem as Chrome and Firefox gained in popularity. A great many developer hours (including mine) have been lost on the W3C's foolish stubbornness.

Re: Incomplete List of Mistakes in the Design of CSS

#20
I don't think things like syntax and schemes are the real bad parts. The real bad part is that CSS is in no way designed to be interacted with by anything but CSS.

Just yesterday I was making a music player position bar, and using CSS transitions to have it smoothely update itself. Set the duration of the transition and it goes on.

But what about when the transition takes effect? JS doesn't know when a style is actually updated and can then have a new property overwriting it to make the transition happen. If you do properties too quickly the transition won't happen. Such as if a user clicks on the bar to change the position, I have to hack in a 100ms setTimeout to set the new transition duration after stopping the transition with transition:none;

Why can't I control a transitions location? Chrome's animation viewer can go back and forth in time easily.

Why isn't interactivity seperate from CSS? CSS elements cannot effect those outside of its scope. You require JS for just dumb simple things that should be natively supportable. For instance you can make CSS do things based upon URL hash names like #somename, but you can't set them in CSS. You can't change attributes on elements, or classes or anything like that.

I think we've gotten to the point where JS is the 'programming language' of a webpage that has intentions far beyond rendering and interactivity. Perhaps we need a newer kind of CSS that's made for dynamic interactions. That way great UI's can be built in a safer css-like environment.

Post reply on HN