1
votes

what class to test in fallback of fontawesome css stylesheet in ASP.net Core 2.2 Tag helper

i have done this but by F12 Developer Options Network in Chrome showing both cdnjs and local lib is getting downloaded.

<!--font awesome css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css"
      integrity="sha256-zmfNZmXoNWBMemUOo1XUGFfc0ihGGLYdgtJS3KCr/l0=" crossorigin="anonymous"
      asp-fallback-href="~/lib/font-awesome/css/all.min.css" asp-append-version="true"
      asp-fallback-test-class="fas" asp-fallback-test-property="font-family" asp-fallback-test-value="Font Awesome 5 Free" />

I have tested with Class fa & far & fas with font-family: Font Awesome 5 Free & font-family: FontAwesome

I am using version Font Awesome Free 5.10.2. I only need far & fas i.e. regular and solid should i use all.min.css?

1

1 Answers

1
votes
  1. In .min file should be the same classes with same attributes and values. But you can try this: asp-fallback-test-class="fab" asp-fallback-test-property="font-style" asp-fallback-test-value="normal"
  2. try to add this: asp-suppress-fallback-integrity="true".
  3. and also you can remove this: asp-append-version="true".

More info around point 1 is here: ASP.NET Core Script Tag Helper asp-fallback-src fails integrity check.