More information about the Underscore mailing list

[_] Direct scripting with CSS alone

Chris Kaminski chris at setmajer.com
Wed Sep 5 13:18:25 BST 2007

On 5 Sep 2007, at 12:52, Richard Davey wrote:

> It demonstrates how advanced CSS is getting, including full send and
> retrieval of data (with *NO* JavaScript at all), Browser History
> recognition and link tracking.
>
> http://www.businessinfo.co.uk/labs/css_scripting_kit/ 
> css_scripting_kit.php
>
> This is for FF only at the moment.

Because the -moz-binding property is proprietary Mozilla stuff — has  
to do with XUL and what, I believe. Not likely to be implemented by  
anyone else, I don't expect.

> It doesn't look like much on the surface, but View Source and check
> out the Style block. This is just the tip of the iceberg.

Not so sure there's *that* much going on.

For example, the 'history recognition' can only pull a specific URI —  
you're not going to be able to tell if someone's been an *any* page  
on google.com (I just ran a Google search earlier this morning, and  
am on Yahoo! sites all day, but both are 'unvisited'). Rather, they  
indicate whether someone was on the specific page specified in the  
href attribute. One would have to put an awful lot of links into a  
page to cover even a significant subset of google.com or yahoo.com or  
whatever. And the attribute selectors are actually superfluous; you  
could just use custom classes on the links to achieve the same effect.

Really, there's not so much going on here besides some clever use of  
the :visited pseudo-class, a single Gecko-only property and a few  
HTTP requests. With the exception of the Gecko-only property, most of  
this has been possible from Netscape 4.x forward.

And the 'CSS Attacks' page <http://www.businessinfo.co.uk/labs/ 
css_attacks/css_scripting.php> is utter rubbish. It's just using  
the :visited pseudo-class to set margin (or maybe border, padding,  
top, right, etc.) properties. People have been doing that for *years*  
(even before Eric Meyer's 'Complex Spiral' demos in 2001).

Maybe I'm missing something, but I'm really not impressed. When he  
can get some sort of control statements working beyond limited if/ 
else branching I'll be more impressed. Until then…meh.


ck