Within Bootstrap 4, there exists a Sass variable known as $enable-rounded
which
"Enables predefined
border-radius
styles on various components."
(https://getbootstrap.com/docs/4.1/getting-started/theming/#sass-options)
I need to eliminate the rounded corners specifically on the Breadcrumb component, while keeping them on other elements. Thus, I cannot rely on $enable-rounded
for this task.
However, I am uncertain about the most efficient approach to achieve this.
The Sass code in _breadcrumb.scss
looks like this:
.breadcrumb {
display: flex;
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom;
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($border-radius);
}
How can I override
@include border-radius($border-radius);
without altering _breadcrumb.scss
?
All the CSS for my application is consolidated into one file (app.css
) compiled from a Sass file (app.scss
) that initially includes the necessary Bootstrap 4 Sass files. One option could be:
// app.scss
@import breadcrumb;
@import // other_bootstrap_sass_files
// Customized CSS for my app
.breadcrumb {
border-radius: 0;
}
This method feels reminiscent of Bootstrap 3, where overriding was necessary.
Is there a more sophisticated way to accomplish this using Sass in Bootstrap 4?