RE: Programmable state-machines in CSS proposal

> Second approach that I've implemented in Sciter [2] uses script and one 
> additional CSS property named "prototype": 
> 
> 
> label[for] { 
> prototype: Label url(label.tis); /* subclass all matching elements by the Label behavior defined in label.tis file */ 
> } 

It looks like DHTML behaviors all over again. Be delighted, the feature got added to the Web Components spec under the 'decorator' name. If you omit the <template> tag of a decorator, you may well just use the <script>ing and it will work exactly like you would expect.

Generating those scripts automatically from CSS directly is just a custom property away and we have a specification for custom properties already.

In summary, all of this is already in the pipeline, it just need some more community support to make sure browsers implement them very soon. Web Components and Custom Properties are among the big new features we all would like to use already. Let's make it happen. 		 	   		  

Received on Wednesday, 30 January 2013 22:29:29 UTC