Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!

Verlino priority asked 1 year ago


Expected behavior

On button click I want to change to dark theme.

Actual behavior

When I try to compile my scss file, written exactly like in your example, with node-sass I get an error in my library mdbootstrap pro.

Resources (screenshots, code snippets etc.)

ERROR:

{ "status": 1, "file": "/home/federico/Andrea_VRUP-ERP V1.3.0/node_modules/mdb-ui-kit/src/mdb/scss/free/mixins/_buttons.scss", "line": 10, "column": 3, "message": "required parameters must precede optional parameters", "formatted": "Error: required parameters must precede optional parameters\n on line 10 of node_modules/mdb-ui-kit/src/mdb/scss/free/mixins/_buttons.scss\n>> $shadow,\n\n --^\n" }

CODE:

@import '../../node_modules/mdb-ui-kit/src/mdb/scss/mdb.pro.scss';

$my-theme-primary: #9c27b0; // theme primary color, change this value to customize theme $my-theme-secondary: #69f0ae; // theme secondary color, change this value to customize theme

$my-dark-theme: mdb-dark-theme($my-theme-primary, $my-theme-secondary); // create the new dark theme using primary and secondary colors

// include theme styles @include mdb-theme($my-dark-theme);


Kamila Pieńkowska staff answered 1 year ago


What bundler are you using?


Verlino priority commented 1 year ago

Nothing in particular, can't I just compile the .scss into a .css file? Do I necessary need to use bundlers like webpack?


Kamila Pieńkowska staff commented 1 year ago

Yes. You need a bundler. Documentation states: "Creating a theme requires recompiling the scss styles, for this purpose we recommend using Webpack, Vite or Parcel starter."


Verlino priority commented 1 year ago

Ok thank you for answer!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.1
  • Device: PC
  • Browser: Chromium
  • OS: Electron forge js - Linux
  • Provided sample code: No
  • Provided link: No