Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scopeSubtree doesn't work on SVG elements #2407

Closed
ktiedt opened this issue Sep 3, 2015 · 6 comments
Closed

scopeSubtree doesn't work on SVG elements #2407

ktiedt opened this issue Sep 3, 2015 · 6 comments
Assignees
Labels

Comments

@ktiedt
Copy link
Contributor

ktiedt commented Sep 3, 2015

It appears that there are 2 code paths happening for style scoping... one here: https://github.com/Polymer/polymer/blob/master/src/standard/styling.html#L122 which does not treat SVG consistently due to the possibility that SVG elements can sometimes have .className == an SVGAnimatedString object... this will cause scopeSubtree to "skip" them since className = "new string" will just fail silently.

It seems the fix for #1490 should be expanded to be more generic to encompass all cases where styling my cross path with SVG elements.

Huge thanks to @arthurevans for helping track down why some SVG elements worked and others did not and still some did only under certain conditions.

Tagging @sorvell since the related fixes were primarily his work.

@sorvell sorvell self-assigned this Sep 4, 2015
@sorvell sorvell added the p1 label Sep 4, 2015
@ktiedt
Copy link
Contributor Author

ktiedt commented Sep 8, 2015

Is there by chance a rough ETA on when this might get fixed? Team lead will be asking for details in our next meeting, hoping to have something I can give them. Thanks!

@ktiedt
Copy link
Contributor Author

ktiedt commented Oct 23, 2015

Ping? still looking for any feedback here...

@arthurevans
Copy link

@sorvell @kevinpschaaf @sjmiles It seems like scopeSubtree should be using Polymer.StyleTransformer rather than going its own way...?

@dfreedm dfreedm assigned dfreedm and unassigned sorvell Nov 24, 2015
@dfreedm
Copy link
Member

dfreedm commented Nov 24, 2015

Is there a simple test case that I could include for the patch I'm writing?

@ktiedt
Copy link
Contributor Author

ktiedt commented Nov 24, 2015

A simple D3 chart inside an element would suffice, that is how I came across this problem. I can see about creating a demo if you aren't able to.

dfreedm added a commit that referenced this issue Nov 24, 2015
Fixes #2407

add test with dynamic svg elements
dfreedm added a commit that referenced this issue Nov 24, 2015
Fixes #2407

add test with dynamic svg elements

Test for fill-opacity, it doesn't get munged like color

Most browsers don't like CSS for sizing the circle :(
@arthurevans arthurevans changed the title SVG elements inconsistently get scoped scopeSubtree doesn't work on SVG elements Nov 25, 2015
@arthurevans
Copy link

retcon'ing bug title so it'll make more sense in the release notes. Because yes, I care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants