You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, there is no reason why we have to do this (note the @todo's related to this in the style sanitizer). We can instead rather fetch the contents of the @import'ed stylesheet as we're doing for external stylesheets loaded form link tags:
It is import-ant to support @import because it used to be the recommended way for child themes to include the style.css from the parent theme.
Note that we can also support loading @import'ed stylesheets from external domains (and not the filesystem) which will also be done for link tags in #1083.
The text was updated successfully, but these errors were encountered:
When an
@import
rule is encountered in a stylesheet it is currently getting, it is currently getting deleted because it is not valid AMP:https://github.com/Automattic/amp-wp/blob/31016b1cc92f8a2e3b75f57dac034b76efafda2e/includes/sanitizers/class-amp-style-sanitizer.php#L692-L697
However, there is no reason why we have to do this (note the
@todo
's related to this in the style sanitizer). We can instead rather fetch the contents of the@import
'ed stylesheet as we're doing for external stylesheets loaded formlink
tags:https://github.com/Automattic/amp-wp/blob/31016b1cc92f8a2e3b75f57dac034b76efafda2e/includes/sanitizers/class-amp-style-sanitizer.php#L440-L456
It is import-ant to support
@import
because it used to be the recommended way for child themes to include thestyle.css
from the parent theme.Note that we can also support loading
@import
'ed stylesheets from external domains (and not the filesystem) which will also be done forlink
tags in #1083.The text was updated successfully, but these errors were encountered: