Would some form of content negotiation in the CSS spec be a better way to deal with the styling confusion?

How should svg elements (in html) handle pointer-events, border and backgrounds styles, and other integration issues?
------------
 
I have been considering whether it might be better to specify a content negotiation framework in CSS.  Consider the following:
 
 
 
Inline Replaced Elements
 
* Designed for content in another XML namespace (like SVG or MathML)
 
Layout:
An anonymous CSS box with a content box from another namespace layered on top.
* Anonymous box - Within the CSS namespace
* Content box - Layered on top of the anonymous box is the content from the other namespace (like SVG or MathML)
 
DOM:
* From the perspective of the DOM, there is only 1 element.
* Properties and styles corresponding to the CSS namespace apply to the anonymous box; properties and styles from other namespaces apply to the "content box"
 
Content Negotiation:
* The anonymous box passes various properties to the "content box" (like x,y pos, width, height, etc....)
* Inside the spec of each namespace (like the SVG or MathML spec) is defined what to do with the information it receives from this special negotiation process; for SVG it would affect the position of the "content box", it's clipping and width/height.
 
Events:
* The anonymous box can only trigger events on graphical portions (like a border or background).
* For non-graphical portions of the anonymous box, it should act like nothing exists (it should not dispatch an event or block access to items underneath).
 
* The "content box" (svg, mathml, etc...) follows the event model of their respective specifications.  For SVG this means the "content box" never triggers an event.
 
* Triggering an event is a combination of the "anonymous box" and the "content box"; if either triggers an event, then an event will be dispatched for that element. 		 	   		  

Received on Monday, 23 August 2010 21:18:38 UTC