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

Colors will not work if the color variable has an underscore #175

Closed
ghost opened this Issue Sep 9, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented Sep 9, 2015

When variable names have an underscore, only the name is parsed and displayed using Colors.
screen shot 2015-09-09 at 2 44 53 pm

@anxhe

This comment has been minimized.

Member

anxhe commented Oct 13, 2015

Hi @cb-josh-c could you provide the code for this example? I can't reproduce it :

  • This is my sass file

    $red_prueba: #AA3939;
    $black: black;
    
  • And this is my lsg code:

    @colors:
      - - - - -
      - - $black $red_prueba  -
    

Result:

@ghost

This comment has been minimized.

ghost commented Oct 13, 2015

Yeah, no problem.
In my sass file:
$error_red: #B22828;

And in my .md file:
@colors:
$error_red

And when I change $error_red to our main red variable, $red, it works.
screen shot 2015-10-13 at 9 04 20 am
screen shot 2015-10-13 at 9 04 31 am

@anxhe

This comment has been minimized.

Member

anxhe commented Oct 14, 2015

Thank you , I have tried to reproduce the error with your example but I can't reproduce it. Could you tell me which version do you use?

@ghost

This comment has been minimized.

ghost commented Oct 14, 2015

I am using version 1.2.2 with rails 4.2.3

@ghost

This comment has been minimized.

ghost commented Nov 5, 2015

Awesome, thanks.

@hagenburger

This comment has been minimized.

Member

hagenburger commented Nov 5, 2015

Was tricky, god catch ;) I’ll release it asap.

svanhess added a commit to NavigatingCancer/livingstyleguide that referenced this issue Jan 22, 2016

fixes livingstyleguide#175 variables with underscore
Internally Sass stores all variables using a dash instead of an
underscore. By using Sass to look up variables, the name got converted
automatically when creating the CSS for displaying the variables. This
is solved by using the class name for the variable with an underscore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment