Seems I can't use source set to switch out a background image (which happens to be from a file grid) So can't use this code
The issue is in parsing. I need to do something like this:
@media screen and (max-width: 440px) {
.banner {background-image: url('{banner_dual:banner_long}');
}
@media screen and (min-width: 441px) {
.banner {background-image: url('{banner_dual:banner_short}');
}
But my templates calls the stylesheet before the template can parse it. Since it's dynamic i can't add the query in the stylesheet.
<!doctype html>
<html lang="en">
{exp:channel:entries channel="home"}
<head>
<meta...
<style>
{styles}
</style>
</head>
<body>
{banner_dual}
<div class="banner rtf" style="background-image: url('{banner_dual:banner_long}')">
{/banner_dual}
Any ideas how to solve this?