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

Change the the default CSS var declaration file to theme.liquid #520

Merged
merged 1 commit into from
May 2, 2018

Conversation

t-kelly
Copy link
Contributor

@t-kelly t-kelly commented May 1, 2018

What are you trying to accomplish with this PR?

We currently require users to create a snippets/css-variables.liquid file in order to use Slate out of the box. This file is used to declare CSS variables which are linked to Liquid variables.

This snippet is completely unnecessary, and the creation of a snippet should be left to the discretion of the theme developer. Let's default to using layout/theme.liquid as the file in which we search for CSS variable declarations.

To reverse this behaviour, developers can specify a snippet by declaring the following in their slate.config.js:


module.exports = {
  slateCssVarLoader: {
    cssVarLoaderLiquidPath: ['src/snippets/css-variables.liquid'];
  }
};

@t-kelly t-kelly merged commit 4b83ab4 into 1.x May 2, 2018
@t-kelly t-kelly deleted the change-default-css-var branch May 2, 2018 14:37
@mmorissette
Copy link
Contributor

Late to the game but good call @t-kelly 👍

@lock
Copy link

lock bot commented Oct 26, 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 Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants