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.