W3C home > Mailing lists > Public > www-style@w3.org > April 2000

Re: eval()

From: Daniel Glazman <glazou_2000@yahoo.fr>
Date: Wed, 19 Apr 2000 14:19:25 +0200
Message-ID: <38FDA44D.2070205@yahoo.fr>
To: webmaster@richinstyle.com
CC: www-style@w3.org
Matthew Brealey wrote:

> There has been some talk of using the value of attributes as the value
> of another attributes and similar such things, and I think the best way
> to do this would be by means of an eval() function, since, for example,
> attr(size)+1px clearly isn't right, and (attr(size)+1)px isn't really

Size ? Value ?

> satisfactory. Therefore I propose that eval() be used wherever an author
> wishes to mainpulate a value or get the value of a property to use as
> the value of another property. For example, HR {height:
> eval(attr(size)-1)px}. This is preferable to what is proposed, namely

I still don't know what this size is or what "a value" is for
you. But let's imagine that this size contains a length.
What is exactly the value of attr(size) and which unit is it
using ? 12cm for instance ? What is "12cm-1" ? And "12cm-1" px ?

> only allowing this on an arbitrary subset of properties (viz. access-key
> and tab-index), and has greater flexibility.
> On a separate but related subject, I think there should be a change to
> the attr() function. At present, given, for example, <p>Hello, then P
> {content: attr(title)} would result in P being rendered as empty, but I

Invalid rule... For the moment, content property does not apply to a P,
does it ?

> suggest that when attr() returns a null value, the declaration is
> invalid and should be ignored. The reason for this is to allow things
> like:
> A[href]:tooltip:hover {visibility: visible;
> content: attr(href);
> content: attr(title)}
> , which provides a tooltip with the value of 'title' as its content, but
> if that returns null, then the href would be the value.

Ah! Interesting, very interesting. **BUT** making the rule invalid
does not help at all because error handling in CSS is done at parsing,
not at evaluation time !

Can I ask you a question which is not connected at all with your message ?
Where do you find the time to produce so long messages ??? I hardly
find the time to read them !-)


Do You Yahoo!?
Achetez, vendez!  votre prix! Sur http://encheres.yahoo.fr
Received on Wednesday, 19 April 2000 08:17:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:54 UTC