e1commerce.com
Ask a question
  • New questions
  • With the answers
  • Unanswered
  1. Home
  2. html - Timber Shopify Theme Push/Pull columns based on screen size

880 votes
1 answers

html - Timber Shopify Theme Push/Pull columns based on screen size

Been stuck on this shopify html template that's using the Timber CSS framework. https://github.com/Shopify/Timber/blob/master/assets/timber.scss.liquid (https://github.com/Shopify/Timber/blob/master/assets/timber.scss.liquid)

I need to swap two divs with the class

grid__item

if the user is on a mobile device.

Below is the code that I have. I have no idea on how to make the swap. I believe bootstrap refers to this as push/pull?

<div class="grid">
  <div class="grid__item one-half medium-down--one-whole">1</div>
  <div class="grid__item one-half medium-down--one-whole">2</div>
</div>

Undefined asked
2022-03-19


435
votes

Answer

Solution:

Timber has options for push and pull

https://github.com/Shopify/Timber/blob/master/assets/timber.scss.liquid#L38 (https://github.com/Shopify/Timber/blob/master/assets/timber.scss.liquid#L38)

So, to achieve the order change on mobile you should or put the items reversed in markup for desktop dopush and pull, or useflexbox adding custom styles in .scss files of your theme

Undefined answered
2022-03-19
Link to answer


Source

Didn't find the answer?

Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Similar questions

Find the answer in similar questions on our website.

709 reactjs - Pull shopify image files
600 liquid - Shopify having trouble adding an additional style sheet in older prestige theme
619 Concatenate string with html in liquid Shopify
969 Shopify Graphql how to get available products for specific collection based on location
281 How to migrate shopify theme app extension from cli 2.0 to cli 3.0?
700 Updating product properties before adding to cart - shopify theme app extension
171 javascript - Shopify Theme App Extension - Fetch Data from my Apps API
232 express - 404 error calling GET API from a shopify theme-extension
401 Shopify Custom Message In Order Confirmation Email Based On Product Title
992 How To Access Custom App API From Theme App Extension in Shopify?

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.







Latest questions:

934 Get product description with metafield in shopify

357 html - CSS animation looks wrong/broken in some places on iOS devices only?

861 Shopify refund amount wrong when refund in pending state (Admin REST API)

847 How to Add Fonts to the Shopify Admin

839 css selectors - Custom font for specific language shopify



© 2021-2023

E-mail: infot@e1commerce.com