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!


Topic: How can I change the primary color? It's always be overwritten by the component styles

Winter pro asked 5 years ago


with the switch to mdb 8 my $primary-color variable is used and then it will be overwritten by the component styles, for example the component style of the mdbBtn directive. I need my own primary color. What can I do? What is the right way?

Regards Lars


Arkadiusz Idzikowski staff commented 5 years ago

Could you provide some code and/or reproduction/steps that will help us to debug this problem? How do you overwrite this variable?


Himmer free commented 5 years ago

I have the same question of how to step on the variables as $ primary-color


Damian Gemza staff answered 5 years ago


Dear @Winter

We're working on this, but I can't provide you with any ETA. If you'll use the button.btn-primary class overwriting in global styles.scss, everything should be okay.

Best Regards,

Damian


Damian Gemza staff answered 5 years ago


Guys,

For now, the best and only way is to overwrite the button.btn-primary rule with your own background-color value - there's no possibility to use the $primary-color variable as for now.

Best Regards,

Damian


Winter pro commented 5 years ago

The problem is, that the component styles have the !important attribute and they are rendered into the style tag after my styles have been loaded. So the primary button is always blue by default.



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: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.0.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No