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
merged 8 commits into from
May 30, 2018

Conversation

miina
Copy link
Contributor

@miina 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 );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@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
@westonruter westonruter deleted the update/1091-fetch_import_rules branch May 30, 2018 01:23
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

Successfully merging this pull request may close these issues.

2 participants