Closed
Bug 40984
Opened 25 years ago
Closed 25 years ago
background property on HTML element is ignored when a background property is also specified on the BODY element
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
FIXED
People
(Reporter: braden, Assigned: attinasi)
References
()
Details
(Keywords: css1, regression, Whiteboard: [nsbeta2-])
The background image on this page (set on the HTML element) nolonger appears. It
used to.
Comment 1•25 years ago
|
||
I don't see a background image set on that page (maybe I'm not looking in the
right places), and neither IE nor Moz currently displays one. Both browsers
display a colored background (also set in the stylesheet). Win98 2000 053008.
There's a background image set in css, but I can't figure out the correct
absolute URL for the image (I keep getting 404 not found errors). What is the
absolute URL of the background image that's supposed to load?
I do get a background image under the text "... ellipsis", btw.
It's in spackle.css. Of course IE doesn't show it; IE (contrary to the specs)
doesn't support setting the background on the HTML element.
The URL to the image is <http://www.endoframe.com/stylesheets/images/c10.jpg>.
It's there, so you shouldn't be getting a 404.
And, yes, I'm aware that the background behind "... ellipsis" is working.
Updated•25 years ago
|
Keywords: regression
Comment 5•25 years ago
|
||
background-image will work on the body (workaround), will look at what is
happening when specified on the HTML element...
Assignee: dcone → attinasi
Component: Layout → Style System
| Assignee | ||
Comment 6•25 years ago
|
||
The CSS2 spec states:
"User agents should observe the following precedence rules to fill in the
background: if the value of the 'background' property for the HTML element is
different from 'transparent' then use it, else use the value of the 'background'
property for the BODY element."
Note that it says *should* and is thus a recommendation, not a requirement.
Also, the CSS2 spec *recommends* that authors specify their background
properties on the BODY element rather than the HTML element. (see CSS2 14.2)
spackle.css has a background color and image on both the HTML and the BODY
elements. We are using the one on the BODY rather than the one on the HTML, and
the background-image property on the body is 'none' hence you are getting no
background image.
I'll reword the summary and take ownership of this bug, however it is not likely
to get fixed soon since we are not actually in conflict with the specification
and the use of the background property on BOTH the HTML and BODY elements is
unusual.
(note that we honor the background property on the HTML element if there is none
specified on the BODY, the problem is when you have both the BODY will win).
Thanks for pointing out the bug.
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Summary: Background image does not appear → background property on HTML element is ignored when a background property is also specified on the BODY element
Target Milestone: --- → M20
Comment 7•25 years ago
|
||
Marc: The business in the CSS spec about BODY->HTML inheritence only applies
when HTML doesn't have a background (i.e., HTML's bg is transparent).
There are already a few bugs open on this issue that you may wish to have a look
at if you are planning on fixing this:
bug 2285: Backgrounds on BODY and HTML
bug 13473: Root element's background should cover the canvas
bug 35681: Body is sized too wide
There are many test cases here:
http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/background/
| Assignee | ||
Comment 8•25 years ago
|
||
Thanks, Ian. From my reading of the spec it is just a recommendation anyway, not
a requirement. It was my mistake, however, in the re-coding of
BodyFixupRule::MapStyleInto, to overwrite the HTML background properties with
the BODY background properties. I'll have to get back to that and take care of
the case where the HTML has a background property set and the BODY's background
is set as well.
Mark: You may argue that those particular words in the spec are not a
requirement, but if you choose not to follow them, then you should follow the
normal rules for applying styles to elements. Currently, Mozilla isn't doing
that either, thus it is violating the spec.
Those rules in the spec are there to allow the canvas to take the backgrounds
specified on BODY under some specific circumstances. If Mozilla is using BODY's
background for the canvas under any other circumstances, it's doing something
other than the spec allows for.
| Assignee | ||
Comment 11•25 years ago
|
||
I'm not arguing that we are doing the right thing - in fact I have admitted
that I introduced this bug when I reworked the code that maps the HTML and BODY
backgrounds onto the canvas frame. I have every intention to fix that code when
I can, it is just that the priority is a little bit lower right now. Please bear
with me, or better yet, take a look at the method BodyFixupRule::MapStyleInto
and help me out. Thanks.
Comment 12•25 years ago
|
||
*** Bug 45456 has been marked as a duplicate of this bug. ***
Comment 13•25 years ago
|
||
http://style.verso.com/boxacidtest/vd/
It would be a shame if nsbeta2 would not correctly render this (famous) test,
therefore nominating it.
Keywords: nsbeta2
Comment 15•25 years ago
|
||
I'm with Peter. It would be a shame to release a public commercial preview that
breaks the most famous test of standards-compliance around. Can't do anything
about it myself, unfortunately, but I'm adding myself to the cc list anyway.
| Assignee | ||
Comment 16•25 years ago
|
||
Patch for this is attached to related bug 2285 - please set your eyes upon it.
| Assignee | ||
Comment 17•25 years ago
|
||
Fixed by fixing bug 2285 (same problem, in nsHTMLBodyElement.cpp)
Verifier: please verify that the site http://style.verso.com/boxacidtest/vd/ now
matches the reference image.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 18•25 years ago
|
||
As per meeting with ChrisD today, taking QA.
VERIFIED FIXED on Win32 commerical 2000072508. Woohoo!
Status: RESOLVED → VERIFIED
QA Contact: petersen → py8ieh=bugzilla
You need to log in
before you can comment on or make changes to this bug.
Description
•