Closed p0onage closed 4 years ago
Hello @p0onage, I've just tried to use a custom css sheet in wwwroot and it's working for me, could you try this?: Css definition:
:root {
--primaryColor: #68217a;
--secondaryColor: #f4f4f4;
--bgMenuActive: #8e47a0;
--bgButton: #68217a;
--logoImageUrl: url('https://dotnetfoundation.org/img/logo_footer.png');
--bgAside: var(--primaryColor);
}
Code:
app.UseRouting()
.UseAuthentication()
.UseAuthorization()
.UseEndpoints(config =>
{
config.MapHealthChecks("/health-random", new HealthCheckOptions
{
Predicate = r => r.Tags.Contains("random"),
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
config.MapHealthChecks("/health-process", new HealthCheckOptions
{
Predicate = r => r.Tags.Contains("process"),
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
config.MapHealthChecksUI(setup =>
{
setup.AddCustomStylesheet("wwwroot/dotnet.css");
})
//.RequireAuthorization("AuthUserPolicy")
;
config.MapDefaultControllerRoute();
});
@CarlosLanderas, I had this at the end of my start-up using your example worked thanks!
app.UseHealthChecksUI(config => config.UIPath = "/hc-ui");
I've added the following into my startup class
Inside the wwwroot folder, I have the dotnet.css file
:root { --primaryColor: #5ec297 !important; --bgImageLigthen: linear-gradient( rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8) ) !important; --logoImageUrl: url('/images/mylogo.png') !important; }
why are the override CSS styles not working?