我已在 Shopify > 设置 > 品牌中设置了品牌主色
我会在 custom.css 中使用这种颜色。
有没有办法做到这一点(我不想在CSS中硬编码颜色)?
在
.css.liquid
.container { background: {{ shop.brand.colors.primary[0].background }}; }
它将编译为:
.container { background: #0b101f; }
有关包含品牌资产,特别是颜色的更多文档: