W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Color attributes

From: Andy Lyttle <whatwg@phroggy.com>
Date: Thu, 16 Oct 2008 15:01:02 -0700
Message-ID: <D7795035-3ECC-4207-B0FA-B67D6607A709@phroggy.com>
"While the first item's length in segments is greater than 2 and the  
first character in each item in segments is a U+0030 DIGIT ZERO  
character, remove the first character from each item in segments."

Does this mean, if the length of the first item in segments is  
greater than 2 then loop through each item in segments, and if the  
first character is 0 then remove it?

Or does it mean, if the length of the first item in segments is  
greater than 2 and the first character of every item in segments is  
0, then loop through each item and delete the first character, but if  
the first character of any item is not 0 then leave the whole thing  
alone?

I'm assuming you meant #1, but your wording isn't perfectly clear.

Has it occurred to you that while your algorithm makes the string  
"foo" return an error, the string "l33tsp34k" is converted to a dark  
purple?

-- 
Andy Lyttle
whatwg at phroggy.com



On Oct 16, 2008, at 4:46 AM, Simon Pieters wrote:

> On Thu, 05 Jul 2007 23:43:55 +0200, Simon Pieters  
> <zcorpan at gmail.com> wrote:
>
>> Color attributes in HTML have special processing.
>
> It seems that some pages use three-digit notation and expect it to  
> work as in CSS. I've made the algorithm do that and I've drafted up  
> a spec for this:
>
>    http://simon.html5.org/specs/html-color-attributes
>
> -- 
> Simon Pieters
> Opera Software
Received on Thursday, 16 October 2008 15:01:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC