-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Syntax Error: $color: shift-color(#2976af, 20%) is not a color
#38687
Comments
Note that this issue doesn't exists in 5.2.3. |
Thanks for opening this issue @palmtown |
Syntax Error: $color: shift-color(#2976af, 20%) is not a color
Syntax Error: $color: shift-color(#2976af, 20%) is not a color
$color: shift-color(#2976af, 20%) is not a color
I have all these errors too that broke my app, I don't understand |
Are you missing some file imports? I feel like this is the missing |
I have that already imported, the app worked but with this update, I had the error of some variables missing variables-dark file. I imported that file and it solved the problem but now I have this same error of: $color: shift-color(#2976af, 20%) is not a color |
Same experience which I opened an issue at #38687 |
I've had the same issue stemming from an update in |
In v5.2.3, here was the definition of this variable: bootstrap/scss/_variables.scss Line 1370 in cb02143
In v5.3.0, it is now: bootstrap/scss/_variables.scss Line 1472 in 60098ac
In your source code, there's The change of definition of It can be tested easily with: $test: rgba($white, 0.85);
@debug(alpha($test));
@debug(alpha($toast-background-color)); // Only this one fails during Sass compilation This is a first quick analysis, but Bootstrap's dark mode implementation relies a lot on custom properties in |
Do you perhaps have a temporary fix solution that I can use while I try to comprehend the purpose of the custom scss? |
I think this is safe to close out for now without seeing more live demos and details. |
@mdo I just had an issue where I was trying to set Kept getting an error where it told me that was not a color. When I attempted the following, it works.
It would appear to me that a function return can't be returned to a variable. |
Just tried it and it doesn't seem to be a problem: Sass compilation is fine. Please don't forget to create reproducible environments for us via Stackblitz (or any other tools) so we can help. |
Despite it is too late for a solution, the arbitrary introduction of to-rgb asumming that every color in maps is always defined as hex, has broke every custom implementation of bs5 where users (like me) took advantage of css variables for colors like I understand the fact that out of the box it works, but at least make mandatory that every color defined in bootstrap must be hex and devs will implement our customizations in a different way. |
i think check your initializationn css file keep boostap imports at the top of rest css imports
|
Are there solution for this? |
Prerequisites
Describe the issue
When upgrading to version 5.3.0, I get the error "Syntax Error: $color: shift-color(#2976af, 20%) is not a color."
Reduced test cases
none.
What operating system(s) are you seeing the problem on?
Windows, Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox, Microsoft Edge
What version of Bootstrap are you using?
5.3.0
The text was updated successfully, but these errors were encountered: