Re: Author styles vs. browser styles

Eric A. Meyer wrote:
>...
> tag display.  The author can obviously override these 'internal' styles.
> So let's assume that Nav4's internal style sheet contains the declaration
> 'DD {margin-left: 50px;}'.  It probably isn't set to that exact value, but
> work with me for a moment.  Given that assumption, which of the following
> author declarations should yield a left margin of 10px?
> 
>    DD {margin-left: -40px;}
>    DD {margin-left: 10px;}

The second.  Properties are an all or nothing affair for each
non-shortcut property.  They combine according to the precedence 
rules in CSS.

> In other words, should author declarations relative to the internal styles,
> or should they completely override them?
>    I realize that I don't know the answer, and I'm very keen to find out.

This is,  at least,  very explicit.  Other issues are not.  I also
think that CSS needs to examine the precendence and extend it to be
more sensitive to structure if it is to be reasonably useful in XML.

<soapbox mode=on>
Let me give an example.  My internal browser stylesheet has the
following declaration to deal with LI elements inside of UL and OL:

OL  		{ list-style: decimal }
OL OL 		{ list-style: upper-alpha }
OL OL OL 	{ list-style: lower-alpha }
OL OL OL OL  	{ list-style: upper-roman }
OL OL OL OL OL  { list-style: lower-roman }
UL		{ list-style: disc }
UL UL 	 	{ list-style: circle }
UL UL UL  	{ list-style: square }

Now (you say) what's wrong with that?  I'll tell you.  What I really
want is to describe how many parents each LI has and use the most
proximate to decide whether to use the number or non-numbered property.
If I knew DSSSL I could write out what I want.

This is the crux of the problem which CSSx is going to hit moving
forward.  Contextual selectors are too weak because they are almost
unnecessary in HTML.  In other DTDs this isn't true.
<soapbox mode=off> <?ignore-if-you-want>

Doug
-- 
Doug Rand				drand@sgi.com
Silicon Graphics/SSO			http://reality.sgi.com/drand
Disclaimer: These are my views,  SGI's views are in 3D

Received on Wednesday, 5 November 1997 15:04:04 UTC