I'm currently in the process of adding breadcrumb navigation with triangle shapes using before/after elements in CSS, following the method outlined in this tutorial:
http://css-tricks.com/triangle-breadcrumbs/
These are the relevant code snippets:
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
</ul>
.breadcrumb li a {
color: white;
text-decoration: none;
padding: 10px 0 10px 65px;
background: hsla(34,85%,35%,1);
position: relative;
display: block;
float: left;
}
.breadcrumb li a:after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid hsla(34,85%,35%,1);
position: absolute;
top: 50%;
margin-top: -50px;
left: 100%;
z-index: 2;
}
However, I am hoping to use these breadcrumbs as a directional guide, showing a structure like:
Main_Category >> Sub_Category >> Details
In this flow, the Main_Category is highlighted while the other two parts are darker, and there's a dropdown menu available for selection. Upon selection, Sub_Category will be highlighted and another dropdown will appear.
My main query is how can I modify the colors of the before/after borders, since they are pseudo-elements?
Based on the tutorial, I believe I can adjust the color in the main section like this:
<li><a href="#" ng-style="background: {{color}}">Home</a></li>
Nevertheless, I haven't found a way to set ng-style for the before/after elements, resulting in unchanged colors for the triangles.