Topic: Change default colors of *-warning, *-primary, *-secondary, and so on to my own defined colors

AstroSign free asked 3 years ago

Expected behavior I can gobally change the default colors used by MDB5 to my own defined colors

Actual behavior *-primary, *-secondary, and so on are already defined with default colors I can not use for my website

Resources (screenshots, code snippets etc.)

Arkadiusz Idzikowski staff answered 3 years ago

The easiest solution would be to use an MDB theme, but theming only modify the primary and secondary colors.

Otherwise you would need to override the scss variables located in the free/variables.scss file.

AstroSign free commented 3 years ago

Just what I searched for, Thank you

webshapers priority commented 3 years ago

In order to override them they would need the "!default"-flag set like this:// Theme colors$primary: #1266f1 !default;$secondary: #b23cfd !default;$success: #00b74a !default;$info: #39c0ed !default;$warning: #ffa900 !default;$danger: #f93154 !default;$light: $gray-50 !default;$dark: $gray-900 !default;

webshapers priority commented 3 years ago

Aaaand I believe this should be done for all the variables in free/variables.scss...

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 2.2.1
  • Device: Laptop
  • Browser: Chrome
  • OS: Big Sur
  • Provided sample code: No
  • Provided link: No