- From: Chris Lilley <chris@w3.org>
- Date: Wed, 12 Mar 2003 20:59:41 +0100
- To: www-svg@w3.org, "Sigurd Lerstad" <sigler@bredband.no>
On Wednesday, March 12, 2003, 1:48:13 AM, Sigurd wrote: SL> Hello, SL> I'm implementing SVG and CSS.. And I'm about to implement SL> presentational attributes and SL> SVGStylable::getPresentationAttribute() SL> Are the presentational attributes separate from the CSS properties SL> on that element? Depends what you mean. SL> I mean, if you have SL> <svg fill="#000000" style="fill:#ffffff"> SL> If you call element.getPresentationAttribute("fill") and you call SL> element.style.getPropertyValue("fill") SL> Do you get two separate objects in return? or do you get the same object? Separate, with different values. SL> I understand the spec as two different objects, just want to make sure... getPresentationAttribute Returns the base (i.e., static) value of a given presentation attribute as an object of type CSSValue That will return a CSSValue with white (there is no canonical form yet, though clearly rgb (100%, 100%, 100%) can express any of the other forms. getPropertyValue will, in the case of an implementation that understands CSS, return a CSSValue most likely with the value black unless there is a higher-specificity selector in a rule that sets it to a different value. Which is possible, in CSS2, for example using two id selectors, or an id and a class. -- Chris mailto:chris@w3.org
Received on Wednesday, 12 March 2003 15:00:27 UTC