> This subset will only include properties that can be read or set without forcing the rendering engine to recalculate layout or style (for example, transform, opacity, scroll offset).<p>I'm frankly skeptical of most of Houdini, but I'm especially not happy with this one. This is baking the limitations of current browser engines into the platform for all time. The provided justification seems pretty flimsy to me, because effort that goes into this (which is something that native has no concept of, for good reason) could instead go into fixing the problems that make it seem like this is necessary.
Very interesting, and oddly reminiscent of the shift from fixed-function to programmable graphics APIs, right down to the restricted "worklets" being sort-of-analogous to shader programs.<p>I do wonder whether "as performant as native CSS features" is setting up unrealistic expectations. Same ballpark, maybe, but I'd have thought native will always be easier for browser vendors to optimize, even leaving aside the language/runtime differences (C++/Rust versus JS/WASM).
What we need is a "strict mode" HTML. Number of APIs available to web platform is getting out of hand. Using ES6 module system we can clean up the web API landscape.<p>Here is the idea: you declare your document to be in strict mode:<p><pre><code> <!DOCTYPE strict>
</code></pre>
In this mode you don't have access to any API unless you import it. You need to import CSS layout systems like regular box model or basic APIs like query selector. You also need to import each html element you use. This way browsers don't have to take into account every possible CSS property or html element when doing layout or painting.<p>After we got that, then you can import your own implementation of standard modules that is written using APIs introduced by Houdini<p>Here is an example:<p><pre><code> import "html/div"
import "css/flex"
import "dom/query"</code></pre>
Maybe we should just transpile Flash into ASM.js and be done with it.<p>And yes, I am being sarcastic here. I understand the motivation underpinning such projects, but the approach of introducing yet another complicated API with dubious cross-browser support is not something that will move the web forward in a meaningful way.
Behold the inexorable advance of the Atwood Law.<p>Next step would be having an ability to entirely reprogram the layout engine in newly-performant JS. And then more and more, until we have built an entire OS (again).
Quick question, what's to stop someone from reimplementing, say "float: right" to also spin up a banner ad? That is, this sounds great in principal but much like Microsoft's Tay taught us, the internet is full of *-holes.
Currently, custom web components don't have a way to add styling hooks specific to the component, so solutions include hacks to pipe styles into the guts of the web component, or use pre-defined attributes to style the component, just like the late 90s. Perhaps Houdini would provide a way to give custom web components first class css styling.
Seems like a band-aid for CSS, which needs to go away. Styling the DOM in the fashion we have been for the last 15+ years needs to end. JavaScript has evolved, but we still need to use LESS and SASS and Modernizr and other tools.<p>CSS doesn't need abstractions. It needs to be replaced.