W3C home > Mailing lists > Public > www-style@w3.org > November 2003

RE: Cookies and Styles

From: <Matthew.van.Eerde@hbinc.com>
Date: Wed, 19 Nov 2003 16:43:51 -0800
Message-ID: <B8B9965E9A4B1948839F37ADCB58E9D52D11E9@exchange.hbinc.com>
To: dris86@cox.net
Cc: www-style@w3.org

We currently do this without any CSS wizardry required - just run your CSS
as a CGI script and do something like (pseudocode follows:)

example.css.php
<?	$Response->SetHeader("Content-Type", "text-css");
	if ($Request->Cookies{"bigText})
	{
?>
p { font-size: 15px; }
<?	}
?>

Of course, it would be nice if it could all be done client-side.  I often
wish there were such a thing as a client-side-only cookie.

> -----Original Message-----
> From: Dris [mailto:dris86@cox.net]
> Sent: Wednesday, November 19, 2003 3:41 PM
> To: www-style@w3.org
> Subject: Cookies and Styles
> 
> 
> 
> This may be falling to far into the realm of scripting, but 
> what if we 
> could specify different styles according to a cookie set on 
> the client 
> side?  Something like...
> 
> p::ifCookie('bigText') {
> 	font-size: 15px;
> }
> 
> Currently, scripting would still need to be applied for setting the 
> cookies...  Since the cookies can't be controlled through CSS alone, 
> I'm not sure that this would be appropriate.  But it would definitely 
> open up some possibilities.  Thoughts?
> ________
> "Irony is a voluntary survey with required fields."
> 	~ Dris ~
> 
Received on Wednesday, 19 November 2003 19:43:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:25 GMT