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

> Reference context dependence can be avoided with some re-thinking of CSS. However utilizing context-based styling is very powerful because you can make things automatically look entirely (or slightly) different, with minimal CSS - or at least you could, but now it would require much duplication with the same CSS, not merely re-arranging it.

Indeed. When I said that it's impossible that was not quite right — but the absence of reference styling does / could mean significant refactoring, the need to remember the constraints the document needs to follow at some point in the future, and more JS to manage complex trees.  

> using Element.currentStyle would be the inroad to that support

This is an interesting idea I hadn't thought of! Though in addition to potential overhead, that overhead would grow over time from just a few users to every user as more agents implemented SVG2...

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

Received on Tuesday, 9 June 2020 01:30:19 UTC