This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section: http://www.whatwg.org/specs/web-apps/current-work/#colors Comment: I think the rules for parsing a legacy color value should specify that whitespace at the edges of the string is removed before running the rest of the algorithm. Gecko and (if my memory is correct) WebKit both do this, so it's certainly Web-compatible behavior. And it seems quite odd for <body bgcolor=" red"> to fall through to the legacy color parsing algorithm rather than producing the obvious result. Posted from: 63.245.220.240
That was me reporting this. Now I know what happens when I use the comment UI on the spec.
And a better URL is: http://www.w3.org/TR/html5/infrastructure.html#rules-for-parsing-a-legacy-color-value
The TR/ page is rarely a better URL, but the fragment identifier in question might be better. :-) BTW if you log in using the login button at the top right of the spec, you'll get CC'ed automatically on Bugzilla bugs (assuming you use the same e-mail address for both).
How about <body bgcolor=" #f00"> ? or <body bgcolor=" #f00000">? or <body bgcolor=" f00">? I'm not clear on when we stop having to produce the "obvious" result here. WebKit, Opera, and Firefox (the browsers I could easily test here) all have different boundaries with respect to how far they're willing to go.
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Done as requested for now. I'm concerned that this will lead to a slippery slope of further requests, in which case I will ask for data showing how this is handled in legacy browsers.
Checked in as WHATWG revision r5359. Check-in comment: Make ' red' parse as 'red' for legacy colours. http://html5.org/tools/web-apps-tracker?from=5358&to=5359
(According to Paul Irish, IE (6, 8, 9) doesn't ignore spaces here, by the way.)
Follow-up in bug 12372.