You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Empty style tag when one or more components don't have styles #31191
Empty style tag when one or more components don't have styles
Affected Package
The issue is caused by package @angular/angular
Is this a regression?
This happens in all versions of Angular
Description
When several components are added to a template and one or more of them do not have defined styles, an empty style tag appears in the header.
The desired result would be that this empty label was not added.
I'm having problem with this, please fix it. Our project using CSP to prevent inline style so having an empty <style> tag in <head> will cause browser to spit out annoying CSP error logs. I also have one question for this on stackoverflow in hope for getting a workaround but it seems to be impossible for the moment.
However, I've managed to upgrade to Angular 9 and I'm not sure if this is fixed in Angular 9 or not (it seems to be) but the empty <style> tags are gone.
Activity
MrNocTV commentedon May 12, 2020
I'm having problem with this, please fix it. Our project using CSP to prevent inline style so having an empty
<style>tag in<head>will cause browser to spit out annoying CSP error logs. I also have one question for this on stackoverflow in hope for getting a workaround but it seems to be impossible for the moment.However, I've managed to upgrade to Angular 9 and I'm not sure if this is fixed in Angular 9 or not (it seems to be) but the empty
<style>tags are gone.14 remaining items
angular-automatic-lock-bot commentedon Jun 3, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.