Re: [css3-text] Splitting CSS Text into Level 3 and Level 4

On Dec 16, 2011, at 9:34 AM, Håkon Wium Lie wrote:

>> Then you could also use that syntax for a"convert previously-defined" effect too:
>> 
>> @text-transform latin-only-uppercase { convert-range: "a","z" to "A","Z"; }
> 
> Why not just:
> 
>  @text-transform latin-only-uppercase { convert: "a-z" to "A-Z"; }
> 
> It's shorter and we don't need to introduce another descriptor. (Which
> leaves us with only one descriptor, but that's ok)
> 
>> @text-transform latin-german-lowercase { convert: latin-only-uppercase, "ẞ" to "ß" }
> 

You're right; I agree. I should look more closely at what I copy/paste. So together these should be:

@text-transform latin-only-uppercase { convert: "a-z" to "A-Z"; }
@text-transform latin-german-lowercase { convert: latin-only-uppercase, "ẞ" to "ß" }

You could also convert ranges to a single character, if you wish:

@text-transform bulletize-numbers { convert: "0-9" to "•"; }

If the number of items don't match, I would say:

• if the first list is shorter then ignore extra items in the second list
• if the first list is longer, then apply the last item of the first list to all remaining items in the second list.

Thus, the following could be useful:

@text-transform bulletize-latin-and-numbers { convert: "0-9 a-z A-Z" to "•"; }

But on these, extra junk is discarded:

@text-transform shift-numbers { convert: "0-9" to "! @ # $ % ^ & * ( ) _ + - = < > ? : \" { } |"

(Note that I also escaped a quote mark in that example. We should also be able to escape the space character, single quote, and slash.)

What about some sort of "not" indicator? So for instance:

@text-transform bulletize-special-characters { convert: not "0-9 a-z A-Z" to "!"; } 
/* for indicating problems with a new user id that has limited character support */

Received on Friday, 16 December 2011 18:09:35 UTC