[CSS3] Generated content: environment variables

Dear all,
one of the most interesting features of generated content lies in
its capability to display informations that cannot be deducted from
the document structure (ie. which lie outside the document itself).

I propose a new function for generated content:
the var() function, that can be used to display informations
about the environment in which the document is displayed.

These environment variables could be:

1. path
   display the current path of the document (an URI)
2. date
   display the current date used on the client.
3. time
   display the current time on the client.

These are the first things that came to my attention. Obviously
there could be other features. An example:

p::before {
content: "You are here: " var(path);

The content inserted is always a string, according to what has been
said about generated content in CSS2 +.

If I've been too generic, please forgive me.
Thanks for your attention,

Gabriele Romanato


Received on Friday, 2 November 2007 09:42:38 UTC