3 ms·
Building UI libraries on top of canvas feels like reinventing the weel, HTML/SVG/CSS already provide you advanced APIs for accessability, text layout, theming a
by jarek-foksa 14y ago
Building UI libraries on top of canvas feels like reinventing the weel, HTML/SVG/CSS already provide you advanced APIs for accessability, text layout, theming and drawing. All you really need is a tiny abstraction layer.
- politician 14y agoBut here's the thing: CSS is a stone soup of non-local, action-at-distance effects -- it's "goto" programming. HTML lacks decent layout primitives (border layout, grid layout) because it's a document-oriented abstraction. It's just really obnoxious to get a single screen application look working correctly on all browsers. So, I'd welcome a reimplementation of, say, WPF on canvas. Something that works without Microsoft's, Google's, and Mozilla's explicit blessing really is needed.
- woah 14y agoCSS is not that hard. Many developers simply put off doing it at any cost, then throw together a messy unorganized stylesheet and blame the language. I'll agree with you on the layout shortcomings, such as using excessive floats etc. But once flexbox is fully implemented as a standard, this will become much easier.
- praptak 14y ago> CSS is not that hard. It is not hard, it is just not fit for laying out UI because it is was not developed with this purpose in mind. CSS3/flexbox is an afterthought attempt to fix that.