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.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025