Re: OBJECT, inheritance, and rendering

Braden N. McDaniel wrote:

>I didn't say there was a single default style sheet that could be defined
>across all browsers and configurations.

Sorry, I thought your original phrasing could be misconstrued.

>I suggested that the browser
>settings (which may include user-configured settings, including a user
style
>sheet) prior to the application of any styles in or referenced by the
>document function as a default style sheet.

I agree, but what you call the default style sheet for a document is
arbitrary if the inserted document is not completely independent. When the
first document is loaded, the default is as you suggest -- the cascaded
UA+user style sheets. But the cascade grows with any inline or imported
stylesheets in the first document. So, if the included document is not
independent, it could be argued that the default style sheet for an included
document is the effective style sheet for the including document.

>... If specified by the user in the browser settings, that modified setting
>becomes the default as far as subsequently applied style sheets are
>concerned, yes?

Yes. The UA might maintain a user style sheet that gets added to the
cascade, but the effect would be the same.

>> The idea of a UA algorithmically
>> modifying foreground colors in the included document to
>> provide contrast on
>> an unexpected background is unappealing to me.
>
>It was just an idea; I would certainly be glad to see others. But you
>haven't convinced me that this problem doesn't exist.

If the included document is considered independent and has no background
color specified within, its background is then a function of the UA+user
stylesheets or the default background for the UA window. It seems to me the
problem stems from assuming a transparent background for the included
document.

>... As noted, the
>initial value for "background-color" is transparent. The "base color" that
>should show through by default is, AFAICT, undefined. So, as you note, this
>is defined by the implementation. It could be puce, or it could be my
>desktop, or it could be the wall behind my monitor--as far as the spec is
>concerned.

Apparently so. I don't see background-color in the recommended default
stylesheet. UAs allow the user to change background-color, but does this
alter the window background or the user stylesheet? If the latter, I would
expect an author stylesheet that defined 'background-color: transparent' for
both HTML and BODY to restore the UA's default window background.

>> A complete HTML document must be rendered within its own
>> viewport.
>
>But where is it said that the canvas of this viewport must show the
>UA-default background color as its default background?

A viewport is typically a window in a windowing UI. Properties of subwindows
are typically consistent for similar content. I agree this should be noted
in the CSS spec, where I can find no mention of nested viewports/subwindows
required for rendering embedded HTML as an independent document.

>> When an OBJECT is an HTML document, the object
>> becomes, in effect,
>> an IFRAME.
>
>Why?

Thanks for asking, because strictly speaking I'm incorrect. OBJECT doesn't
have FRAME-specific properties and can't be a script target.

>> Rendering of HTML documents in the IFRAME element
>> corresponds to
>> what I'm suggesting is reasonable.

>This may be supported by the behavior of current implementations, but I
>can't find support for it in the specs.

From section 13.5 of the HTML 4.0 recommendation*: "An embedded document is
entirely independent of the document in which it is embedded. For instance,
relative URLs within the embedded document resolve according to the base URL
of the embedded document, not that of the main document. Also, an embedded
document does not inherit style information from the main document. An
embedded document is only rendered within another document (e.g., in a
subwindow); it remains otherwise independent."

If the embedded document is entirely independent, its background should not
be affected by the embedding document's stylesheet.

David Perrell

* <http://www.w3.org/TR/PR-html40/struct/objects.html#include-files>

Received on Saturday, 1 August 1998 16:29:53 UTC