Re: CSS3: font-style

On Tue, 25 May 1999, Nicolas Lesbats wrote:

> Some months ago, I proposed a new value for the 'font-style' property,
> named 'toggle' by Daniel Glazman, to get the following behaviour:
> 
> When the inherited value corresponds to 'normal', then apply the
> value 'italic'.
>  When the inherited value corresponds to 'italic', apply the value
> 'normal'.
>
> So, who is for and who is against ?

Seems like a reasonable suggestion to me.


Let's see:

Con:

   Can already be done.

   For example, the following:

      EM, CITE { font-style: toggle; }

   ...can be done today, like this:

      BODY { font-style: normal; }
      EM, CITE { font-style: italic; }
      EM CITE, CITE EM { font-style: normal; }
      EM CITE EM, CITE EM CITE { font-style: italic; }
      /* three levels deep, assumes no same-tag nesting */

Pro:

   The way current way of doing it is hugely unwieldy.

Pro:

   Backwards-compatible: 

      EM, CITE { font-style: italic; font-style: toggle; }

   ...would result in italic EM and CITE in CSS2 browsers, and toggled
   EM and CITE in CSS3 browsers.


Con:

   Requires knowing the state of the parent.

Pro:

   ...considerably less so than CSS1 features such as the box models!

Pro:

   ...and you need to know the state of the parent anyway to support
   the inherit the property in the first place.


Seems like the pros out number the cons two to one...


[This idea has now been added to the long list of suggestion on the
www-style past suggestions list:
http://www.bath.ac.uk/%7Epy8ieh/internet/wwwstyle.html ]

-- 
Ian Hickson 
U+2642 U+2651
U+262E U+2603 U+263A

Received on Tuesday, 25 May 1999 14:47:19 UTC