Hacker News new | past | comments | ask | show | jobs | submit login

They do have much worse performance when compared to an optimized rasterizer like WebRender (disclaimer: I work on WebRender). That's because they use legacy immediate mode APIs like GDI for painting, which are a poor match for modern GPUs. By contrast, CSS is fully declarative, which allows for much better batching, global culling, etc. Native toolkits cannot fix this without breaking backwards compatibility: their programmatic CPU drawing is fundamental to how they work. The best they can be is GPU-assisted rather than GPU-accelerated.

HTML was designed well for documents overall. It's remarkable how it's "obvious" that HTML is terrible, but every single proposed document-based replacement for it has been significantly worse. Take LaTeX, for example (sometimes brought up as a system "designed right"): you basically can't do floats at all in the system. All packages that simulate them are hacks. If the Web used a system designed like that, the volume of complaints would be deafening at this point.

I'm the first to admit that CSS has a lot of problems. But they're not the problems people always cite. The core model of downward width dependencies and upward height dependencies, with floats as a first-class citizen positioned during line breaking, is sound. Where CSS went wrong is in all the complexity like margin-collapse, border-collapse, mismatched border styles, CSS 2.1 Appendix E painting order, etc. These are the biggest flaws in the design, but nobody cites them as problems: in fact, frequently authors want more and more features that don't make sense and would make CSS worse.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: