Where is the site.css file located for Identity?

后端 未结 1 1013
自闭症患者
自闭症患者 2020-12-18 12:54

I have an asp.net core 2.1 MVC application. I have ran the Scaffold Identity which has generated all the HTML and models used. I can\'t however find the css file that identi

相关标签:
1条回答
  • 2020-12-18 12:56

    The Identity default UI is a Razor Class Library. The static resources are being embedded and loaded from the library. Specifically, the Static Files middleware is loading up the embedded resources as if they were on the filesystem, using a ManifestEmbeddedFileProvider.

    Long and short, you can override those by simply creating files in the same location in your project. Then, your project's versions will take over. Unfortunately, the scaffold doesn't provide a way to scaffold static resources as well. However, you can simply view the source in your browser and then copy that into your project's version of the file.

    You can also view the source of the RCL here. That way you can reference whatever code you need, without even needing the scaffold. Anything you add to your own project overrides what's coming from the RCL.

    0 讨论(0)
提交回复
热议问题