back

by jay_kyburz·17y ago·view on hn ↗
Is there anything that dumps css all together and just manipulates the dom directly using Javascript.

In other words, build your site by instantiating components as you would if you were building a windows or flash application. I think that would be my preferred way of working.

For example: if I wanted a heading I could write a new class derived from a standard library, set a few properties to define its colour and font, perhaps some properties that define how it moves in relation to other entities.

You could even build a proper style hierarchy.

I've always felt the html / css / javascript stack was kind of clumsy and would love to just work in one environment.

I've never likes css and the very fact that things like Sass and Compass exist suggest to me its not really a very good way of defining an applications style.

2 comments
Actually as much as I hate CSS, from trying to implement the same subsystem of an application using flash and then reimplementing it in javascript + CSS I came to appreciate the flexibility of CSS when you want to adapt your widget to both mobile phones and computers....

You might want to look at http://cappuccino.org/ for a javascript library doing what you describe (disclaimer: also I've planned for some time to take a look at it, I haven't got around to it yet)

A few minutes of research turned up this. Not very nice. http://www.howtocreate.co.uk/tutorials/javascript/domstylesh...