Re: CSS3 : font-style

On Tue, 25 May 1999 08:10:23 -0400 (EDT), Nicolas Lesbats
(nlesbats@etu.utc.fr) wrote:
> Some months ago, I proposed a new value for the 'font-style' property,
> named 'toggle' by Daniel Glazman, to get this following behavior :
> 
> When the inherit value correspond to 'normal', then apply the value
> 'italic'.
> 
> When the inherit value correspond to 'italic', apply the value 'normal'.
> 
> The goal is to assure a rendering of the property.

One could even have a more general syntax for this called, say, a
property selector.  It would be able to do alternation and other
things.  You could *not* use such a selector on the subject [1] of the
selector (just like pseudo-elements can't go anywhere other than the
subject of the selector) because it could create infinite loops.  It
would also create infinite loops with parent selectors, if they were
ever used.  What I don't know is whether it would be too hard to
implement (too slow) in a current cascading engine.  There also are
probably some other theoretical problems with it that I can't think of
right now.  It would be neat, though.

For example (picking one of the obvious syntax possibilities for
demonstration):

ul > li, li(list-style-type=disc) > ul > li { list-style-type: square; } 
li(list-style-type=square) > ul > li { list-style-type: disc; }

em, (font-style=normal) > em { font-style: italic; }
(font-style=italic) > em { font-style: normal; } 

David

[1] http://www.w3.org/TR/REC-CSS2/selector.html#subject

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 Tuesday, 25 May 1999 16:07:30 UTC