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

On Dec 16, 2011, at 10:28 AM, Håkon Wium Lie <howcome@opera.com> wrote:

>> 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
> 
> Yes. 
> 
>> • if the first list is longer, then apply the last item of the
>> first list to all remaining items in the second list.
> 
> I can't parse that. Wouldn't it be:
> 
>  if the first list is longer, then apply the last item of the second
>  list to all remaining items in the first list

You're right. I said it wrong. 

>> 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 "! @ # $ % ^ & * ( ) _ + - = < > ? : \" { } |"
> 
> Yes.
> 
>> (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.)
> 
> The slash ('/') doesn't need escaping, but the backslash ('\') does.

Right again. I should have said backslash. Sorry for fumbling my words. 

> And the dash ('-'), to avoid treating it as a range descriptor.

Yes. How about this for hiding spaces by transforming them to an empty string:

@text-transform no-spaces { convert: "\ " to ""; }

I think it would be good to have examples like that in the spec when we have one. It would show that the only way to convert characters to an empty string is if the entire "to" part is "".  Or it could be " " or "     ", etc. I suppose, since the spaces are just seperators. . 


> Should we allow "negative" ranges? As in:
> 
>  convert: z-a to "•";
> 
> Probably not. The presence of a "negative range" should probably lead
> to discarding the whole statement:
> 
>  convert: "0-9 z-a A-Z" to "•"; }  /* no effect */
>  convert: lowercase, "æ" to "Æ", "0-9 z-a A-Z" to "•"; }  /* no effect */

I don't feel strongly about that. To me, z-a and a-z seem to unambiguously mean the same thing. But I wouldn't fight for the right to write z-a. 

>> 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 */
> 
> Interesting. Powerful. I'd say yes.

Cool. 

Received on Friday, 16 December 2011 18:57:18 UTC