Skip to content

Reopened: Missing $primary-text-emphasis-dark variable #39367

@Michael-Ziluck

Description

@Michael-Ziluck

Clarification from original issue #38683

The original ticket was closed by @mdo with the following explanation:

Closing as this isn't a breaking change—minor releases can include new features. This has always been the case in Bootstrap.

There seems to be a misunderstanding on what "breaking change" means. It should mean: "if you update this library to a new version, all usages of said library should continue to compile."

Before version 5.3.0, the following code compiles:

@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins/breakpoints";

After version 5.3.0, the aforementioned code throws the following error:

HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Undefined variable.
   ╷
55 │     "primary": $primary-text-emphasis-dark,
   │                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  bootstrap\scss\_maps.scss 55:16  @import
  src\styles.scss 19:9             root stylesheet

If you disagree, can you please explain how you and the rest of the Bootstrap team interprets the phrase "breaking change"?

Original issue

Prerequisites

Describe the issue

The problem is your update a minor version (5.2.3 -> 5.3.0) and have a very little Breaking Change

variable $primary-text-emphasis-dark not exist on 5.2.3 and is required on 5.3.0

SassError: Undefined variable.
   ╷
55 │     "primary": $primary-text-emphasis-dark,
   │                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/bootstrap/scss/_maps.scss 55:16  @import
  src/styles.scss 9:9                           root stylesheet

The fix is very easy to implement, just need include the new file variables-dark on main styles

@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/variables-dark";
 ...
@import "../node_modules/bootstrap/scss/maps";

Some automated process may throw an error, because it's a minor update and it should be backwards compatible.

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.3.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions