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

dom-repeat causes mixins in custom-style not to be rewritten. #4521

Closed
2 of 3 tasks
bicknellr opened this issue Apr 10, 2017 · 3 comments · Fixed by #4525
Closed
2 of 3 tasks

dom-repeat causes mixins in custom-style not to be rewritten. #4521

bicknellr opened this issue Apr 10, 2017 · 3 comments · Fixed by #4525
Assignees

Comments

@bicknellr
Copy link
Member

Description

A dom-repeat with no content in this particular place in this document causes CSS mixins in the document not to be rewritten into plain CSS variables.

Live Demo

http://plnkr.co/edit/py2cAnXP7sT0rrZlgK2o?p=preview

Steps to Reproduce

I don't know how to reproduce this other than with the above demo.

Expected Results

The CSS mixins are always rewritten.

Actual Results

The CSS mixins are not rewritten on the page in that demo with the dom-repeat.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 10
    (I didn't test others.)

Versions

  • Polymer: v2.0.0-rc.3
  • webcomponents: v1.0.0-rc.7
@bicknellr
Copy link
Member Author

cc @azakus

@dfreedm
Copy link
Member

dfreedm commented Apr 10, 2017

Need to investigate if this belongs in Polymer or ShadyCSS

@dfreedm
Copy link
Member

dfreedm commented Apr 11, 2017

Looks like dom-repeat and dom-if can call into ShadyCSS before the dependencies for custom-style have loaded.

However, elements that don't have a template like dom-repeat don't need to try styling themselves, so the simplest fix is to just ensure that only elements with template call into ShadyCSS.

dfreedm added a commit that referenced this issue Apr 11, 2017
dom-repeat and/or dom-if booting before custom-style is registered
can break the complicated loading strategy of ShadyCSS.

By only calling ShadyCSS for elements with templates, we both fix this
issue and improve performance for template-less element booting

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

Successfully merging a pull request may close this issue.

2 participants