Use and paint server

Hi! Everybody

I recently complain on Twitter
<> about issues
regarding the <use> element and the call to remote paint servers (from the
same origin, no cross-origin madness here). It took me a while to test it
out but I think I got it (see:

I'm not sure if this group is the right place to discuss this, so let me
know if you know a better place for that.

My findings can be summarized as such:

   - Blink/WebKit based browsers does not support remote paint servers (or
   anything that can be remotely called through a CSS url() function). It
   appears that it's a long standing bug, both for Chrome
   <> and Safari
   <>, If anyone as any idea
   on how to lobby for those bugs, I'm all hears.

   - The SVG2 spec is somewhat unclear about how styles targeting a
   duplicate element from a remote file applies. It is stated that: "[…]
   all style rules that apply in the scope of the referenced element also
   apply in the scope of the cloned shadow tree
   <>". I think it make
   sens that this statement is valid for elements living in the same file but
   it seams obnoxious to think it will work for a remote element. The current
   implementation of all browser is consistent to not apply styles to
   duplicated remote elements which make total sens IMO. Maybe a slight
   rewording of the spec could be a good idea to avoid any misinterpretation.

   - The SVG2 spec as changed the definition of the <use> element to
   express it in term of Shadow DOM. It's great and it is nicely implemented
   toward Chrome, Firefox and Safari. However, the spec state that "<style>
   elements embedded within the <use> Shadow tree should apply to elements
   within that Shadow tree.
   <>" This is
   pretty okay with the Shadow DOM spec and Chrome, Safari and Firefox add
   <style> elements within the shadow tree when its relevant. Unfortunately
   they do not apply the styles to the elements within the shadow tree! At
   that point I'm not sure if it's an implementation bug or if it's a subtle
   Shadow DOM spec corner case that requires some author magic to work. Any
   thought on this is welcome. (funny enough, and related to the first point,
   Chrome and Safari does NOT duplicate any paint server definition from a
   remote source within the shadow tree)

Last but not least, I haven't found any definition on the spec on how the
rendering should be done if a paint server cannot apply or fail to render.
Does that worth a bug spec or is it just me me who hasn't been able to find
the information?

I'll be glad to here your thought on this topic :)

Web :
Twitter : @JeremiePat <>

Received on Monday, 8 July 2019 13:22:49 UTC