Closed
Bug 227072
Opened 21 years ago
Closed 15 years ago
bgcolor transparent is blue in quirks mode => should be white
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: gaemon, Assigned: dbaron)
References
()
Details
(Keywords: compat, testcase)
Attachments
(2 files, 1 obsolete file)
1.85 KB,
text/html
|
Details | |
2.39 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031128
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031128
quirks mode renders elements with bgcolor=transparent attribute as blue.
standard mode is rendered as expected.
Reproducible: Always
Steps to Reproduce:
1. create an html without doctype declaration.
2. set bgcolor=transparent to any element: e. g. <body>
3.
Actual Results:
background of the element becomes blue.
http://firimar.net/test/bgcolor-2.html is the same file except the DOCTYPE
declaration. it is rendered white.
Comment 1•21 years ago
|
||
http://www.w3.org/TR/html401/types.html#type-color
Probably for backwards compatibility with Netscape4.x, which also renders it as
blue.
You know you should use style sheets for this, do you?
Comment 2•21 years ago
|
||
http://www.mozilla.org/docs/web-developer/quirks/quirklist.html - doesn't say
anything about transparency except one thing relating to table borders. Nothing
in quirks.css, either. So _is_ it maybe a bug? Someone with Nav4 want to check this?
Since I'm on Linux, updating the OS, etc. but not confirming since I don't know
if it's a bug or not.
Assignee: win32 → general
Severity: normal → minor
Component: GFX: Win32 → GFX
OS: Windows XP → All
Comment 3•21 years ago
|
||
As I said in comment 1, NN4 renders it the same way in quirks mode (=blue).
Comment 4•21 years ago
|
||
Oh, whoops, I missed that. Then should this be resolved as invalid or morphed
into "put a notice of that on the quirks mode page"? Or alternately, should it
be morphed into "remove that quirk" since quirks is for compatibility and the
90% that use IE won't see it as blue either, plus it probably takes up (a tiny
bit of) code size and rendering time?
Comment 5•21 years ago
|
||
Since NN4 has a user-base of 0 (1%) and it is not likely that there are sites
out there, which still rely on this bug (IE does it different) this should be
removed.
(off-topic: thanks for the link to the mozilla specifications)
Status: UNCONFIRMED → NEW
Component: GFX → Style System (CSS)
Ever confirmed: true
Summary: bgcolor transparent becomes blue in quirks mode → bgcolor transparent is blue in quirks mode => should be white
Comment 6•21 years ago
|
||
"transparent" gives a DOM value of "#0000e0"
Duplicate of bug 121738 or bug 204826?
Assignee: general → dbaron
Keywords: testcase
Comment 7•21 years ago
|
||
Since it is not about the color that is 'shown', it is about the keyword
(transparant) that gives a different 'view' than you would expect (white instead
of blue).
*** This bug has been marked as a duplicate of 204826 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Comment 8•21 years ago
|
||
I intentionally left this bug unresolved because I wanted the module owner to
decide if it is a WONTFIX or not.
Although "transparent" is not a color name, it is a valid value for the CSS
property 'background-color' and I felt it could be worth considering if it also
makes us compatible with IE.
Assignee | ||
Comment 9•21 years ago
|
||
Is it white in IE/Windows because IE/Windows is interpreting transparent
specially or because the backwards-compatible color name handling algorithm
makes transparent white?
Comment 10•21 years ago
|
||
I tested in IE: <table bgcolor="yellow"><td bgcolor="transparent">text...
The cell bg was yellow and getAttribute('bgcolor') returned "transparent".
If I set bgcolor to "whatever" I got a "#....." hex value from getAttribute -
so it seems they treat "transparent" specially.
Comment 11•21 years ago
|
||
Comment 12•21 years ago
|
||
If we want to fix it, it should be something like this...
Comment 13•21 years ago
|
||
ew, that's a horrible way of fixing it.
Comment 14•21 years ago
|
||
Suggestion:
Instead of the way Mozilla is doing this now. We could add a Mozilla CSS value,
which will also be in CSS3 (there isn't any CSS3 recommendation...).
-moz-attr(argument1,argument2)
Example:
body[bgcolor]{
background-color: -moz-attr(bgcolor,color);
}
This would also give back the result as the author of such document would expect
it. This -moz-attr() could also be used for other things, which are currently
done without CSS. Though it is not a saver for everyting, like for the 'alink'
attribute.
Assignee | ||
Comment 15•21 years ago
|
||
That also doesn't handle the rules on specificity of presentational hints in markup.
Comment 16•21 years ago
|
||
Ian, why is that a "horrible" way to fix it, exactly?
Comment 17•21 years ago
|
||
Because it gives special magical meaning to a type that happens to be otherwise
unused at that point. For someone reading the code, it appears highly magical.
My preferred fix for this would be to simply treat "transparent" as a normal
colour value that happens to map to rgba(0,0,0,0), and remove any special coding
for that value anywhere. (This may temporarily, until we implement rgba() for
real, require that we special case the alpha=0 case when painting, though. Or we
could simply replace all the current places that special case transparent for
cases that special case alpha=0.)
Comment 18•21 years ago
|
||
*** Bug 232537 has been marked as a duplicate of this bug. ***
Comment 19•21 years ago
|
||
One thing I noticed is that when one edits the value of bgcolor using the
dominspector you'll see some strange results. Most of the times it will show the
color you've entered, but in some cases if you enter #000000 it will convert
that to #00e000 instead. I don't know if it is related to this...
Comment 20•21 years ago
|
||
*** Bug 235387 has been marked as a duplicate of this bug. ***
Comment 21•21 years ago
|
||
*** Bug 243350 has been marked as a duplicate of this bug. ***
Comment 22•20 years ago
|
||
Hi Developers,
you have the same problem in tables and table-cells. Gecko (Firefox 1.0 PR and
Firefox 0.9.3) renders <table bgcolor="transparent"> and/or <td
bgcolor="transparent"> in ugly dark-blue.
I guess bgcolor="transparent" ist not W3C-compliant, although many website use
these attributes. IE 5.5 or IE 6.0 display white table- or cells-background, so
Gecko should do it, too.
Best Regards
Andy
Comment 23•20 years ago
|
||
*** Bug 282726 has been marked as a duplicate of this bug. ***
Comment 24•20 years ago
|
||
I'm getting this in FireFox 1.0.4 with content pasted in from Word. We have a
bunch of tables in Word that when pasted as html include bgcolor="transparent"
in some of the td elements. As per this issue they table cells are rendering as
blue in FF but okay in IE. So I have new content running into an old bug. Yuck.
Comment 25•20 years ago
|
||
In my case I was able to add a doctype declaration to the page that renders the
content - as the page now renders in standards compliance mode the "transparent"
background no longer renders as blue.
Scott
Comment 26•18 years ago
|
||
Dear Developers,
please refer to the comment #22; I share the same concern since I still have the very same problem with:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Could you please advise if and when this could be fixed?
Thanks and best regards.
Comment 27•18 years ago
|
||
*** Bug 354961 has been marked as a duplicate of this bug. ***
Comment 28•18 years ago
|
||
I got a similar case:
STEPS LEADING TO PROBLEM:
1.Open browser
2.Go to http://www.thechroniclesofriddick.com/ page
3.Notice the background under page menu (on right side)
EXPECTED OUTCOME:
Background image is displayed.
ACTUAL OUTCOME:
Background image is not displayed. Menu is in Flash and looks like it's
transparent - but here it is not displayed as transparent but as with white
background - that may be cause why background image is not displayed as on
desktop. See attached screenshots.
FREQUENCY OF OCCURRENCE:
always
Assignee | ||
Updated•18 years ago
|
Assignee: dbaron → nobody
Status: REOPENED → NEW
QA Contact: ian → style-system
Comment 30•17 years ago
|
||
Another testcase: attachment 286075 [details]
Comment 31•17 years ago
|
||
One important detail must be understood. 99% or so of all MSIE users have background color set by default to white. But if I have it set to, say, light green, then <body bgcolor="transparent" ...> will render a light green background-color, NOT white color.
Comment 32•17 years ago
|
||
> Is it white in IE/Windows because IE/Windows is interpreting transparent
> specially or because the backwards-compatible color name handling algorithm
> makes transparent white?
It is white in IE/Windows because IE/Windows setting
Tools/Internet Options.../General tab/Colors/Background is set to white color or because Tools/Internet Options.../General tab/Colors/Background "Use Windows colors" checkbox is checked. MSIE 7 under XP Pro here.
Assignee | ||
Comment 33•15 years ago
|
||
According to HTML5, 'transparent' should be rejected. (See bug 121738.)
Assignee: nobody → dbaron
Attachment #136533 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #446915 -
Flags: review?(jonas)
Attachment #446915 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 34•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 21 years ago → 15 years ago
Keywords: qawanted
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in
before you can comment on or make changes to this bug.
Description
•