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: Override mdb component styles for each angular component separatly

rhaouari free asked 5 years ago


Hi I would like to override css styles of mdb components , like carousel component or any other component, but i don't wont to be applied globally , for example i have two angular components cmp1 and cmp2 with their distinct scss files, that both uses carousel. i want for example to override the height of the caroussel to set it differently for cmp1 and cmp2 . if i add it to styles.scss or app.component.scss it will be applied globally

Best regards.


Konrad Stępień staff commented 5 years ago

Hi @rhaouari,

Unfortunately, this can be problematic because the MDB styles are imported globally and it's hard to overwrite them inside other components.

I think you just have to do global styles with unique ids



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.8.1
  • Device: PC
  • Browser: Chrome
  • OS: osx
  • Provided sample code: No
  • Provided link: No