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

Creating a JSASS Style Guide for Chassis #135

Open
sfrisk opened this issue Nov 3, 2015 · 4 comments
Open

Creating a JSASS Style Guide for Chassis #135

sfrisk opened this issue Nov 3, 2015 · 4 comments

Comments

@sfrisk
Copy link
Contributor

sfrisk commented Nov 3, 2015

With the work on the Buttons PR #97 and the Typography Variable Refactoring PR #134, it has become obvious that we need to create a style guide for how to best handle JSASS variables in Chassis, including naming conventions, and when to group variables under a larger object. Lets use this issue as a starting point for best practices we want to follow.

For example, a good practice to include is probably to group variables that belong to the same element together. Also we should have some consistency between using camel case for variables or dashes. If anyone else can think of anything else requiring consistency that we should address, please add it here.

@sfrisk
Copy link
Contributor Author

sfrisk commented Nov 10, 2015

Paraphrasing today's discussion in the weekly Chassis Meeting: SASS style guide will mention that we use JSASS variables instead of traditional SCSS Variables, then link to the information for JSASS. Also it would be useful to have some explanation on how JSASS works and integrating it with your development process.

@geekman-rohit
Copy link
Contributor

Also there should be a guideline as to when to use a map instead of simple variables, at least some small guideline or suggestion if not as a rule.

@geekman-rohit
Copy link
Contributor

Discussion in Meeting on Tuesday 1 march.

  1. All scss variables and map keys defined in .js files for jsass should be double quoted.
  2. scss variables to be hyphen-separated for multiple words and not camelCased

So

Right 👍

"font": {
        name: "Type Style",
        value: {
            "color": "red",
            "font-size": "12px"
        }
    }

Wrong 👎

font: {
        name: "Type Style",
        value: {
            color: "red",
            fontSize: "12px"

        }
    }

@sfrisk
Copy link
Contributor Author

sfrisk commented Mar 29, 2016

JSASS docs: https://github.com/arschmitz/jsass-vars

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants