Search code examples
csstwitter-bootstrapyarnpkg

What is the minimum I need to import to use bootstrap-grid in version 4?


I downloaded the source of bootstrap into my application using yarn

yarn install boostrap

I tried just importing the bootstrap-grid.css in my application, and when I copied the starter example the look had no grid layout style applied to it.

https://getbootstrap.com/docs/4.0/examples/pricing/

When I added the entire boostrap.css it worked fine.

So what else other than bootstrap-grid should I be importing to get the layout/grid components?


Solution

  • The pricing example uses card-deck and cards, not the grid.

    If you want cards, you need to use bootstrap.css. bootstrap-grid.css works specifically for the grid system.