HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.43k stars 1.71k forks source link

UseDashboardStylesheet does not load custom CSS #2373

Open BartNetJS opened 9 months ago

BartNetJS commented 9 months ago

This my instrumentation

var assembly = typeof(Program).GetTypeInfo().Assembly;
var styleSheetName = "customhangfire.css";
var resourceName = assembly.GetManifestResourceNames()
                           .FirstOrDefault(name => name.EndsWith(styleSheetName));

if (resourceName != null)
{
    GlobalConfiguration.Configuration.UseDashboardStylesheet(assembly, resourceName);
} else
{
    Log.Warning($"Custom style sheet '{styleSheetName}' for hangfire not found as embedded source in assembly '{assembly.FullName}'");
}

but the css is not loaded:

image

AsuraKev commented 8 months ago

I think i am having this issue as well. None of my custom stuff is loaded, it just loads the original css

image

odinserj commented 8 months ago

The stylesheets are being embedded into the css* and css-dark* resources and not served separately. I think it is UTF-BOM character in the beginning of the custom CSS file, which prevents new styles from appearing. Please check your css files and remove the BOM character from the beginning of the file, the methods depends on your editor.

AsuraKev commented 8 months ago

Thanks. still not working. None of the styles were being applied

image

my dark.css

image