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
When css_pipeline: true and css_rewrite: true, css files will be merged and minified and stored in /assets. Because of their new location, the urls referenced need to be rewritten.
Method Pipeline:cssRewrite() searches for strings like url('mystyle.css') or url(mystyle.css) and when found they will be rewritten into url('/user/themes/mytheme/css/mystyle.css') and url(/user/themes/mytheme/css/mystyle.css).
This will also work for imports like @import url('mystyle.css');.
Issue
However imports using syntax @import 'mystyle.css';, are equally valid, but are not found by the regex used. These import are not rewritten and therefor have an incorrect url. Because of this, the file will not be imported and an error will be thrown in the console of the browser.
When
css_pipeline: true
andcss_rewrite: true
, css files will be merged and minified and stored in /assets. Because of their new location, the urls referenced need to be rewritten.Method
Pipeline:cssRewrite()
searches for strings likeurl('mystyle.css')
orurl(mystyle.css)
and when found they will be rewritten intourl('/user/themes/mytheme/css/mystyle.css')
andurl(/user/themes/mytheme/css/mystyle.css)
.This will also work for imports like
@import url('mystyle.css');
.Issue
However imports using syntax
@import 'mystyle.css';
, are equally valid, but are not found by the regex used. These import are not rewritten and therefor have an incorrect url. Because of this, the file will not be imported and an error will be thrown in the console of the browser.A possible solution
See suggested changes in PR #3750
The text was updated successfully, but these errors were encountered: