News for hackers. Stuff that matters.
Re:Kosmonaut: web browser from scratch in Rust by Aeolun on Saturday August 15, 2020 @06:16PM (#24172899)
There is no chance in hell that you’d get the general web to move back to floating divs to manage layout.
Re:Kosmonaut: web browser from scratch in Rust by core-questions on Saturday August 15, 2020 @07:28PM (#24173359)
No problem, you don't need that. Just use tables.
Re:Kosmonaut: web browser from scratch in Rust by dathinab on Saturday August 15, 2020 @07:37PM (#24173410)
No just css grid, that's all we ever wanted ;=)

(But honestly tables suck bad time, I did wrote some table base hobby website back in 2009? or so and it wasn't nice (the experience, not the website which was quite fine). Sure basing a GUI on a grid is the best thing to do in many cases but tables are no grids. Grids are more flexible.)

Re:Kosmonaut: web browser from scratch in Rust by koolba on Saturday August 15, 2020 @07:58PM (#24173528)
The biggest problem with tables was that they worked.
Re:Kosmonaut: web browser from scratch in Rust by bluejekyll on Saturday August 15, 2020 @09:12PM (#24173935)
Except if you need to support different device sizes and dynamic layout.
Re:Kosmonaut: web browser from scratch in Rust by laumars on Saturday August 15, 2020 @09:34PM (#24174061)
I’m not defending table based layout but in fairness different device sizes was less of an issue back then because almost all browsing was done on a PC or Mac and thus dynamic layout wasn't even something you needed to considerate.
Re:Kosmonaut: web browser from scratch in Rust by chriswarbo on Sunday August 16, 2020 @09:16AM (#24177500)
> different device sizes was less of an issue back then because almost all browsing was done on a PC or Mac and thus dynamic layout wasn't even something you needed to considerate.

It saddens me when Web sites assume they are in a full-screen window :(

Re:Kosmonaut: web browser from scratch in Rust by bluejekyll on Saturday August 15, 2020 @10:07PM (#24174244)
Well, my point was more that it’s not a great option today.

You’re right, back in the day when everyone’s screen sizes were somewhat consistent, it worked, though still had many quirks.

Re:Kosmonaut: web browser from scratch in Rust by inopinatus on Saturday August 15, 2020 @07:56PM (#24173517)
Not sure if you’re joking, because CSS Grid does provide 99% of my layout needs.

(or it would if 5% of my users weren’t still using IE11, but that’s another story.)

Re:Kosmonaut: web browser from scratch in Rust by _underfl0w_ on Saturday August 15, 2020 @08:13PM (#24173613)
Impressive that you remembered having two sets of nested parentheses going by the end of your comment and closed them correctly. Perhaps that's part of the problem...
Re:Kosmonaut: web browser from scratch in Rust by Aeolun on Sunday August 16, 2020 @04:06AM (#24176109)
I’m sure if we still had to use tables someone would have built a React wrapper by now.
Re:Kosmonaut: web browser from scratch in Rust by Grumbledour on Monday August 17, 2020 @12:29PM (#24188766)
I never really understood what people have against float. I think it works fine for most use cases and is not to difficult.

Now table layouts where quite a pain because they got very complex very fast. Flexbox and Grid are fine I guess, but I always found them a bit harder to understand than float and did not so much they offered that I needed.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @09:00PM (#24173860)
Tables should be used for data, not for layout.
Re:Kosmonaut: web browser from scratch in Rust by wildrhythms on Saturday August 15, 2020 @10:16PM (#24174289)
This is true, <table> elements are for tabular data. But look at almost any web layout, and you will notice things are in a table layout most of the time. Even flexbox conceptualizes the flow of children as flex-direction: row/column. I think tabular concepts like rows and columns just make sense to humans making websites, and our 2D x/y axis conditioning.

The real issue with using <table> is semanticism, breaking DOM flow (sometimes creates issues for screen readers), and separation of concerns wrt data and style like you mentioned. Also, <table>s are hard to style over, like wtf is display: table-cell? Nobody seems to know.

But the number of times I see a colleague or fellow frontend cretin re-creating a tabular interface with a bunch of <div class="row"> etc... or wondering how to dynamically size the nested columns to fit the largest cell, I remind them: just use a table. Please.

You might notice that Hacker News layout uses <table>.

Re:Kosmonaut: web browser from scratch in Rust by core-questions on Tuesday August 18, 2020 @03:36PM (#24203304)
All I can say is whatever, man. The semantic web and all the RDF tuple goodness we were supposed to get is mostly a dead dream. Make whatever works for your users. Accept that things aren't going to be pure and perfect. If tables gets me to where I need to be, then that's what I'll use. Worked 20 years ago, works now, will work 20 years from now too.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @07:18AM (#24176880)
I can't imagine any actual web designer wanting to trade flexbox/grid for tables.
Re:Kosmonaut: web browser from scratch in Rust by core-questions on Tuesday August 18, 2020 @03:37PM (#24203314)
What if I told you that there are people who make "web applications" that aren't beautiful or "designer" quality?
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Wednesday August 19, 2020 @04:24AM (#24208313)
Good for them - but a browser which only cater to them is not going to be successful.