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

Fetch CSS over HTTP when URL lacks extension; convert font CDN stylesheets @imports to convert to links instead of fetching #1357

merged 3 commits into from Aug 27, 2018


Copy link

@westonruter westonruter commented Aug 25, 2018

If there is a stylesheet link with a URL which does not end in css, fetch it over HTTP instead of throwing a validation error.

Additionally, if there is a stylesheet that contains an @import to a stylesheet URL which is whitelisted CDN for fonts such as:

@import "";

Then instead of fetching the CSS to inline, opt instead to convert into a normal link tag:

<link rel="stylesheet" href="">

Fixes #1317

@westonruter westonruter added this to the v1.0 milestone Aug 25, 2018
@westonruter westonruter changed the title [WIP] Convert font CDN stylesheets @imports to convert to links; allow fetch external CSS without extensions Fetch CSS over HTTP when URL lacks extension; convert font CDN stylesheets @imports to convert to links instead of fetching Aug 25, 2018
Copy link

@hellofromtonya hellofromtonya left a comment

Looks good. Great job @westonruter

@hellofromtonya hellofromtonya added this to Ready for QA in v1.0 Aug 27, 2018
@westonruter westonruter merged commit a6f8eae into develop Aug 27, 2018
2 checks passed
@westonruter westonruter deleted the fix/external-stylesheet-imports branch Aug 27, 2018
Copy link
Member Author

@westonruter westonruter commented Sep 5, 2018

See also Automattic/nginx-http-concat#41 which would bypasse VIP's http-concat for CSS when is_amp_endpoint(). Having this in place will improve the AMP integration yet further, as it would eliminate redundant and unnecessary work.

Copy link

@kienstra kienstra commented Sep 18, 2018

Moving To 'Ready For Merging'

If it's alright, I'm moving this to 'Ready For Merging,' as I don't think it needs functional testing. Feel free to move it back.

@kienstra kienstra moved this from Ready for QA to Ready for Merging in v1.0 Sep 18, 2018
@kienstra kienstra moved this from Ready for Merging to In Production in v1.0 Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No open projects
In Production
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants