News for hackers. Stuff that matters.
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @04:14PM (#24171989)
I'm thinking the opposite: lose floats. I definitely want to keep flex and grid.

A team at FB implemented flex to power React Native. I'm thinking that effort was made much easier given that they didn't have to account for floats, etc.

Re:Kosmonaut: web browser from scratch in Rust by ptx on Saturday August 15, 2020 @04:46PM (#24172241)
If you're writing a document (not an app) and using floats for their intended purpose, they are useful - and can't easily be replicated with grids or flexbox, I think.
Re:Kosmonaut: web browser from scratch in Rust by dathinab on Saturday August 15, 2020 @07:41PM (#24173430)
Which is the root of the problem, the web was designed for linear top-to-bottom mostly static documents.

But most websites have diverged from this since a long time ago, even such which represent mostly immutable content.

Re:Kosmonaut: web browser from scratch in Rust by quickthrower2 on Wednesday August 26, 2020 @10:36PM (#24289637)
It’s ok we can make a float polyfill
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @07:40PM (#24173429)
Yeah that's a good point. I've always thought pages should, then, specify if they're a document or an app. If you're a doc, you use all the various semantic tags. If you're an app, just use div/span. Maybe the spec could have something like that, app mode and doc mode.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @06:51AM (#24176766)
What would be the benefit?
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @06:48AM (#24176754)
Losing float but retaining flex and grid would not significantly simplify CSS though. Flex and grid are much more complex that float logic.

And floats are useful for primary-textual content. Wikipedia uses it a lot for example. Probably less useful for application-like interfaces.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @04:41PM (#24172194)
I would be OK to get rid of all CSS and other styling, and make it up to the user preferences instead how big a <h1> text is, how big a <h2> text is, how big the normal text is, what colours to use, what fonts are in use, etc. Make a more user-oriented specification, designed primarily for the user to control, assuming the user is an expert at it, rather than the author of the document.
Re:Kosmonaut: web browser from scratch in Rust by warkdarrior on Saturday August 15, 2020 @05:31PM (#24172586)
> assuming the user is an expert at it, rather than the author of the document

But the user is NOT an expert at styling a website, this is why we have designers to figure out which combination of layout, fonts, and colors work well together.

Re:Kosmonaut: web browser from scratch in Rust by calvinmorrison on Saturday August 15, 2020 @07:20PM (#24173307)
Users generally don't give a shit about styling as much as UX designers justifying thier salaries. There are probably more people who suffer daily from accessibility on the web than UX designers in total
Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @05:33PM (#24172605)
Well, they will make styles that are slow and/or that many users do not like. Instead, let it be subject to the user configuration; the web browser designer can put in suitable default settings.
Re:Kosmonaut: web browser from scratch in Rust by yoz-y on Saturday August 15, 2020 @06:11PM (#24172876)
Expert users can already do this using extensions though.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @04:39AM (#24176233)
CSS was supposed to work like that - a user style sheet can override the site stylesheet (which in turn override the built-in browser stylesheet).

Of course this assumes users are competent designers. I think reader mode and similar is a much better solution to the problem.

Re:Kosmonaut: web browser from scratch in Rust by userbinator on Saturday August 15, 2020 @06:03PM (#24172813)
Some browsers have (had) user stylesheets, which can do exactly that.

Firefox (barely) still has that option but it's disabled by default, Chrome had removed it many version ago, and Edge never had it from the beginning. IE11 still has the option.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @07:59PM (#24173532)
I think it may be helpful to have some privileged commands which are only allowed in user stylesheets.

(Additional unprivileged commands may also be useful, such as ability to specify colours by index number, and ability to specify the names of user configuration values where other values are expected.)