Search code examples
c#.net-coreidentityserver4

How do I overwrite the default "site.css" that is generated -by something- in dotnet core in the account management mvc section


I have created a scaffolded SPA application where a default UI MVC project was created. I have managed to "scaffold" this where I now have all the .cshtml for account management files locally. I see a "site.css" file loaded from some location somewhere. I want to copy the contents of this file, place it locally -so I can edit it-.

I can simply remove the reference to site.css and add my own *.css reference. But it seems odd that a site.css file is being generated from somewhere and it isn't obvious where it comes from.

The only information I can find on this strange behaviour is: Where is the site.css file located for Identity?

"you can override those by simply creating files in the same location in your project"

I have tried creating site.css in the "same location"(where is the same location?) but it didn't work. It still loads site.css


Solution

  • [project root]/wwwroot/css/site.css

    All public facing files are in the wwwroot folder. So that is where your css, images, javascript, etc. files will go.

    • Note: "wwwroot" folder is near the top in the Solution Explorer, it doesn't follow the ABC ordering.