RE: CSS3 : font-style

On Wed, 26 May 1999 11:40:29 -0400 (EDT), Nicolas Lesbats
(nlesbats@etu.utc.fr) wrote:
> But you can perfectly imagine a universal value like "toggle(first-value,
> second-value)"...

Yes.  I think I might prefer that to toggle-italic or toggle-oblique.

However, I think it might even be better to have a slightly more
powerful feature: cycle(), which could take any number of arguments.

So if the declared value for the property on a given element is
cycle(x1, x2, ... xn), then:

* if the value of the property on the parent is *none* of x1...xn, the
  value on the element is x1
* if the value of the property on the parent is xk, then the value on
  the element is x(k+1), unless k=n, in which case the element gets
  value x1

This could be used in other ways:

font-style: cycle(italic, normal); /* is italic if parent is oblique */
list-style-type: cycle(disk, square, circle); /* something like typical UL*/
font-weight: cycle(700,900);

Hopefully this hasn't been brought up already, since I'm only half
done digging through my email from yesterday.

David

L. David Baron      Freshman, Harvard      dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.  < http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                   < http://www.webstandards.org/css/ >

Received on Saturday, 29 May 1999 09:51:32 UTC