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 (local) stylesheets with @import instead of removing #1181

merged 8 commits into from May 30, 2018


None yet
2 participants
Copy link

miina commented May 29, 2018

Adds support for @import stylesheets. Local stylesheets are inlined, and external stylesheets are reported as sanitizeable validation errors.

Fixes #1091.

'code' => 'illegal_css_import_rule',
'message' => __( 'CSS @import is currently disallowed.', 'amp' ),
$this->parse_import_stylesheet( $css_item );

This comment has been minimized.

Copy link

miina May 29, 2018

Author Collaborator

@westonruter Still WIP but started adding the support for @imported stylesheets, any thought on the approach?

This comment has been minimized.

Copy link

westonruter May 29, 2018


Yes, your approach is great. I went ahead and iterated on it because of the changes introduced by the refactored error validation handling.

westonruter added some commits May 29, 2018

Fix construction of validation preview URL; prevent JSON term descrip…
…tion Kses corruption

Also ensure that CSS parsed cache varies by get_validated_url_file_path errors.

@westonruter westonruter added this to the v1.0 milestone May 29, 2018

@westonruter westonruter changed the title [WIP] Fetch stylesheets with @import instead of removing. Fetch (local) stylesheets with @import instead of removing May 30, 2018

@westonruter westonruter merged commit 6ec7e1b into develop May 30, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@westonruter westonruter deleted the update/1091-fetch_import_rules branch May 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.