News for hackers. Stuff that matters.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Saturday August 15, 2020 @04:12PM (#24171972)
Ask web developers if they would like to loose flexbox and grid again.

The thing about balancing tags is a red herring. The HTML parsing logic is not the complex and slow part in a web browser.

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.)

Re:Kosmonaut: web browser from scratch in Rust by Razengan on Saturday August 15, 2020 @04:31PM (#24172126)
Being able to develop web pages with something like SwiftUI would be heaven.
Re:Kosmonaut: web browser from scratch in Rust by andrewnc on Saturday August 15, 2020 @04:32PM (#24172132)
Does Flutter fill that niche?
Re:Kosmonaut: web browser from scratch in Rust by cjaybo on Saturday August 15, 2020 @05:21PM (#24172512)
Flutter for web still has quite a few issues that many consider to be deal breakers when considering it for real world use.
Re:Kosmonaut: web browser from scratch in Rust by fils on Saturday August 15, 2020 @05:44PM (#24172695)
what are they.... I would be interested in them as I have been wanting to get time to look at flutter for the web
Re:Kosmonaut: web browser from scratch in Rust by pjmlp on Sunday August 16, 2020 @02:22AM (#24175696)
Flutter for the Web is basically Flash without the tools that made Flash great.

WebAssembly + Skia engine via WebGL.

Using a programming language that only matters in the context of Flutter applications.