Short answer:
unfortunately No!
Long answer:
The code snippet
<mat-icon role="img">delete</mat-icon>
will convert at runtime to something like this
<mat-icon
class="mat-icon notranslate material-icons mat-icon-no-color"
role="img" aria-hidden="true">delete</mat-icon>
Upon closer inspection, it is evident that there are no useful identifiers (such as class names or data properties) within the element that can be targeted using CSS selectors. The only distinguishable information resides in the text content of the element which cannot be utilized for selecting elements as per the specifications.
There have been discussions about introducing the :contains()
selector but it never materialized.
BONUS:
If all else fails, resorting to JavaScript/TypeScript may be the solution:
let editIcons =[].filter.call(document.getElementsByTagName('mat-icon'),
el => el.innerText=="edit");
editIcons.forEach( e => {
e.style.color = "red";
});
https://i.stack.imgur.com/qKOs4.png