What is the syntax to include subresource integrity when using @import?
@import url(//use.fontawesome.com/releases/v5.3.1/css/all.css);
Besically how do I include the subresource integrity and crossorigin parameters when using @import
like above?
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
TL;DR: SRI is a browser-thing, CSS at-rules (like @import) are a css-thing.
What is the syntax to include subresource integrity when using @import?
From what I can tell, there is nothing in the current CSS spec (CSS3 drafted as of writing this) - where usage of @import is defined - that details usage of SRI for css.
Besically how do I include the subresource integrity and crossorigin parameters when using @import like above?
Those parameters define how the browser fetches the resource and interprets its legitimacy. This happens before the resource is implemented (js, css, etc.).
External Resources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With