body {
background-image: url(path/to/bg.png);
}
@media (max-width: 320px) {
body {
background-image: url(path/to/bg-sm.png);
}
}
The problem is the custom function processRelativeUrl is not called for the rules inside the @media block. Relative code is located here. It seems that rules inside @media block are not processed.
When the rule.type is media, it doesn't contain a property called declarations, so the rebase function is not called.
For example.
app.css:
The problem is the custom function
processRelativeUrl
is not called for the rules inside the@media
block. Relative code is located here. It seems that rules inside@media
block are not processed.When the
rule.type
ismedia
, it doesn't contain a property calleddeclarations
, so therebase
function is not called.ReworkCSS AST explorer http://iamdustan.com/reworkcss_ast_explorer/