Missing col-xs sizes using bootstrap 4

2019-01-26 17:40发布

问题:

In my react project, using react-bootstrap, it's loading all all the css for the grid sizes, except for the xs set.

the xs set does, however, get the default styles applied to all grid sizes, but does not include the media query.

Is there something obvious I am missing?

Bootstrap 4

回答1:

The -xs- infix was removed from Bootstrap 4 Alpha 6, so the classes are simply, col-1, col-2.. col-12, etc...

Since Bootstrap is "mobile first", the xs breakpoint (<576px) is the default and are no media queries for it. There are only media queries for the larger breakpoints to override the smaller breakpoints. Starting with the smallest each breakpoint overrides the next..

xs(default) > overridden by sm > overridden by md > overridden by lg > overridden by xl