I have to delete or disable an extra style tag shown below that appears in the header in my angular website.
<head>
<style> something other style i dont need to delete</style>
<style>input:focus, .txtInput[_ngcontent-isq-c530]:focus{outline:none!important;border-bottom:0px} .mat-form-field-label-wrapper{top:-2.14375em!important;padding-top:2.14375em!important} .mat-form-field-appearance-legacy .mat-form-field-infix{padding:.4375em 0!important}</style>
<style> something other style i dont need to delete</style>
</head>
I have the code below, but not sure how do i select only this style tag, as there are many other style tags in the same div
removeStyle(key: any): void {
const styleEl = this.stylesMap.get(key);
if (styleEl) {
this.stylesMap.delete(key);
this.host.removeChild(styleEl);
}
}
this.styleService.removeStyle('some-id');
