-
Notifications
You must be signed in to change notification settings - Fork 383
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
Conversation
'code' => 'illegal_css_import_rule', | ||
'message' => __( 'CSS @import is currently disallowed.', 'amp' ), | ||
); | ||
$this->parse_import_stylesheet( $css_item ); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Also guard against infinite @import recursion
…pdate/1091-fetch_import_rules
…tion Kses corruption Also ensure that CSS parsed cache varies by get_validated_url_file_path errors.
Adds support for
@import
stylesheets. Local stylesheets are inlined, and external stylesheets are reported as sanitizeable validation errors.Fixes #1091.