I am referring to https://shopify.dev/themes/architecture/sections/section-assets#stylesheet
The styles defined with {% stylesheet %} are showing up on the live website but not on the theme editor (design mode).
I did a simple test by changing the font size of a header. See screenshot.
I think it is a bug of shopify theme editor - it is not loading compiled_assets/styles.css which is generated by {% stylesheet %}
The workaround are:
-
Move the styles to styles.css.liquid
This is not preferred because it will blow up the size of the styles.css.liquid. It should be loaded only when the section is loaded on the template. -
use {% style %} instead of {% stylesheet %}
Using inline style will also affect the page performance when more than two sections are used on the same page.
Basically the same style is loaded twice. Not preferred too.
Wonder if you guys noticed the same issue? Or is it just me?


