The directives and syntax both you have used are valid
but as per Content Security Policy Level 3 specifications, which are under Working Draft status right now.
Modern Chrome and Edge browsers are now fully support Content Security Policy Level 2 specifications as well as Content Security Policy Level 3 specifications partially. While Firefox has partial support to Content Security Policy Level 2 and Level 3 specifications till now, and this is the reason why Chrome and Edge browser showing all your content correct but Firefox. (please update your Firefox version and then re-check).
https://caniuse.com/#search=content%20security%20policy%20level

FYI, If your browser supports, style-src-attr can be used in conjunction with style-src. If this directive is absent, the user agent will look for the style-src directive, and if both of them are absent, fallback to default-src directive.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src-attr
Coming back to answer, now resolve this issue your Content Security policy header should be like below which is supported by almost all browsers.
context.HttpContext.Response.Headers.Add("Content-Security-Policy","style-src 'unsafe-inline'; script-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'self'");
Update:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src-attr#Browser_compatibility

This is a bug in Mozilla, which is already reported by someone ten months ago, maybe fixed in new updates.
https://bugzilla.mozilla.org/show_bug.cgi?id=1529338