nmishra pro asked 7 years ago

When I include mdb files in my project, all my form elements (like button, input, etc) automatically attains the theme of MDB. It is good but I want a control such that few input elements and buttons retains my theme. Also I would like to know is there any way of changing the default primary colour and accent colour at one place like we do in android. Thank you :)

Smith free answered 7 years ago

nmishra pro answered 7 years ago

Ok. Thank you. I will surely go through SASS tutorials.

Michal Szymanski staff answered 7 years ago

Changing it with regular CSS will be a real nightmare, I strongly recommend you to learn about SASS. This week we should release first tutorial about MDB and SASS so you can start from it. But if you anyway want to work with CSS you have to dig in section with label "Forms basic". There you can find all input elements.

nmishra pro answered 7 years ago

Hello, Thank you for the quick response. Below is the link showing how my design is getting changed after including MDB. https://drive.google.com/folderview?id=0B0BWJffZ6nCeRmIzOUtseWVhdW8&usp=sharing Actually I am using bootstrap button and input elements to make the addition and deletion in cart. So where should I dig in such that other button element should retain the material design theme but these buttons. PS: I am using mdb.min.css, have not used SASS, so could you please tell where in .css should I change.

Michal Szymanski staff answered 7 years ago

Hello, the best way to take more control with MDB is to manipulate sass files. Just include or excludethe components you need in your projects. To change the style a particular element you need to dig into a .scss file contains a style for tat element. Write me what exactly would you like to change/keep and I will tell you where you can find it. To change a default value of any color you can overwrite MDB files. Just include in your project your own .css file (it has to be listed below mdb.css in your html file) and set a new value to .primary-color like this: .primary-color { background-color: #yourColor; }

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

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No