How to Enable CSS Grid by Default #37964
Replies: 2 comments 1 reply
-
No, I believe it is not possible to enable CSS Grid directly in your project's package.json file. CSS Grid is a feature of CSS itself and is not a separate package that can be installed or enabled through npm. Bootstrap 5.2 does include the ability to enable or disable CSS Grid layout on a per-build basis by using the enable-grid Sass variable. This means that you can enable or disable CSS Grid when building Bootstrap by modifying this variable in your own Sass setup. To enable CSS Grid in Bootstrap 5.2, you need to set the enable-grid variable to true in your Sass setup before importing Bootstrap. This will include the CSS Grid layout classes in the compiled CSS, allowing you to use them in your HTML:
|
Beta Was this translation helpful? Give feedback.
-
Yeah that little bit of info would of been nice for the official BS team to add that on their official docs. And that process also works for 5.3 |
Beta Was this translation helpful? Give feedback.
-
I need to generate Bootstrap with CSS Grid enabled by running npm install so the clients can get the grid without any additional steps.
I'm thinking about including the enable-cssgrid: true in my project's package.json, Something like that:
Is that possible?
Beta Was this translation helpful? Give feedback.
All reactions