- From: Braden N. McDaniel <braden@shadow.net>
- Date: Thu, 30 Jul 1998 15:44:22 -0700
- To: "'Simon Richter'" <geier@psi5.com>
- Cc: "'Todd Fahrner'" <fahrner@pobox.com>, <www-style@w3.org>, <www-html@w3.org>
> -----Original Message----- > From: www-html-request@w3.org > [mailto:www-html-request@w3.org]On Behalf > Of Braden N. McDaniel > Sent: Wednesday, July 29, 1998 8:24 PM > To: 'Simon Richter' > Cc: 'Todd Fahrner'; www-style@w3.org; www-html@w3.org > Subject: RE: OBJECT, inheritance, and rendering > This strikes me as a genuine ambiguity in the HTML 4 spec. Is > there any > chance of seeing this amended (via an "errata" addendum?), or > should I just > cross my fingers and hope to see it in HTML 5? I thought it would be useful to elaborate on the nature of these problems if I'm going to call for a fix. There are two problems here. They are, as I see them, color-specific problems, and do not extend to all styles. First, there is a problem with including HTML files with OBJECT. It appears to me that there exists in the specs a mechanism by which an inclusion can keep the background of the parent document. This, anyway, has been the traditional means of implementing inclusions with transparency. Specifically, an image with transparency will show the background of the host document in the transparent portions. I submit that, since the specs seem not to speak to the issue specifically, it follows from this behavior that the proper behavior for an included HTML file is for the color of the host document to show through where the background of the inclusion is "transparent". Note that the initial value defined for the "background-color" property is "transparent". This creates an interesting problem, because we have no similar means of imposing a *foreground* color from the host document. The initial value for "color" is defined as being "implementation dependent". Let's suppose that an implementation has defined this initial value to be black. I might have an HTML document that hosts an inclusion which looks something like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> <HEAD> <TITLE>Host Document</TITLE> <STYLE TYPE="text/css"> BODY { background-color: black; color: white } </STYLE> </HEAD> <BODY> <P>Hi, I'm a host document. I've got an inclusion right about <OBJECT DATA="inclusion.html" TYPE="text/html" HEIGHT="100%" WIDTH="100%">here.</OBJECT> </BODY> inclusion.html doesn't specify any styles, and can therefore be expected to take the initial values for properties of all the styles of its elements: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> <HEAD> <TITLE>Included Document</TITLE> </HEAD> <BODY> <P>Hi, I'm an included document. </BODY> It appears to me that, per the current specs, the correct rendering of the included document is black text on a black background. The initial reaction to this situation might be, "So what, the same thing would happen if you used an image with only black and transparent pixels." There is a significant difference. In that situation, the page author knows that the pixels will be black, because (presumably) he is familiar with the contents of the image. In this case, recall that the default foreground color for the document is *implementation defined*. The author doesn't know what the foreground color will be unless he specifies it in a style sheet. A possible solution to this is to change the initial value of "color" from "implementation-defined" to simply guarantee that the initial color will contrast with the base background color. This could be guaranteed numerically, yes? The second problem is what I was focusing on before: the problem of how to deal with coloring a plain text file. The problem is basically the same as that with including an HTML file: the background color can be controlled from the host document, but not the foreground color. The difference here is that for a plain text file, the foreground color cannot be controlled from the included document either. This suggests to me that we need a general means of determining color for monochromatic inclusions, and it should be based on the properties of the host document. As described before, a possible solution to this is to give one pixel value the color of the current foreground color in the host document, and the other pixel value would be fully transparent (or, have the color of the current background of the host document). Comments? Braden
Received on Thursday, 30 July 1998 18:38:04 UTC