Is it possible to integrate MaterializeCss into Bootstrap
Asked Answered
S

6

40

I have asked myself (not tested) if it is possible to integrate both bootstrap and materializecss into the same project

Since both frameworks are for the same purpose and probably overlapping in some class definitions etc. is it still possible to combine both frameworks in order to expand my styling options?

Sewellyn answered 19/2, 2015 at 18:14 Comment(0)
A
51

Materialize is not based on Bootstrap nor just a "visual layer", using both frameworks may lead to a lots of incompatibilities or at least overlap a lot as most of their functionalities are redundant (grids, menus, icons, etc).

I personally use this project Bootstrap material design which is a theme for Bootstrap and works very well. If you don't need/want Bootstrap you can also use Material Design Lite that has been recently released by Google. It is a light CSS framework based on Material Design guidelines. Light in comparison to Angular Material or Polymer also using Material Design guidelines but part of or requiring other javascript frameworks (i.e. Angular).

Autocrat answered 19/2, 2015 at 18:19 Comment(7)
thanks looks good,... only disadvantage that you will loose all the original bootstrap styling since it is just a bootstrap themeSewellyn
Yes the its just a boostrap theme part is ugly.Commiserate
Checked Bootstrap material design I am not comfortable. Font files mentioned in documents were not found. Also, one has to pay for using for commercial purpose. Checked Google Material Design Lite looks promising.Oscular
@TejasviHegde Does it still say you need to pay if using for commercial purpose? I don't see that now.Packsaddle
@Packsaddle I had re-look at the project since its been long time that I checked. the project github.com/FezVrasta/bootstrap-material-design and found that can use it in any kind of project including commercial one.Oscular
@TejasviHegde thanks - for me, the problem is the lack of test on mobile.Packsaddle
@Packsaddle I am not using this library as I needed more features and options.Oscular
G
14

I added Materialize to my bootstrap website and it worked fine, like JC Borlagdan said though there is some overlapping. I just use a website inspector and (usually right click > inspect element) then just turn off the bootstrap or materialize property to see which one I like more and remove the styling from the one I don't like. Just make sure you get the non minified versions of materialize and bootstrap.

Geomorphology answered 29/4, 2015 at 5:32 Comment(0)
B
1

It is possible, I already tested both framework in a single web form, though some properties of the controls overlapped, especially to the <div> tag that calls the container class for the tag.
For the grid, it actually follows still the bootsrap, for some reason, (that I don't know). Because I tried rearranging the order of <script> tags, still bootsrap grid still the one used by the webpage/webform.

Boswall answered 28/4, 2015 at 8:44 Comment(0)
C
1

you need to set the order of CSS files like

<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/yourStyle.css" rel="stylesheet"/>

Now you can override bootstrap css classes or ids, and can make your own CSS styles.

Conte answered 29/4, 2015 at 5:48 Comment(3)
I know but if you use both frameworks one will always overwrite functionality of the other oneSewellyn
i dont think so there is any method to merge / Integrate two CSS filesConte
yes I agree.... my only idea for a solution I came up with (until now) would be writing a custom compiler which checks double entries and makes aliases for these cases, you will have redundancies, but I think it should be possibleSewellyn
S
1

You could remove the GRID from materialize.css and just compile a custom bootstrap package with BT GRID and without the buttons, labels etc.

Don't use any BT jQuery Plugin, then compile and load bootstrap.min.css first in your template and then the modded materialize.css and materilize.min.js.

You can also integrate just buttons, cards or colors by picking them out of materialize.css and insert in your template.css / style.css to overwrite bootstrap styles or to add alternative css classes to your GRID.

Scarberry answered 21/3, 2016 at 10:34 Comment(0)
I
0

I'm not sure that's possible. Material Design is something new from Google, and includes responsive as part of it, while the Bootstrap library is from Twitter and seems to be mostly responsive-oriented.
Check out this conversation : http://forums.oscommerce.com/topic/407994-material-design/?hl=material
I suspect that they are not going to be integrated with each other, and will conflict badly, but maybe someone else has more information.

Impinge answered 25/3, 2016 at 11:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.