W3C home > Mailing lists > Public > www-dom@w3.org > January to March 1999


From: L. David Baron <dbaron@fas.harvard.edu>
Date: Fri, 12 Feb 1999 17:28:35 -0500 (EST)
Message-Id: <199902122228.RAA08599@login1.fas.harvard.edu>
To: dbaron@fas.harvard.edu, vidur@netscape.com
Cc: www-dom@w3.org

Two further comments before my reply to the thread.

1) Is there a way in the DOM to have (readonly!!) access to user
stylesheets?  Having such access could allow interesting ways of
avoiding clashes with user "!important" rules.  It might be worth

2) The getPropertyPriority and setProperty probably should not use the
exclamation point for the priority, because the whitespace after it is
optional.  That is, the priority should be "" or "important", not "" or
"!important" or "! important".  (This is probably more of a problem
with getPropertyPriority.)

However, I'm not really sure about this since the general CSS grammar
(section 4.1 of CSS2) is not very clear on possible extensions to
priorities.  Perhaps the priorities would be better off replaced by a
boolean value indicating whether the rule is important or not, since
there really isn't any hint of how priorities might be generalized in
the future.

Vidur Apparao (vidur@netscape.com) wrote:
> 3) When computing the shorthand property, only non-defaulted longhand
> property values should be listed. For example, querying for the font
> property should not return "normal normal normal 14pt/normal Arial",
> since the "normal"s are default values.

This is reasonable for the font property and for the border and
border-[left|right|bottom|top] properties.  However, for the margin,
padding, and border-[width|style|color] properties, it doesn't make
much sense.  A good rule for those would probably be that the minimum
number of sides possible would be used, i.e., that "0px 10px" would be
returned instead of "0px 10px 0px 10px"

However, both of these statements limit themselves to the particular
shorthand properties in CSS2.  I think you are probably best off making
a more general statement such as:

  When computing a shorthand property to return, the form returned
  should be the shortest form exactly equivalent to the declarations
  made in the ruleset.  However, if there is no shorthand declaration
  that could be added to the ruleset without changing in any way the
  rules already declared in the ruleset (i.e., by adding longhand rules
  that were previously not declared in the ruleset), then the empty
  string should be returned for the shorthand property.

(This covers what you gave as rules 2 and 3.)

David Baron

L. David Baron    Freshman, Harvard    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.  < http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                < http://www.webstandards.org/css/ >
Received on Friday, 12 February 1999 17:28:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC