Earlier quoted context omitted.
> so there often aren't semantic HTML tags that would make sense. Pet peeve of mine: there should really be ` ` and ` ` elements, as well as ` ` (flex item) and ` ` (grid item) for the child element instead of relying on a div soup with CSS attributes everywhere.
HTML describes the content, not visual display.
CSS: Unavoidable Bad Parts
61–70 of 88 posts
Re: CSS: Unavoidable Bad Parts
#62Re: CSS: Unavoidable Bad Parts
#63So many complaints about web technology, where is the replacement? I'd be interested to know if there was the one true layout system that everyone agrees on
Re: CSS: Unavoidable Bad Parts
#64Earlier quoted context omitted.
Multiple sequential paragraphs all sitting next to two images? Or multiple rows, each containing a single paragraph + two images? The latter probably would need an element for each row to be maintainable/scalable, but depending on the content, ` ` could be a semantically-meaningful container. Or (again, depending on the content) it could make semantic sense to put the ` ` elements inside the ` ` elements.
This is still adding wrapper elements to get the layout you want. Even if you can force yourself to come up with some vague semantics behind the wrapper elements (that you wouldn't have otherwise added), I don't see how it's much better than using a generic tag and it shows you need to modify HTML to modify the presentation in practice. Visual design involves a lot of grouping and aligning elements, and there isn't a…
Sparingly-used non-semantic grouping elements only inserted when absolutely necessary is a pretty different story from the "layers and layers of wrapper elements" that the article mentions, though.
---
> you need to modify HTML to modify the presentation in practice
If you're e.g. grouping together content that was previously unstructured, arguably that's a semantic change as well as a presentational one.
Re: CSS: Unavoidable Bad Parts
#65Earlier quoted context omitted.
You know, this speaks volumes. Layout is a complicated business, sure, but CSS just keeps having monumental shifts in how you're supposed to approach it year after year; it's as if it's done without any overarching theory/vision but merely groping in the dark, trying things and fixes, and seeing what sticks and doesn't suck too horribly (this latter part is optional; remember Yandex's BEM?)
at least it changes less than js frameworks
Re: CSS: Unavoidable Bad Parts
#66> There isn’t a fully general solution to positioning and sizing GUI boxes. flexbox. You can literally recreate any fully responsive desktop style GUI with it. You just need to layout your elements the same way you would in a GUI designer like QtCreator or Glade. Which means thinking in terms of divs with flex-grow set on them to get the automatic container expansion you get with "vertical boxes" or "horizontal boxes…
Re: CSS: Unavoidable Bad Parts
#67Earlier quoted context omitted.
> so there often aren't semantic HTML tags that would make sense. Pet peeve of mine: there should really be ` ` and ` ` elements, as well as ` ` (flex item) and ` ` (grid item) for the child element instead of relying on a div soup with CSS attributes everywhere.
HTML describes the content, not visual display.
Re: CSS: Unavoidable Bad Parts
#68Re: CSS: Unavoidable Bad Parts
#69Earlier quoted context omitted.
> so there often aren't semantic HTML tags that would make sense. Pet peeve of mine: there should really be ` ` and ` ` elements, as well as ` ` (flex item) and ` ` (grid item) for the child element instead of relying on a div soup with CSS attributes everywhere.
There's nothing stopping you from defining those yourself for your own websites: grid { display: grid } will work in every modern browser.
Re: CSS: Unavoidable Bad Parts
#70Earlier quoted context omitted.
There's nothing stopping you from defining those yourself for your own websites: grid { display: grid } will work in every modern browser.
For that to work I would need to define a custom component from JavaScript, wouldn't I? (and I thought custom components had to contain an hyphen in there name, is that wrong?)
data:text/html,A
B
C
grid{display: grid}
afaik to create a CustomElement you need to use dashes, yes, but in this example `` is an HTMLUnknownElement, which renders just fine. some discussion here: https://stackoverflow.com/a/22545622/2393963