On 2010-08-24, at 19:19, Max Carlson wrote:

> LzNode - Use this.acceptAttribute() for style values.

This change raises a metaphysical issue.

In HTML CSS, every property that is styleable has a fixed type, so the CSS 
parser knows at parse time, when it sees, e.g.:

  background-color: blue

that `blue` is a special CSS identifier that is to be parsed as an HTML color.

In LZX CSS, we allow arbitrary mapping from CSS property to LZX attribute and 
the type is only known at runtime.  Prior to your proposed change, we 
interpreted CSS identifiers as a call to parse according to the attribute's 
type, and CSS literal, e.g.:


  frobozz: "a string";
  blart: 27;

as a call to use the literal as the actual value of the corresponding attribute 
(no runtime parsing according to type).

Your change will break any usage that depended on this old behavior, so I think 
it needs wider discussion.  I'm pretty sure I agree with your change (as it 
coincides with my proposal to make default values be parsed according to type 
also).  It would simplify our CSS implementation, because it would make, e.g.:

  background-color: blue;
  background-color: "blue";

equivalent (and the latter just extra typing).  You would only need "'s to 
surround a property value that included whitespace.

It seems you need to raise this change with webtop, as they are the primary 
user of CSS styling.


Reply via email to