I'm using npm, Parcel Bundler, Bootstrap 5, React, and React-Bootstrap.
Everything compiles well on my dist folder even the bootstrap scss variable that I customized but when I start serving the app it doesn't include the styling at all.
I followed everything on the getting started page of React-Bootstrap.
Where I created a custom.scss file where the only difference is I only imported the ones I needed and customized the $navbar-brand-font-size variable:
$navbar-brand-font-size: 4rem;
@import "../../node_modules/bootstrap/scss/functions";
@import "../../node_modules/bootstrap/scss/variables";
@import "../../node_modules/bootstrap/scss/mixins";
@import "../../node_modules/bootstrap/scss/reboot";
@import "../../node_modules/bootstrap/scss/grid";
@import "../../node_modules/bootstrap/scss/navbar";
Then as mentioned in the getting started page I imported it on my App.scss file:
@import "../scss/custom";
.App {
text-align: center;
}
.App-header {
background-color: #282c34;
min-height: calc(100vh - 77.03px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
Everything compiles well on my dist folder:
And I could even see the compiled change on the CSS:
But when I start the app the change doesn't apply:
Also, I can't seem to use Bootstrap's utility classes that's why my Navbar Brand isn't centered vertically where
<Navbar.Brand className="align-middle" href="#home"> ... </Navbar.Brand>
doesn't seem to work.
!important
. If it doesn't show at all, then the issue could be something else.