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

Font display doesn't handle styles with relative/invalid sourceURL comments #8534

Closed
patrickhulce opened this issue Apr 23, 2019 · 2 comments · Fixed by #8535
Closed

Font display doesn't handle styles with relative/invalid sourceURL comments #8534

patrickhulce opened this issue Apr 23, 2019 · 2 comments · Fixed by #8535
Assignees

Comments

@patrickhulce
Copy link
Collaborator

patrickhulce commented Apr 23, 2019

Provide the steps to reproduce

  1. Run LH on https://weston.ruter.net/

What is the current behavior?

Font display audit fails

What is the expected behavior?

Font display audit doesn't fail

I've traced this down to to the inline style which comes through with an invalid/relative source.header.sourceURL, this throws because it's not a valid URL and we don't end up whitelisting the font URL.

Related issues
#7708 (comment)

@westonruter
Copy link

@patrickhulce The source URL is coming from the last line of style[amp-custom]:

/*# sourceURL=amp-custom.css */

This was put in place based on a tip from @paulirish, as without it the CSS in the style element fails to appear in Coverage.

@patrickhulce
Copy link
Collaborator Author

Ohhhhh, that makes way more sense I missed that 😆

Thanks @westonruter!

@patrickhulce patrickhulce changed the title Font display doesn't handle <style custom-name> styles Font display doesn't handle styles with relative/invalid sourceURL comments Apr 23, 2019
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.

3 participants