In liquid, are there any possible ways to change what is rendered based on screen width
(similar to CSS media queries)?
For example, on desktop this would be the layout:
{% for item in items limit:5 %}
{{ item }}
{% endfor %}
But on mobile the layout would be:
{% for item in items limit:2 %}
{{ item }}
{% endfor %}
Usually I use two separate loops and then show/hide the output using css. Is there a different way to handle this?