CSS-Grid ignores Container-Class

A question about CSS Grid: This is now integrated in Bootstrap and also documented accordingly:
https://getbootstrap.com/docs/5.1/layout/css-grid/

I find this an exciting approach, since e.g. also Worpress builds their grid with this kind. I have set up the test times so. But what I have noticed now…

The CSS grid takes the whole width of the window. Even if I make a div with the class “Container” around the grid. The bootstrap grid listens to the class Container, the CSS grid does not. This is a pity, because so also the whole widths for the breakpoints don’t work.

Does anyone have experience with this? How did you solve this?

This is possible by using the original Bootstrap SCSS files in the project.
If you do this, you can enable the CSS Grid option in the _variables.scss file

I have this variables in my custom.css

$enable-grid-classes: false;
$enable-cssgrid: true;

1 Like