From bc6be25c0df26223ed3dae878dce8dad3338ea4f Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sat, 23 Sep 2017 17:06:38 +0800 Subject: Add Importing SASS Docs --- docs/getting-started.html | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'docs/getting-started.html') diff --git a/docs/getting-started.html b/docs/getting-started.html index 0fb43ed..c0a3042 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -373,8 +373,39 @@
  • gulp watch - watch file changes and re-compile CSS files
  • +

    Importing SASS

    +
    +

    It is recommended to custom Spectre by importing SASS source files to your projects. In this way, you can keep Spectre up to date without conflicts, since Spectre code and your custom code are separate.

    + + + +
    // Example of project-name.scss
    +// Define variables to override default ones
    +$primary-color: #2e5bec;
    +$dark-color: #3e396b;
    +
    +// Import full Spectre source code
    +@import "node_modules/spectre.css/src/spectre";
    +
    + +

    Alternatively, you can create custom _variables.scss and import it to project-name.scss.

    + + +
    // Example of project-name.scss
    +@import "variables";
    +
    +// Import only the needed components
    +@import "node_modules/spectre.css/src/buttons";
    +@import "node_modules/spectre.css/src/forms";
    +
    + +
    -

    Folder Structure

    +

    Folder Structure

    spectre/
    -- 
    cgit v1.3.1-23-gd82d