Closed james-prado closed 5 years ago
I'm unable to access settings from my .scss.liquid files
settings
.scss.liquid
theme.scss
@charset 'UTF-8'; @import './variables.scss.liquid';
body { background-color: $primary_color; }
- `variables.scss.liquid`:
$primary_color: #{'{{ settings.primary_color }}'}
Error:
Failed to compile.
./styles/theme.scss (../node_modules/css-loader??ref--10-1!../node_modules/postcss-loader/lib??postcss!../node_modules/sass-loader/lib/loader.js??ref--10-3!./styles/theme.scss) Module build failed (from ../node_modules/postcss-loader/lib/index.js): Syntax Error
(396:24) Unknown word
394 | 395 | body {
396 | background-color: {{ settings.primary_color }}; } | ^ 397 |
@ ./styles/theme.scss 2:14-201 21:1-42:3 22:19-206 @ ./scripts/layout/theme.js @ multi ../node_modules/@shopify/slate-tools/tools/webpack/hot-client.js ./scripts/layout/theme.js
### More Information [Slate v1.0.0-beta.14 ](https://www.npmjs.com/package/create-slate-theme/v/1.0.0-beta.14)
nvm, I'm importing the liquid file, not the .scss.css file
.scss.css
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Problem
I'm unable to access
settings
from my.scss.liquid
filesReplication steps
theme.scss
:body { background-color: $primary_color; }
$primary_color: #{'{{ settings.primary_color }}'}
Failed to compile.
./styles/theme.scss (../node_modules/css-loader??ref--10-1!../node_modules/postcss-loader/lib??postcss!../node_modules/sass-loader/lib/loader.js??ref--10-3!./styles/theme.scss) Module build failed (from ../node_modules/postcss-loader/lib/index.js): Syntax Error
(396:24) Unknown word
394 | 395 | body {
@ ./styles/theme.scss 2:14-201 21:1-42:3 22:19-206 @ ./scripts/layout/theme.js @ multi ../node_modules/@shopify/slate-tools/tools/webpack/hot-client.js ./scripts/layout/theme.js