v4 - Error: $color: 'theme-color("primary")' is not a color for `darken'
See original GitHub issuei have switch to v4 instead of the alphav6
npm install bootstrap@4.0.0-beta
and when i compile i get
Error: $color: ‘theme-color(“primary”)’ is not a color for `darken’ on line 168 of sass/bootstrap/_variables.scss
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Bootstrap SCSS: $color: theme-color("primary") is not a color
The problem is the order in which you have imported the files. Please try this way and see if it works. First import...
Read more >Error: Failed to compile .scss file - $color - Board index
Error : $color: theme-color("primary") is not a color. * , * 179 | $link-hover-color: darken($link-color, 15%) !default; ...
Read more >Discover how to override theme colors in Bootstrap 5 using Sass
Bootstrap 5 utilizes both theme-color("primary") and $primary color defintions. This article details how to override and extend the ...
Read more >Theming Bootstrap
Customize Bootstrap 4 with our new built-in Sass variables for global style ... @function theme-color($key: "primary") { @return map-get($theme-colors, ...
Read more >theme-color - HTML: HyperText Markup Language | MDN
Image credit: from Icons & Browser Colors, created and shared by Google and used according to terms described in the Creative Commons 4.0...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
if you use a custom override … make sure its below functions";
@import “bootstrap/functions”; @import “bootstrap/custom”; @import “bootstrap/variables”;
i think thats what i did wrong. i was doing @import “bootstrap/custom”; @import “bootstrap/functions”; @import “bootstrap/variables”;
Lots of breaking changes from latest alpha to beta, as was to be expected and was the main reason for constantly holding off on pushing a beta.
Include the
_functions.scss
file if you haven’t yet and you’ll be good to go.