-
-
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
Deprecation warning (passing a number without unit) #39432
Comments
Thanks for opening this issue @miken32 @function opaque($background, $foreground) {
- @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
+ @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100%);
} For @function tint-color($color, $weight) {
@return mix(white, $color, $weight);
}
@function shade-color($color, $weight) {
@return mix(black, $color, $weight);
} My first feeling would be to keep that as-is. It seems more logical to have the exact same type of parameter as Sass itself. |
So I can just update my CSS to use % and it will work? Good to know; I’ll leave it to your team to decide whether to change anything or just update documentation. Thanks for the quick reply.
|
Yep, based on your example, you'll just have to use % in order to make disappear the warnings: .foo-warnings {
color: shift-color($success, 48);
background: shift-color($success, -72);
}
.foo-no-warnings {
color: shift-color($success, 48%);
background: shift-color($success, -72%);
}
This is something already mentioned in Customize > Sass > Colors with the following: .custom-element {
color: tint-color($primary, 10%);
}
.custom-element-2 {
color: shade-color($danger, 30%);
} But let's suggest a PR to add a |
Prerequisites
Describe the issue
Same issue as #37424 where the function is missing units, but problem is in
shade-color()
andtint-color()
instead ofopaque()
. Seems like the whole codebase should be searched for any uses ofmix()
without units.Reduced test cases
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
5.3.2
The text was updated successfully, but these errors were encountered: