我在 Slate 的 layout.scss liquid 文件中的 style/globals 中有以下语句。
{% if template == 'index' %}
h1 {
color: yellow;
}
{% endif %}
但是,该属性不起作用。如果我在 dist 文件夹中查看已编译的 theme.scss.liquid 文件,代码与上面相同。 我做错了什么?
最佳答案
像今天一样,您不能在 slate 的 SCSS 文件中使用流式语法。
关于css - 液体 SCSS 文件中的 if 语句 (Slate/Shopify),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46720787/