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

color warning in _root.scss on heroku deploy #130

Closed
m5o opened this issue Dec 14, 2017 · 3 comments
Closed

color warning in _root.scss on heroku deploy #130

m5o opened this issue Dec 14, 2017 · 3 comments

Comments

@m5o
Copy link

m5o commented Dec 14, 2017

scss/_root.scss is generate this warning for each iteration of $colors.
Example from a heroku deploy output.

remote:        Using sass 3.5.2
remote:        Using sass-rails 5.0.6
…
remote:        W, [2017-12-14T15:26:15.622115 #401]  WARN -- : WARNING on line 4, column 7 of /tmp/build_7b[…]3/vendor/bundle/ruby/2.4.0/gems/bootstrap-4.0.0.beta2/assets/stylesheets/bootstrap/_root.scss:
remote:        You probably don't mean to use the color value `blue' in interpolation here.
remote:        It may end up represented as #0000ff, which will likely produce invalid CSS.
remote:        Always quote color names when using them as strings (for example, "blue").
remote:        If you really want to use the color value here, use `"" + $color'.
remote:        W, [2017-12-14T15:26:15.622271 #401]  WARN -- : WARNING on line 4, column 7 of /tmp/build_7b[…]3/vendor/bundle/ruby/2.4.0/gems/bootstrap-4.0.0.beta2/assets/stylesheets/bootstrap/_root.scss:
remote:        You probably don't mean to use the color value `indigo' in interpolation here.
remote:        It may end up represented as #4b0082, which will likely produce invalid CSS.
remote:        Always quote color names when using them as strings (for example, "indigo").
remote:        If you really want to use the color value here, use `"" + $color'.
…
Reference

🔗 twbs/bootstrap#24354
🔗 twbs/bootstrap#24549 (comment) – possible fix

@m5o
Copy link
Author

m5o commented Dec 16, 2017

🔗 twbs/bootstrap#24549 (comment) - possible fix

🔔 @glebm Is the fix useful?

m5o added a commit to m5o/bootstrap that referenced this issue Dec 17, 2017
* fix from twbs#24549 (comment)

```
WARNING on line 4, column 7 of gems/bootstrap-4.0.0.beta2/assets/stylesheets/bootstrap/_root.scss:
You probably don't mean to use the color value `blue' in interpolation here.
It may end up represented as #0000ff, which will likely produce invalid CSS.
Always quote color names when using them as strings (for example, "blue").
If you really want to use the color value here, use `"" + $color'.
```

:link: twbs/bootstrap-rubygem#130
@glebm
Copy link
Member

glebm commented Dec 23, 2017

@m5o Does this warning also happen on Sass v3.5.4?

@m5o
Copy link
Author

m5o commented Dec 23, 2017

@m5o Does this warning also happen on Sass v3.5.4?

Couldn't get it reproduced with v3.5.4 on a heroku deploy

In a different project of mine, it's still present… ok found the issue.
The project variables didn't catch up latest syntax:

-$colors: () !default;
-$colors: map-merge((
-  blue:         $blue,
-  indigo:       $indigo,
-  purple:       $purple,
-  pink:         $pink,
-  red:          $red,
[…]
+$colors: () !default;
+$colors: map-merge((
+  "blue":         $blue,
+  "indigo":       $indigo,
+  "purple":       $purple,
+  "pink":         $pink,
[…]

Sorry, my mistake! Problem solved ☑️

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

No branches or pull requests

2 participants