- From: Jonathan Kew <jonathan@jfkew.plus.com>
- Date: Tue, 23 Mar 2010 11:52:43 +0000
- To: John Daggett <jdaggett@mozilla.com>
- Cc: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org
On 23 Mar 2010, at 07:38, John Daggett wrote:
>
> Taking your suggestion about reseting font-size/vertical-align,
> here's what I would propose:
>
> ======
>
> Name: character-transform
> Value: normal | inferior | ordinal | subscript | superscript
> Initial: normal
>
> The values 'subscript', 'superscript', 'inferior', and 'ordinal' imply
> the appropriate variant glyph is displayed when available in the font
> (OpenType features: subs, supr, sinf, ordn). When a variant glyph is
> not available, a simulated version is synthesized using a reduced form
> of the default glyph. Normal implies use of the default glyph at normal
> size. When the value is anything other than 'normal', the font-size and
> vertical-align properties are set to 'inherit'.
>
> ======
>
> Defined this way, the semantics of using this property would never
> change simply because a font lacked subscript/superscript glyphs,
> simulated fallback would always occur when necessary. Fallback would
> *not* be to the existing font-size/vertical-align tweak but to a
> simulated glyph that resembles what a variant glyph would typically look
> like, similar to the way simulated small-caps works today. Not ideal in
> any way shape or form, but better than just displaying an unstyled
> default glyph and losing the semantic nature of
> subscript/superscript/etc.
>
> Default styling for sub/sup:
>
> sub {
> vertical-align: sub;
> font-size: smaller;
> line-height: normal;
> }
>
> sup {
> vertical-align: super;
> font-size: smaller;
> line-height: normal;
> }
>
> Using 'character-transform' instead:
>
> sub {
> character-transform: subscript;
> }
>
> sup {
> character-transform: superscript;
> }
If I'm understanding this properly, presumably I'd write something like
sup {
vertical-align: super;
font-size: smaller;
line-height: normal;
character-transform: superscript;
}
so as to get true superscript glyphs when using a suitable UA (and font), yet degrade gracefully on older UAs that don't recognize character-transform.
Here, new character-transform-aware UAs would replace the vertical-align and font-size settings, using 'inherit' instead. Does this apply regardless of the order? Or would later properties override earlier ones, so that
sup {
character-transform: superscript;
vertical-align: super;
font-size: smaller;
line-height: normal;
}
could double-superscript the text because the vertical-align/font-size override the 'inherit' setting triggered by character-transform? Or would the subsequent vertical-align/font-size settings actually override the character-transform property altogether?
JK
Received on Tuesday, 23 March 2010 11:53:28 UTC