>From a literal reading of the two (though the CSS2 is a bit vague in the unknown properties section), it seems that the two are not necessarily contradictory:
a) CSSStyleDeclaration says all unknown properties must be exposed via CSSStyleDeclaration b) CSS2 states that illegal (not unknown) parts of the style sheet must be ignored. c) CSS2 states that to allow for future properties the user agent must act as if the style had not contained the unknown attribute. Presumably this implies that the unknown attribute must have no visible effect on the user agent (in the absence of additional user script/java which interprets the style settings). The question is, what effect would adding a real style with the same name as some custom style later have on the custom code; which seems like a lesser issue. Of course my interpretation in c) could be entirely wrong, and the CSS2 may mean that the unknown declaration really must be ignored. In this case (or the case in c) above) this certainly implies that the style is not inherited. The question then becomes, should the CSSStyleDeclaration interface perhaps allow you to get the "declared" properties instead. Which is of course just a convenience method to parse the single element level "style" attribute, and as such perhaps isn't super useful. -----Original Message----- From: Cameron McCormack [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 5:21 AM To: [email protected] Subject: Re: Custom elements and the "style" attribute Graham Sanderson: > From the CSSStyleDeclaration documentation: > > > > "While an implementation may not recognize all CSS properties within a > CSS declaration block, it is expected to provide access to all specified > properties in the style sheet through the CSSStyleDeclaration > interface." That's interesting, since CSS 2 states[1]: In some cases, user agents must ignore part of an illegal style sheet. This specification defines ignore to mean that the user agent parses the illegal part (in order to find its beginning and end), but otherwise acts as if it had not been there. To ensure that new properties and new values for existing properties can be added in the future, user agents are required to obey the following rules when they encounter the following scenarios: * Unknown properties. User agents must ignore a declaration with an unknown property. For example, if the style sheet is: H1 { color: red; rotation: 70minutes } the user agent will treat this as if the style sheet had been H1 { color: red } This seems to contradict what's said in DOM 2 Style. Certainly Batik's CSS engine currently doesn't store any non-SVG CSS properties at the moment. Cameron [1] http://www.w3.org/TR/CSS2/syndata.html#parsing-errors -- e-mail : cam (at) mcc.id.au icq : 26955922 web : http://mcc.id.au/ msn : cam-msn (at) aka.mcc.id.au office : +61399055779 jabber : heycam (at) jabber.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
