Re: [css3-text] @text-transform

On Sat, 07 Jan 2012 19:48:38 +0100, Christoph Päper  
<christoph.paeper@crissov.de> wrote:

> When the scope descriptor is used in combination with a reference to a  
> previously defined transform you currently suggest that the resulting  
> scope is their intersection. That means on the one hand, ‘all’ is then  
> always ignored, on the other hand, if two different single values out of  
> ‘initial’, ‘medial’ and ‘final’ are combined the transform matches  
> nothing. I don‘t think that is ideal, but I don’t have a better solution  
> either.

The reasoning behind intersection is that if you have an existing transform
that does something like uppercase (which has scope 'all'), creating on
that does something like capitalize is as easy as this:

@text-transform something-like-capitalize
{
 conversion: something-like-uppercase;
 scope: initial;
}

Intersection gives you that. It is true that it is not the only solution  
that gives
this result, and we could instead say that the scope of the includer  
replaces
the scope of the included. But intersection sounds more useful to me, as  
it allows
combining various transforms with different (not necessarily intersecting  
scopes)
into a single one, by referring to all of them in a transform that has an  
'all'
scope. Here is a simple example:

@text-transform long-s
{
     transformation: "s" to "ſ";
     scope: initial medial;
}

@text-transform old-capitalize
{
 transformation: capitalize, long-s;
 scope: all; /* this line can be dropped, as all is the default. */
}

I think the two simple examples I give here (something-like-capitalize and
old-capitalize) are worth supporting, and intersection makes them work.



> The German ‘ß’ example states that there traditionally is no uppercase  
> variant, i.e. the character is not a letter proper, but a ligature  
> equivalent to ‘ss’

 From a unicode standpoint, it is a character.

> – accordingly, current implementations transform it to ‘SS’ for  
> ‘uppercase’ (like they turn ‘fi’ into ‘FI’).

Not all browsers turn ß into SS. Opera doesn't. Hm, this might be a bug.

> That means transformation: uppercase, "ß" to U+1E9E;
>
> can only work, if later partial transformations can overrule earlier  
> ones, even if they are predefined in CSS2 (and possibly employ mappings  
> that the at-rule cannot express yet). Otherwise the above rule would be  
> equivalent to
>
>   transformation: uppercase;

The comma separated list of conversions are applied in order, and later
conversions do not overrule earlier one. I wrote this rule under the
assumptions that ß was left unchanged by 'text-transform:uppercase'. As
that's not always true, the rule should be rewritten like this:

   transformation: "ß" to U+1E9E, uppercase;

Received on Monday, 9 January 2012 10:51:26 UTC