Looking at the source code of Bootstrap v4.1, there are no utility classes included that specifically target the flex-basis value.
Searching through the file, there are only 12 occurances of the word flex-basis:
- 5 times to set
flex-basisto0for some of thecol-*classes (e.g. line 625). - 7 times for styling specific
navbarrelated classes (e.g. line 4268).
This also seem to remain the case in the latest versions of Bootstrap at the time of this writing:
- Bootstrap v4.5.3
- Bootstrap v5.0.0-alpha3
Looking at the source code of Bootstrap v4.1, there are no utility classes included that specifically target the flex-basis value.
Searching through the file, there are only 12 occurances of the word flex-basis:
- 5 times to set
flex-basisto0for some of thecol-*classes (e.g. line 625). - 7 times for styling specific
navbarrelated classes (e.g. line 4268).
This also seem to remain the case in the latest versions of Bootstrap at the time of this writing:
- Bootstrap v4.5.3
- Bootstrap v5.0.0-alpha3
Bootstrap is too often used to replace CSS. It's not an excuse to not know CSS.
To apply a flex-basis on a flex child, you go
.theFlexChild {
flex-basis: 250px; /* <-- or whatever */
}
It can be done, just not through a Bootstrap class. And this works just great along with the flex-grow-* and flex-shrink-* class styles.