Closed ghost closed 5 years ago
This might be another documentation issue @mikewink. cartSnippet
can take three arguments: includejQuery
boolean, onload
string added as a value to the script's onload
property, and that includeStyles
boolean. If includeStyles
is true, <link href="https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css" rel="stylesheet" type="text/css" />
will rendered immediately below the script tag.
If that makes sense I'll just update the docs!
Ahh makes total sense. Thank you, Matt. :)
Heads up @mikewink: I'm going to change the includeStyles
default so that the base stylesheet is included. This should make initial setup more intuitive, as most will probably want to have a look at the cart before customizing it.
Updated in 1.0.5 and noted in the updated docs.
I'm also pretty sure I didn't forget any commas this time. :)
Hello Matt,
I'm integrating the
cartSnippet
into my templates, but it's missing the styles. In yourcart-js.twig
I can see{% if includeStyles -%}
, but how and where would I trigger this so that the CSS gets loaded/not loaded?I can read in the docs that
cartSnippet(false)
suppresses jQuery. Is there another parameter dealing with Snipcart styles?Best regards Mike