I've got a fresh install running a subtheme, and my `gulp` file is returning this error:

[17:30:25] Starting 'styles'...
Error in plugin "sass"
Message:
    node_modules/bootstrap/scss/_maps.scss
Error: Undefined variable.
   ╷
55 │     "primary": $primary-text-emphasis-dark,
   │                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/bootstrap/scss/_maps.scss 55:16  @import
  scss/import.scss 11:9                         @import
  scss/style.scss 7:9                           root stylesheet

But when I look in the my custom theme folder `node_modules/bootstrap/scss/_variables-dark.scss` $primary-text-emphasis-dark is defined there on line 11.

I could also have set this up wrong, if so, let me know..

Comments

jennypanighetti created an issue. See original summary.

jennypanighetti’s picture

Title: Missing variable » Missing variable $primary-text-emphasis-dark
hatuhay’s picture

New SASS structure for Bootstrap 5.3.
Change import.scss to this on your subtheme

// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
@import "../node_modules/bootstrap/scss/functions";

// 2. Include any default variable overrides here

// 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets)
@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/variables-dark";

// 4. Include any default map overrides here
// variables
@import "variables";
// typography
@import "typography";
// 5. Include remainder of required parts
@import "../node_modules/bootstrap/scss/maps";
@import "../node_modules/bootstrap/scss/mixins";
@import "../node_modules/bootstrap/scss/root";

// 6. Optionally include any other parts as needed
@import "../node_modules/bootstrap/scss/utilities";
@import "../node_modules/bootstrap/scss/reboot";
@import "../node_modules/bootstrap/scss/type";
@import "../node_modules/bootstrap/scss/images";
@import "../node_modules/bootstrap/scss/containers";
@import "../node_modules/bootstrap/scss/grid";
@import "../node_modules/bootstrap/scss/helpers";

// 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss`
@import "../node_modules/bootstrap/scss/utilities/api";

// 8. Add additional custom code here
@import "mixins";
// barrio
@import "barrio";

  • hatuhay committed da35c945 on 5.x
    Issue #3388706 by hatuhay: Missing variable $primary-text-emphasis-dark
    
jennypanighetti’s picture

/deleted

hatuhay’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.