Missing variable $primary-text-emphasis-dark

Created on 21 September 2023, 9 months ago
Updated 27 September 2023, 9 months ago

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..

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jennypanighetti

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jennypanighetti
  • πŸ‡ΊπŸ‡ΈUnited States jennypanighetti
  • πŸ‡΅πŸ‡ͺPeru hatuhay Lima

    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
      
  • πŸ‡ΊπŸ‡ΈUnited States jennypanighetti

    There is no import.scss in the subtheme. There is a style.scss which currently contains:

    // Sub theme styling.
    @import 'variables_drupal';
    
    // Bootstrap overriden variables.
    // @see https://getbootstrap.com/docs/5.2/customize/sass/#variable-defaults.
    @import 'variables_bootstrap';
    
    // Include bootstrap.
    @import '../../../../themes/contrib/bootstrap5/scss/style';
    

    So this sounds like a bigger issue that needs to be updated in the subtheme generator.

  • Status changed to Fixed 9 months ago
  • πŸ‡΅πŸ‡ͺPeru hatuhay Lima
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024