I am using two CSS classes for highlighting the icon color as white and changing the 'h6' tag background-color as #325868.
The icon color is by default black in color. Now, I have actually used a '.highlighted_fileName' class for highlighting the 'h6' element and my icon is placed in a 'span' tag just beside the 'h6' tag. Below is my code that I have tried, please refer to the same.
.highlighted_fileName{
color:white !important;
background-color: #325868 !important;
.closeTab{
color:#ffffff;
}
}
<h6 class="float-left fileName card elementSelectedId truncate" data-toggle="tooltip" title=` +noOfEditors[0].pathTitle+ ` id="featureFileName_1"
style="border-color: cadetblue; left: 0.5vw; top: 2vh; font-weight: bolder; border-width: thin;"
onclick="openEditorTab(this,noOfEditors[0].pathTitle,noOfEditors[0].fileName);"> `+ noOfEditors[0].fileName +`</h6><span><i id = "icon_1" class="fa fa-times closeTab" style="position: relative; top: 26px; right: 10px;display:block;" onclick="closeTab(this,noOfEditors[0].pathTitle,noOfEditors[0].fileName,document.getElementById('featureFileName_1'));" aria-hidden="true"></i></span>
I know this is not true as I have tried it and it didn't give me the result as my expectation. So can anyone please tell me how can I achieve this. Also, please refer to the below picture for more information.

+css selector. But please post the relevant HTML so we know what you are talking about.