Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

slate v1.0.0-beta.10 injecting liquid into injected CSS on yarn start and watch. #834

Closed
allanarmstrong opened this issue Oct 16, 2018 · 3 comments
Assignees

Comments

@allanarmstrong
Copy link

Problem

Updating to slate v1.0.0-beta.10 causes an issue where the injected CSS isn't falling back to the CSS variable but is being swapped out for the liquid tag.

Example:
on slate v1.0.0-beta.9 the injected CSS looks like

body, html {
    color: var(--color-body-text);
    background-color: var(--color-body);
    font-family: var(--body-font-stack);
    ...
}

on slate v1.0.0-beta.10 the injected CSS is

body, html {
    color: {{ settings.color_body_text }};
    background-color: {{ settings.color_body }};
    font-family: {{ settings.body_font_stack}};
    ...
}

It seems to be an issue where yarn start seems to trigger a "deployment" SCSS compilation which swaps the CSS variables for their liquid values.
This causes the CSS to break and not render correctly in `yarn start` or `yarn watch`

Replication steps

Update your @shopify/slate-tools line in your package.json to "@shopify/slate-tools": ">=1.0.0-beta.10",

More Information

Simply reverting back to slate v1.0.0-beta.9 does not seem to fix this error for the current theme. To fix this I had to duplicate a new theme and do a yarn start. This seemed to fix the issue.

@t-kelly t-kelly self-assigned this Oct 16, 2018
@t-kelly
Copy link
Contributor

t-kelly commented Oct 16, 2018

Thanks @allanarmstrong -- on it!

@t-kelly
Copy link
Contributor

t-kelly commented Oct 16, 2018

Fixed and released in Beta 11

@lock
Copy link

lock bot commented Nov 15, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants