Kiwis Can Fly

Visit DarylMilne.com… you know you want to!

  • Kiwis can fly Moved to DarylMilne.com

    The blog is now here.

The Curse of Forgiveness by Default

Posted by kiwiscanfly on May 2, 2007

Check out the whole post at coding horror.

clipped from www.codinghorror.com
Ned Batchelder observed bizarrely tolerant behavor when specifying named colors that don’t exist. Consider this small snippet of HTML:

<font color='red'>█ This is RED</font>

As you vary the named color, you don’t get the error you might expect. What you do get is weird colors:

Firefox IE7 Opera
red █ #ff0000 █ #ff0000 █ #ff0000
seagreen █ #2e8b57 █ #2e8b57 █ #2e8b57
sea green █ #0e00ee █ #0e00ee █ #0ea00e
sxbxxsreen █ #0000e0 █ #0000e0 █ #00b000
sxbxxsree █ #00000e █ #0b00ee █ #00b000
sxbxxsrn █ #000000 █ #0b0000 █ #00b000
sxbxeen █ #000e00 █ #0bee00 █ #00b0ee
sreen █ #00ee00 █ #00ee00 █ #00ee00
ffff00 █ #ffff00 █ #ffff00 █ #ffff00
xf8000 █ #0f8000 █ #0f8000 █ #0f8000

  powered by clipmarks blog it
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: