Please run the following code and you shall get a bar with a “contact us” button that includes an SVG icon and some adjacent text.
HTML
<aside class="sticky_global">
<div class="general_contact">
<div class="voip_wrapper">
<a href="https://example.com/contact" class="voip_link">
<img src="https://www.svgrepo.com/show/533286/phone-call-alt-1.svg" alt="voip_call_icon" class="voip_icon"></img>
<!-- https://www.svgrepo.com/vectors/phone/ -->
<span class="voip_text">Contact us</span>
</a>
</div>
</div>
</aside>
CSS
.sticky_global {
display: block;
position: sticky;
right: 0;
bottom: 0;
left: 0;
z-index: 2147483647;
padding-top: 5px;
padding-bottom: 5px;
text-decoration: none;
font-weight: bold;
background: blue;
}
.voip_wrapper {
display: flex;
justify-content: center;
align-items: center;
padding-top: 10px;
padding-bottom: 10px;
}
.voip_link {
display: inline-block;
transition: none !important;
box-shadow: none !important;
text-decoration: none !important;
color: #000;
}
.voip_icon {
display: inline;
vertical-align: middle;
width: 25px;
height: 25px;
max-width: 25px;
max-height: 25px;
margin-right: 5px;
}
.voip_text {
display: inline;
vertical-align: middle;
}
My question
The SVG icon and the text appear Black.
How to CSS filter
an element or all children of an element (in this case both the SVG icon and its adjacent text) equally to White?