Why does adding the following header cause Firefox only to empty all style="" attributes when rendered in the browser?
context.HttpContext.Response.Headers.Add("Content-Security-Policy", "style-src-attr 'unsafe-inline'; script-src-elem 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'self'");
Chrome and Edge browser show all content correct that means the style attribute`s value was not cleared to "".


First of all I could not reproduce the problem. When I added your Content-Security-Policy Firefox displayed inline styles just fine (v 70.0.1, 64 bit).
Then I tested your CSP with https://cspvalidator.org and it gave the following errors
Which would make sense since those attributes do not exist according the site https://content-security-policy.com/
So the CSP should propably be