<style>
    @media {% if min_width %}(min-width: {{min_width}}px){% endif %}{% if min_width and max_width %} and {% endif %}{% if max_width %}(max-width: {{max_width}}px){% endif %} {
        .{{prefix|default:"content-type"}}-{{content_type_id}} {
            background-image: url({{background_image}});
        }
    }

    {% if background_image_2x %}
        @media {% if min_width %}(min-width: {{min_width}}px) and{% endif %} {% if max_width %}(max-width: {{max_width}}px) and{% endif %} (-webkit-min-device-pixel-ratio: 1.3),
        {% if min_width %}(min-width: {{min_width}}px) and{% endif %} {% if max_width %}(max-width: {{max_width}}px) and{% endif %} (min-resolution: 120dpi) {
            .{{prefix|default:"content-type"}}-{{content_type_id}} {
                background-image: url({{background_image_2x}});
            }
        }
    {% endif %}
</style>
