Unable to override $theme-color in bootstrap

Update 2021 for Bootstrap 5 Per the guidance in the docs… “Variable overrides must come after our functions are imported, but before the rest of the imports.” Therefore, overriding the theme-colors in Bootstrap 5 works the same way as 4.x. In order to override the theme-colors, simply change appropriate theme color variable before importing bootstrap.scss … Read more

How to change Bootstrap navbar collapse breakpoint

Bootstrap 5 (update 2023) As stated in the docs, For navbars that never collapse, add the .navbar-expand class on the navbar. For navbars that always collapse, don’t add any .navbar-expand class. Bootstrap 4 (update 2018) Changing the navbar breakpoint is easier in Bootstrap 4 using the navbar-expand-* classes: <nav class=”navbar fixed-top navbar-expand-sm”>..</nav> navbar-expand-sm = mobile … Read more

Bootstrap 5 – Custom theme-colors not updating classes

Bootstrap 5.1.0 A recent change to the way the text- and bg- classes are created requires additional SASS map merges in 5.1.0 @import “functions”; @import “variables”; @import “mixins”; $tertiary: #3fb247; $custom-theme-colors:map-merge($theme-colors, ( “tertiary”: $tertiary )); $theme-colors: map-merge($theme-colors, $custom-theme-colors); $theme-colors-rgb: map-loop($theme-colors, to-rgb, “$value”); $utilities-colors: map-merge($utilities-colors, $theme-colors-rgb); $utilities-text-colors: map-loop($utilities-colors, rgba-css-var, “$key”, “text”); $utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, “$key”, “bg”); … Read more

Using media breakpoints in Bootstrap 4-alpha

Update: Bootstrap 5. v5 breakpoints reference Original answer – Bootstrap v4: Use breakpoint mixins like this: .something { padding: 5px; @include media-breakpoint-up(sm) { padding: 20px; } @include media-breakpoint-up(md) { padding: 40px; } } v4 breakpoints reference v4 alpha6 breakpoints reference Below full options and values. Breakpoint & up (toggle on value and above): @include media-breakpoint-up(xs) … Read more

Using Bootstrap 5 with Vue 3

Bootstrap 5 no longer needs jQuery so it’s easier to use with Vue, and no longer requires a library like bootstrap-vue. Install bootstrap as you would any other JS module in the Vue project using npm install or by adding it to the package.json… npm install –save bootstrap npm install –save @popperjs/core Next, add the … Read more

Why is the Bootstrap Navbar always collapsed? [duplicate]

Bootstrap 5 (update 2021) As stated in the docs, “Navbars require a wrapping .navbar with .navbar-expand{-sm|-md|-lg|-xl|-xxl} for responsive collapsing” Therefore, Bootstrap 5 Navbar is the same as the Bootstrap 4 Navbar and will be vertically “collapse” if you don’t include navbar-expand-* Bootstrap 4 (original answer) In Bootstrap 4, the navbar-expand* class is needed if you … Read more