Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve colors #167

Open
hagenburger opened this issue Aug 16, 2015 · 0 comments
Open

Improve colors #167

hagenburger opened this issue Aug 16, 2015 · 0 comments

Comments

@hagenburger
Copy link
Member

1. Import from Sass file

_colors.scss:

$my-red: red;
$my-green: green;
$my-blue: blue;

_colors.lsg:

@colors colors.scss

Result should be the same as:

@colors {
  $my-red $my-green $my-blue
}

2. Import from Sass file with same basename

_colors.scss:

$my-red: red;
$my-green: green;
$my-blue: blue;

_colors.lsg:

@colors

Result should be the same as:

@colors {
  $my-red $my-green $my-blue
}

3. Import from Sass file with empty lines

_colors.scss:

$my-red: red;
$my-green: green;

$my-blue: blue;

_colors.lsg:

@colors colors.scss

Result should be the same as:

@colors {
  $my-red   $my-green
  $my-blue  -
}

4. Import from Sass file with comments

_colors.scss:

//# Primary colors

$my-red: red;
$my-green: green;

//# Secondary colors

$my-blue: blue;

_colors.lsg:

@colors colors.scss

Result should be the same as:

# Primary colors

@colors {
  $my-red $my-green
}

# Secondary colors

@colors {
  $my-blue  -
}

Implementation details

  • If the @color command gets an argument representing this file, it must also be imported to the SCSS stream (same as @scss file.scss does).
  • If both—the filename and the block—are defined: The file gets imported, but the block is used instead of parsing the file for variables.
  • The filename could also be a glob.
  • It must work with SCSS and Sass’ indented syntax.
  • If possible, only color variables should be displayed (this might be tricky).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant