W3C home > Mailing lists > Public > www-style@w3.org > December 2011

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 16 Dec 2011 10:08:58 -0800
Cc: MURATA Makoto <eb2m-mrt@asahi-net.or.jp>, www-style@w3.org
Message-Id: <13EB412B-0EE7-46E0-9EA2-DDD8D70B18AB@gmail.com>
To: Håkon Wium Lie <howcome@opera.com>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT