Earlier quoted context omitted.
CSS Grid. It’s a mostly simple spec that allows for what you’re asking for and a whole bunch more (including different grids for different screen sizes, which tables definitely don’t do). Probably start with https://css-tricks.com/snippets/css/complete-guide-grid/
Are you sure? Have you tried? When I try, I don't get the nice behavior of tables, but a stiff layout that does not adapt to its content. Instead the content overflows the rows: https://jsfiddle.net/3hfosn5k/ The nice thing about tables is that I know the table cells will always surround their content. Nothing will flow out of the cells.
State of CSS
51–60 of 234 posts
Re: State of CSS
#52Earlier quoted context omitted.
Eg grid + vh unit. Look them up and you should find plenty content!
When I try that, the rows do not expand if the content is larger than 33% of the screen height: https://jsfiddle.net/3hfosn5k/ Scroll down and you will see that the blue color of the bottom row ends and the text overflows it. But I want what table cells do: Expand if their content is too large to fi.
Re: State of CSS
#53I think I don't need the 2022 version, but the 2021 version. Or even the 2012 version, lol! I still prefer to use tables to layout my websites. Question: Say I want a layout that has a top row, a middle row and a bottom row. Each row gets 33% of the screen space. Unless the content does not fit. Then the row should expand to the content. Here is the table version: https://jsfiddle.net/vg2ey8r9/ How do you do that wit…
Re: State of CSS
#54I could imagine (and I think I am possibly observing) CSS going a similar direction to JavaScript; we might soon see the CoffeeScript of CSS, and then eventually something more sophisticated and well-designed like the Elm of CSS.
CSS — like JavaScript — might become the styling bytecode of the web.
Re: State of CSS
#55Earlier quoted context omitted.
Good joke, an exec testing in different browsers to ensure the color tint is the right color.
I feel like the more typical reality is an exec looking at the site on some random browser or device, that then has to be in the support matrix, e.g. an enterprise business web app that supports the most recent 2 versions of modern desktop browsers...and the Silk browser for Kindle Fire because that's what's on the CEO's coffee table.
Re: State of CSS
#56Earlier quoted context omitted.
Eg grid + vh unit. Look them up and you should find plenty content!
When I try that, the rows do not expand if the content is larger than 33% of the screen height: https://jsfiddle.net/3hfosn5k/ Scroll down and you will see that the blue color of the bottom row ends and the text overflows it. But I want what table cells do: Expand if their content is too large to fi.
Just like Tables have and then - your div's need a similar parent-child relationship to work.
Here's a working fiddle: https://jsfiddle.net/0389jsca/
Re: State of CSS
#57Re: State of CSS
#58I think I don't need the 2022 version, but the 2021 version. Or even the 2012 version, lol! I still prefer to use tables to layout my websites. Question: Say I want a layout that has a top row, a middle row and a bottom row. Each row gets 33% of the screen space. Unless the content does not fit. Then the row should expand to the content. Here is the table version: https://jsfiddle.net/vg2ey8r9/ How do you do that wit…
And that request will come.
Re: State of CSS
#59Does anyone else feel like CSS has jumped the shark a bit? https://web.dev/state-of-css-2022/#accent-color Sure it's a "nice to have" but it bloats the spec? Look at the current actual implementation: https://web.dev/accent-color/#guaranteeing-contrast chrome and firefox already tint differently... How is this better than a good ol CSS variable and leaving it up to the designer to manage? Sure http://dowebsitesneedto…