Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don’t think cascading is necessarily a problem; rather, HTML/CSS lacks good encapsulation features. Actually, this has been well-recognized by browser vendors, who want to use HTML and CSS to implement things like HTML5 video player UIs, but don’t want the styles of the page itself to interfere with the video player. They’ve implemented a rather intricate system called the "shadow DOM" to manage this. (This page explains it decently well: http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/)

We'd like CSS to grow up, and decide it wants to be a proper programming languages, with all the abstraction and encapsulation facilities we'd come to expect. Until then, I guess there is this language called JavaScript...



> We'd like CSS to grow up, and decide it wants to be a proper programming languages, with all the abstraction and encapsulation facilities we'd come to expect.

I'm not sure that's really needed. Having semi-independent DOM trees with CSS not leaking across from one tree to its sub-trees would be sufficient (that's roughly what "Web Components" aim to achieve, from what I understand)




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

Search: