Customize Bootstrap breadcrumbs with Font Awesome icon divider using SASS

Looking to customize the default breadcrumb style using SASS. Following the guidelines from Bootstrap 4 beta 3 documentation, I made changes in the custom.scss:

$breadcrumb-divider: "\f105"; //using FontAwesome icon for fa-angle-right

However, setting font family is also required:

font-family: 'fontAwesome'; //How can this be implemented?

What's the correct way to configure the font for the .breadcrumb-item::before class?

Answer №1

Give this a shot:

.breadcrumb-item::before {
    font-family: 'CustomIcons';
    content: "\e601";
}

Answer №2

In case you are integrating Bootstrap 4 and Font Awesome 5 together,

.breadcrumb-item + .breadcrumb-item::before {
    font-family: "Font Awesome 5 Free";
    content: "\f105";
    font-weight: 900;
}

Answer №3

The specific tag mentioned in breadcrumb.scss is:

    .breadcrumb-item + .breadcrumb-item::before {
      font-family: 'FontAwesome';
      content: "\f101" !important; 
    }

The use of !important ensures that the default styling is overridden.

I trust this clarifies things for you.

Answer №4

When it comes to defining a variable for the scss, you can do so like this:

$breadcrumb-divider: "\f105";

Afterward, be sure to set this variable in the pseudo-element ::before and apply the font shorthand property to it.

.breadcrumb-item+.breadcrumb-item::before{
  font: normal normal normal 14px/1 FontAwesome;
  content: $breadcrumb-divider;
}

I believe this should work, so go ahead and give it a try.

Appreciate your time!

Answer №5

Although I may be a bit late to the party, I wanted to share an updated response for the latest library versions.

If you are currently using Bootstrap 5 and FontAwesome 5, this SCSS code snippet will be suitable:

.breadcrumb-item {
    + .breadcrumb-item {
        &::before {
            font-family: "Font Awesome 5 Free";
            font-weight: 700;
            content: "\f054" !important;
        }
    }
}

Answer №6

If you want to change the separator from the standard "/" to ">>" without relying on an icon library or manipulating SVGs, you can use this CSS snippet. Simply apply it using a custom class 'breadcrumb-custom' on the 'ol' tag.

.breadcrumb-custom  .breadcrumb-item +  .breadcrumb-item::before { 
  content: ">>"; 
  font-weight: bold; 
  color: #000000; 
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Create an image of a static map from Google

I have incorporated the Google Static Map API into my Angularjs Application to display images of Google maps. Browse here for a glimpse Everything operates smoothly when there are fewer map coordinates. However, when I increase the number of map coordina ...

Floating unordered list items in a gallery display

I am dealing with a Gallery view where I am using the UL LI elements with float left to create a gallery-like layout with multiple lines based on the content. However, I am encountering an issue where after the first line, the layout seems to malfunction i ...

Experiencing difficulties positioning svg text path in the center using CSS on desktop devices

I've looked into other SVG text questions, but I'm struggling to understand my mistake. Currently, I'm working on a live site at and implementing the following code: <svg class="svg-width desktop" style="margin:auto"> <path ...

How do three buttons display identical content?

I have three buttons on my website, each with its own unique content that should display in a modal when clicked. However, I am experiencing an issue where regardless of which button I click, the same content from the last button added is displayed in the ...

Execute script when on a specific webpage AND navigating away from another specific webpage

I created a CSS code that adds a fade-in effect to the title of my website, and it works perfectly. However, I now want to customize the fade-in and fade-out effect based on the page I am transitioning from. My desired outcome: If I am leaving the "Biolo ...

CSS: incorrect text alignment

I'm encountering an error with text-align. I want my text aligned to the left, but it's starting from the center. I've tried to fix it without success. Can someone please review and correct my code? CSS .text { width: 100%; height: ...

Is there a way to customize the color of a React component from a different source?

I am currently utilizing a React component library called vertical-timeline-component-react. <Fragment> <Timeline> <Content> <ContentYear startMonth="12" monthType="t ...

What is the best way to implement style guidelines that are associated with a model in AngularJS?

In the process of creating an application where 1-5 views along with the corresponding model and controller are sent to the client upon page load. The user navigates through each view in sequence using routing, which is functioning correctly. However, I a ...

Create engaging text animation by transitioning from horizontally displayed text to vertically displayed text with the letters standing upright using An

I'm trying to create an animation where an acronym is displayed horizontally in the middle of the screen and then flips vertically. The challenge I'm facing is rotating individual letters once they are vertical so that the text reads from top to ...

Conceal or reveal radio buttons according to information in a table

How can I dynamically add and remove values from a table based on radio button selections? My goal is to add the selected value to the table and hide it from the radio button list, and if the value is deleted from the table, I want to show it back in the r ...

Use CSS to configure the mouse wheel for horizontal scrolling

Looking to create a horizontal page layout, but when I scroll with the mouse wheel the content only moves vertically. Is there a way to enable horizontal scrolling using the mouse wheel? Does CSS have a property for this? For instance, is there something ...

Combining multiple PNG images onto a base image in PHP

I need assistance in merging 24 images with single dashes highlighted into a base circle image using PHP GD, JS or CSS. All images are in PNG format. Your help would be greatly appreciated. ...

Ensuring the state is correctly updated upon form submission in React JS

Is there a way to reset the state to blank after submitting the form? I attempted to clear it again upon submission, but the state still retains its value. How can I revert the state back to its initial state after finishing the submission? state = { ...

Trouble displaying a cloned HTML element

I used jQuery to create a copy of a div and positioned it on the page, but for some reason, it's not displaying. When I checked using F12 tools, all the properties such as top, left, height, and width seemed to be set correctly. <div id="divLine" ...

Combining Bootstrap, flexbox, and a mobile-friendly hamburger menu for optimal

Just a quick note to clarify that I am primarily a backend developer, not proficient in frontend. The layout I currently have looks like this: I am unsure whether I should stick with the current setup or switch to using a grid. My main goal is to have a ...

Ways to implement a transition effect when the hover state is deactivated or no longer present

After applying a transition to the header using the hover pseudo-class, I noticed that it abruptly snaps back to its original position when the hover effect is removed. Is there a way to smoothly return the header to its original position using the same ...

Button Hover Effect: Transition with Style

I am trying to implement a one-second transition from the default color scheme to the hover color for a Button element in Material UI. I am using the transitions.create(props, options) method as described in this article: https://medium.com/@octaviocoria/c ...

What's the best way to determine the background image on this website? I'm in the process of replicating a site on

I have been asked to clone the website in order to create a Wordpress site. The original site is currently on Kajabi platform. I managed to download all images from the Kajabi site by right-clicking and selecting download. However, there are certain image ...

The mobile-responsive dropdown navigation bar functions well on browsers with small widths, but does not work properly on my phone

I am experiencing an issue with the mobile responsive dropdown navigation bar on my website. It works perfectly fine on a small width browser, but when I try to open it on my phone, nothing happens. This is puzzling me as I am new to making websites respon ...

Modify the background color based on the length of the input in Vue

Can you change the background color of the initial input field to green if the value of the Fullname input field is greater than 3 characters? See below for the code: <div id="app"> <input type="text" v-model="fullname" placeholder="Enter Full ...