Disable Snipcart full-page cart

232 views Asked by At

Is it possible to disable Snipcart's full-page cart? I have set data-config-modal-style="side" like the docs says to but on smaller screens the cart still opens the full page-cart.

I don't want to have to design two different carts to look the same.

1

There are 1 answers

4
NeNaD On

It looks like they automatically switch to full-page view in small screens. What you can do is override that behavior with the same styles they are using for side-modal. Add this to your global css:

.snipcart-modal__container {
  width: 35% !important;
  max-width: 540px !important;
  margin-left: auto !important;
  right: 0 !important;
}

.snipcart-modal__container.snipcart-layout--large {
  width: 100% !important;
  max-width: 100% !important;
}

You can also remove data-config-modal-style="side" from HTML now, since you don't need it anymore.