Topic: Do themes only apply on MDB components?

bellevilleweb priority asked 3 weeks ago


Expected behavior Adding data attribute data-mdb-theme="dark" to an element should make all children use dark theme. I.E. divs would have dark backgrounds and light foregrounds etc.

Actual behavior Seems this data attribute only triggers on certain elements i.e. a div.card or button.


Kamila Pieńkowska staff answered 3 weeks ago


It depends. Changing theme do not force changing background color if it has background color set to specific color. To see it take effect it need to be styled with class that changes with theme. You can see how this plays out when you go to our color docs and change site theme. You will see which colors are suppose to change.



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 7.3.0
  • Device: Laptop
  • Browser: Firefox
  • OS: Linux / Pop!_OS
  • Provided sample code: Yes
  • Provided link: No