My ul and li design in CSS is functioning perfectly on Bootstrap. However, when I apply the same code to an Angular Material project, the Angular Material CSS seems to be overriding my styles.
CSS Code:
li {
width: 2em;
height: 2em;
text-align: center;
line-height: 2em;
border-radius: 1em;
background: dodgerblue;
margin: 0 1em;
display: inline-block;
color: white;
position: relative;
}
li::before {
content: '';
position: absolute;
top: .9em;
left: -4em;
width: 4em;
height: .2em;
background: dodgerblue;
z-index: -1;
}
li:first-child::before {
display: none;
}
.active {
background: dodgerblue;
}
.active ~ li {
background: lightblue;
}
.active ~ li::before {
background: lightblue;
}
HTML Code:
<link rel="stylesheet" href="app/css/style.css">
<link href="master/libraries/angular-material/angular-material.css" rel="stylesheet" />
After including the Angular Material CSS link, my custom design is not rendering as expected. However, it is crucial for me to make it work in conjunction with Angular Material.