-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Adding Polymer to a page causes Typekit fonts to break #408
Comments
Sorry, clicked the wrong button. This is still a problem! |
For the record, you must load In this case, loading |
Interestingly removing Bootstrap's CSS also seems to fix the problem. (And thanks for the tip about loading order.) |
The bootstrap css seems to break the typekit all by itself (without |
@sjmiles Is http://jsbin.com/UnURIwIT/2/edit the right link? It doesn't have any Bootstrap, but it doesn't have any Typekit on it either. |
Looking through the network tab in Chrome, the broken version loads Twitter's Bootstrap CSS twice, as does a version with only So, I'm wondering if the breakage is due to:
So the reason Typekit's fonts load without Twitter Bootstrap is that (1) and (5) never happen. Perhaps I can fix this by making sure Typekit only kicks in after |
Sorry, the correct link is here: http://jsbin.com/UbufOFOK/2/edit On Wed, Jan 29, 2014 at 1:35 AM, Michael Stillwell <[email protected]
|
Interesting, that's problematic for me as well. So perhaps there's something that causes the Typekit JS to go wrong in some circumstances, and Polymer's tickling this bug. I've logged a ticket with Typekit, will update this issue when they get back to me. /cc @bramstein |
All the variations have confused me at this point, so forgive me.
When I include bootstrap.css, whether using any Polymer stuff or not, there When I remove bootstrap.css, whether using any Polymer stuff of not, there Where is the case where Polymer is causing a problem by itself? Scott On Wed, Jan 29, 2014 at 9:18 AM, Michael Stillwell <[email protected]
|
Yes I think both |
I just had a quick look at this, and this isn't really a bug, nor is anything broken. The Typekit fonts are loaded correctly, they're just overwritten by another stylesheet with a higher specificity than the Typekit styles (which are user defined in this case.) Fixing the specificity should make the fonts display. What worries me a little is that something is making a XHR request to fetch the CSS inserted by the Typekit JavaScript, which fails due with an Access Control error (as it should). |
@bramstein Thank-you, I think you're right--the example with So we're back to the question of why adding Polymer to a page changes its appearance. I'm suspicious of HTMLImports! |
The problem with HTMLImports is fixed in googlearchive/HTMLImports@5297e25; as of this commit it no longer re-applies linked CSS files. This didn't make it into the 0.1.4 release but I guess it will make it to 0.1.5? |
@sjmiles Thanks for looking into this! |
Just to confirm: the problem is fixed in Polymer 0.2.0. |
For some reason, simply adding
platform.js
andpolymer.js
to an HTML page breaks Typekit fonts.Note that because of Typekit's policies, custom fonts will only appear on
jsbin.com
,localhost
, and a few other domains. I can add additional domains if necessary.Also, it's not JS Bin's JavaScript that's causing the problem; the same bug occurs on a completely static domain—with, without.
The text was updated successfully, but these errors were encountered: