Skip to content

Deprecation warning (passing a number without unit) #39432

Description

@miken32

Prerequisites

Describe the issue

Same issue as #37424 where the function is missing units, but problem is in shade-color() and tint-color() instead of opaque(). Seems like the whole codebase should be searched for any uses of mix() without units.

Deprecation Warning: $weight: Passing a number without unit % (48) is deprecated.

To preserve current behavior: $weight * 1%

More info: https://sass-lang.com/d/function-units

    ╷
212 │   @return mix(black, $color, $weight);
    │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/bootstrap/scss/_functions.scss 212:11  shade-color()
    node_modules/bootstrap/scss/_functions.scss 217:27  shift-color()
    resources/sass/app.scss 172:12                 root stylesheet

Deprecation Warning: $weight: Passing a number without unit % (72) is deprecated.

To preserve current behavior: $weight * 1%

More info: https://sass-lang.com/d/function-units

    ╷
207 │   @return mix(white, $color, $weight);
    │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/bootstrap/scss/_functions.scss 207:11  tint-color()
    node_modules/bootstrap/scss/_functions.scss 217:57  shift-color()
    resources/sass/app.scss 173:17                 root stylesheet

Reduced test cases

div.foo {
    color: shift-color($success, 48);
    background: shift-color($success, -72);
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions