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

Polymer (inline styling) inconsistent between Chrome and Firefox #1172

Closed
jstncno opened this issue Feb 6, 2015 · 3 comments
Closed

Polymer (inline styling) inconsistent between Chrome and Firefox #1172

jstncno opened this issue Feb 6, 2015 · 3 comments

Comments

@jstncno
Copy link

jstncno commented Feb 6, 2015

Hi,

I'm having issues with Polymer in Firefox 35. The elements are there, but trying to position and style them with inline CSS causes inconsistencies with Chrome, and the elements are all out of place. I also get a warning message in FF coming from upgrade.js:

mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
@jstncno jstncno changed the title Polymer (inline styling) inconsisten between Chrome and Firefox Polymer (inline styling) inconsistent between Chrome and Firefox Feb 6, 2015
@robdodson
Copy link
Contributor

It's hard to know what the exact issue is without seeing your code. Keep in mind that Shadow DOM scoping does to work in Firefox so your styles may be having unwanted side effects.

The warning about modifying Prototype is a known issue. I don't think there's anything we can do about it.

@jstncno
Copy link
Author

jstncno commented Feb 12, 2015

Hi @robdodson thanks for responding, I didn't realize how Firefox was treating the Shadow DOM. Just to be clear - scoping does not work in Firefox? Thanks again

@robdodson
Copy link
Contributor

Correct. CSS scoping does not work in Firefox, Safari or IE. Firefox has said they are planning to ship Shadow DOM so hopefully that will be resolved soon, but the case remains for Safari and IE. Unfortunately it's impossible to polyfill CSS in that way.

You do get proper Shadow DOM encapsulation with DOM API methods in all browsers. For example, you shouldn't be able to getElementById if it's inside someone else's Shadow DOM.

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

No branches or pull requests

2 participants