All things Shopify and commerce
What's the best way to include CSS to sections so that they are rendered once no matter how may times the section is called on page in shopify dawn theme.
Hi @Ish-gera 👋 "best" is a beginners trap, context matters and every situation can be different.
Make the effort to communicate in concrete terms and explain goals and steps taken.
http://www.catb.org/~esr/faqs/smart-questions.html
In general for a singular use of small amounts of CSS use a global theme custom css setting:
https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css
In some themes use a custom-liquid/custom-html section/block in the header or footer to have CSS that can run for every page.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
To ensure CSS is only rendered once in the Shopify Dawn theme, add your custom styles to the "theme.css" file instead of inline styles within sections, and use unique class selectors for your section.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024