Topic: SCSS toggle
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);
kpienkowska staff answered a year ago
What bundler are you using?
Verlino pro premium priority commented a 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?
kpienkowska staff commented a 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 pro premium priority commented a year ago
Ok thank you for answer!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- 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