Shopify themes, liquid, logos, and UX
I'm trying to change the layout of the feature columns on mobile from 3 to 2 wide.
It's currently set in CSS to
Welcome to the Shopify community!
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
@TaskerandShaw Please share your shop password so I can have a look
Please share your store front password!
Thanks!
You should not mess with definitions of classes like medium-up--one-third as these may be used somewhere else on your site and this change may brake that layout. (maybe does not really apply to your case as your rule applies to elements which has 3 classes at once, but first 2 of them are always used together anyway).
Instead, you should select proper classes that will apply at different screen widths.
medium-up--xxx classes apply at width 750px and up.
For screen widths less than 750 you should use small--xxx classes.
So, your collection element should look like:
<div class="grid__item medium-up--one-third text-center small--one-half">
which is actually a default'ish code for Debut theme.
You may see it defined in your collection-list.liquid Section like this:
...
{% case section.settings.grid %}
{% when 2 %}
{%- assign grid_item_width = 'medium-up--one-half' -%}
{% when 3 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-third' -%}
{% when 4 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-quarter' -%}
{% when 5 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-fifth' -%}
{% endcase %}
<div class="collection-grid">
<ul class="grid grid--uniform">
{% for block in section.blocks limit: section.blocks.size %}
<li class="grid__item {{ grid_item_width }}" {{ block.shopify_attributes }}>
...
If your code differs, you can always download a fresh copy of the theme from the theme store as a draft theme for reference. However, it may be a different version as Shopify does update their themes now and then...
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024