Topic: MDB UI Kit Pro 8.0 not working customizatitons
allancmello
pro premium asked 2 days ago
I created a standalone Angular 19 project to try using the new version of "mdb-angular-ui-kit-8".
However, it's clear that the SASS base isn't compatible with Angular 19+. Following the documentation definitions for customizing MDB SASS variables is useless! It doesn't work.
Including "mdb-angular-ui-kit" in angular.json shows why Angular simply ignores the MDB SASS variable customization.
Below is a warning and an example that works on "mdb-angular-ui-kit-7.1" and has no effect on "mdb-angular-ui-kit-8".
Warning in "mdb-angular-ui-kit-8", this is not just a warning, as the code breaks since internally the MDB still uses "@import":
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
The plugin "angular-sass" was triggered by this import
angular:styles/global:styles:5:8: 5 │ @import 'node_modules/mdb-angular-ui-kit/assets/scss/mdb.scss';
style.scss (mdb-angular-ui-kit-7.1):
// Importação de variáveis padrão MDB
$accordion-button-color: #ffaa18;
$accordion-button-bg: #0f0f0f;
$tooltip-bg: #000;
$tooltip-border-radius: .50rem;
$sidenav-background-color: #1C2331;
$progress-bar-bg: #1C2331;
$nav-tabs-link-active-color: #03cb21f7
$nav-tabs-link-active-bg: #0f0f0f;
$nav-tabs-link-active-border-color:#0cf22ff7;
$table-hover-color: #d80404;
$table-hover-bg-factor: 0.2;
@import 'mdb-angular-ui-kit/assets/scss/mdb.scss';
style.scss (mdb-angular-ui-kit-8), same content as style.scss with "mdb-angular-ui-kit-7.1" above. The difference is how "mdb-angular-ui-kit" is imported in the style.scss, the first using "@import", the second using "@use", a new method to import in the new Dart Sass 3.0.0.
Images of the same code that show how it works in one version and not in another.
Is there a solution to this problem?
Thank you.
Arkadiusz Idzikowski
staff answered a day ago
You should use the @import
syntax in both cases when you want to add MDB styles. The information you see is a deprecation warning. The import
syntax is not removed yet and and can be used in Angular v19. Using the standalone vs module-based version should not affect the functionality of the styles
If you need, you can silence those warning by following the instructions from my answer in this thread: https://mdbootstrap.com/support/angular/mdb-uses-the-legacy-import-syntax-in-angular-19-instead-use-syntax/
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 Angular
- MDB Version: MDB5 8.0.0
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: Yes
allancmello pro premium commented 2 days ago
The problem is in using MDB in standalone apps in Angular. I just tested it with Modules, and it works.
Is it true that Angular MDB doesn't run in standalone apps?
Considering the mdb-angular-ui-kit starter is based on "modules."
Is that it?