5 ms·
Wow, Servo is way longer along than I thought! From that post: > No doubt about it, CSS 2.1 is tricky—floats perhaps more than anything else. I really hope t
by haberman 13y ago
Wow, Servo is way longer along than I thought!
From that post:
> No doubt about it, CSS 2.1 is tricky—floats perhaps more than anything else.
I really hope that Servo helps to identify parts of the HTML/CSS specs (if any) that unnecessarily prevent parallelism. By that I mean features (like "float" perhaps) that make it harder to parallelize, and where an alternative design could support the same use cases in a better way.
Those are the gems that teach us deep lessons about the problem space, and how future similar technologies out to be designed.
- mbrubeck 13y ago> I really hope that Servo helps to identify parts of the HTML/CSS specs (if any) that unnecessarily prevent parallelism. This is beginning to happen; for example Servo work on running <iframe sandboxed> documents in parallel [1] led to the discovery that the HTML spec allowed different-origin iframes to mutate into same-origin, through the "document.domain" setter [2], which made process isolation infeasible (since it would require some way to merge separate processes with separate heaps back into a single process). That discussion led to a change in the spec [3]. [1] https://groups.google.com/forum/#!msg/mozilla.dev.servo/LQ46AtKp_t0/plqFfjLSER8J https://groups.google.com/forum/#!msg/mozilla.dev.servo/LQ46... [2] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-August/040433.html http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-Aug... [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=23040 https://www.w3.org/Bugs/Public/show_bug.cgi?id=23040
- dingdingdang 13y agoCSS without float.. would not work very well! Unless we all go back to table based design (or ahead to flexbox I guess, I don't know enough, practically speaking, about that standard yet to reason proper about it though!)
- ehsanu1 13y agoIf you clear your floats, you'll be fine in terms of giving the engine room to parallelize, according to pcwalton's blog post.
- oneeyedpigeon 13y agoDoes that 'allow' the classic use case of floats - potentially, what should be the only use of floats - wrapping text around an image? I feel like the answer would be "no", yet there's no good alternative for achieving this common requirement, which would cause a snag.
- ehsanu1 13y agoI believe you're right. But I don't think this is a huge problem: you simply don't get the benefits of layout out that specific text in parallel, it'll render sequentially as browsers tend to do today anyways. You can still get parallelization in other flows outside of the container of the floating elements.
- azakai 13y agoI believe it does, yes. The point is that when you clear them later, the browser has a static guarantee that that float will not matter anymore. So the complexity due to the float is only relevant until the clear, and it can parallelize before and after the clear.
- pcwalton 13y agoIf you know you need to use floats to flow text around elements, feel free to use them! They're in CSS for a reason :) But if there are alternatives (such as absolute positioning) that work equally well in your particular design, then choosing an alternative may help you gain better performance.
- scotth 13y agoFlexboxes don't really help. The reason that floats exist is so that elements can flow around them.
- sjy 13y agoThat's what they were designed for, but they are frequently used to do things that would better be done with flexboxes (if the support was there).
- _greim_ 13y agoWired.com made (web) history by being one of the first major sites to deploy a pure-CSS design, which was based on floats because that's all that worked back in the days of Netscape 4 and IE 4. The web design community now primarily uses floats for multi-column design because of its historical browser support. However if you don't need to support IE7 and lower, floats are one tool among many for multi-col layout, and not necessarily the best. Flexbox will only add another tool to that toolbox.
- goalieca 13y agoI imagine that is quite a huge feat! Here's a questions for the HN gurus though: how much of a browsers code deals with errors, compatibility, and legacy?? I imagine A LOT.
- mbrubeck 13y agoFortunately, even the backward-compatibility quirks modes have a spec now: http://quirks.spec.whatwg.org/ http://quirks.spec.whatwg.org/ Just having more and more of this stuff documented (instead of having to reverse-engineer it from existing browsers) makes things a lot easier than they once were.
- gsnedders 13y agoArguably a large part of the interest in Servo is whether the specs are good enough that developing a new browser from scratch is now feasible — certainly, yes, there is a lot of institutional knowledge around Mozilla, but a from-scratch implementation isn't going to exactly match Gecko everywhere.
- pcwalton 13y agoAgreed 100%. We want to be part of the conversation as to how to make future CSS parallelizable and amenable to modern hardware, both to educate Web authors as to how to make fast content and to shape the work done in the relevant committees.