←back to thread

451 points todsacerdoti | 2 comments | | HN request time: 0s | source
Show context
paulddraper ◴[] No.45057614[source]
> Yes, the syntax isn’t the prettiest, but is it really that hard?

Explain float: clear?

Does that have anything to do with display: flow-root?

And white-space is not actually whitespace?

And when does vertical-align work vs not?

---

^ That is all CSS (and not particularly edgy CSS, except for flow-root).

So....yes, CSS is really that hard. Unless you use the subset of CSS that you have decided to learn + use. Not unlike C++.

replies(5): >>45057689 #>>45057906 #>>45058326 #>>45058741 #>>45058981 #
1. socalgal2 ◴[] No.45058741[source]
is float:clear still a thing? I remember being a thing 15-20 years ago? I can't remember needing it in the last 10+

white-space seems pretty straight forward: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

vertical-align, yea, alignment in general is hard and IMO it's hard because it's a hard topic in general, CSS or native. but yea, it's not "vertical-align"

replies(1): >>45066373 #
2. paulddraper ◴[] No.45066373[source]
> pretty straight forward

Anything but. It combines whitespace collapsing and text wrapping in one property and makes a mess of both.

See https://drafts.csswg.org/css-text-3/#white-space-property to get an idea of how complicated it is.

The MDN article is self-contradictory, e.g. note how the example don't match the "syntax" section.

Plus, it has inconsistent quirks with HTML textarea.