Re: [svgwg] SVG2 spec means elements within a <use> tag can not be targeted for styling

Thanks @peter-mouland and @dholbert.  This seems like a possible work-around and is much appreciated!!  We'll give it a shot to see if we can get our site working in Firefox again.

It's a bit counter-intuitive that this would work given that you're essentially using the selectors of the object to style the clone by passing through intermediate variables styled on the clone root.  In essence we're dodging the boundary rule by sliding in on a custom style on the object.  The clone still needs to access the selectors to know how to draw itself. And if it can do that, it seems like we should be able to use CSS in all its generality.

The workaround is a painful way to work.  Now, for every attribute you might want to style (= number of SVG sub-elements S x number of styled properties P), you need to create a variable in your template.  For all but the most trivial examples, S and P grow very large very quickly.  

It's far easier to specify selectors that cross the boundary  (SVG 1) than trying to manage a flat namespace of everything you might want to modify (SVG 2 with clever workaround).

-- 
GitHub Notification of comment by markofca
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/367#issuecomment-350520178 using your GitHub account

Received on Sunday, 10 December 2017 02:19:16 UTC