-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including "bootstrap-grid.scss" only leads to somewhat broken grid #17982
Comments
i don't think you should import reboot into bootstrap-grid.scss. The build process compiles bootstrap-grid.scss into bootstrap-reboot.scss and bootstrap-reboot.scss. You can use both together in your HTML when you want to use the grid and bootstrap's CSS reset (reboot):
And yes when you are using both, you should compile it into a single CSS. On the other hand the Bootstrap reset is not required for the grid. The only requirement for using bootstrap-grid.css is setting the global The following code will solve your problem:
Notice that importing reboot into bootstrap-grid means you can not import bootstrap-grid anywhere without getting the CSS code generate by reboot at the position of your import. So you can only use it if bootstrap-grid is your first import (output) and you do not CSS any other CSS reset. |
@bassjobsen I understand what you said about I outlined a possibility to do that. (referencing needed mixings from inside I wasn't insisting in any way that reboot should be included in the grid (I guarded that possibility with "if" though), are you sure you read my post fully? |
@bassjobsen THANK YOU! |
I am not sure if this is by design or not. But I wanted to use "BS4 grid only" for my app. I assumed that should be possible, since I see "Grid Only" download option in alpha-docs.
So, when I import bootstrap fully like that:
@import 'bower_components/bootstrap/scss/bootstrap';
in my project I see the following grid:When I change it to use grid only

@import 'bower_components/bootstrap/scss/bootstrap-grid';
is see this:This is not browser specific.
I figured out that it's because "reboot.scss" is not included, so I added:
That didn't work, since
reboot.scss
uses mixins and variables inside without importing them. So I had to manually go and figure it out and the following code fixes that:To sum up, I think it should be obvious default way to use "just a grid" or "just a grid with reboot" (if by design grid should not include "reboot"). That can be solved with explicit imports added to
_reboot.scss
; So the following code would just work:If, by design, grid should include "reboot" then also explicit import of "reboot" in a
bootstrap-grid.scss
.What do you think? Should I send a PR?
The text was updated successfully, but these errors were encountered: