Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a custom css stylesheet to Umbraco Admin

Wondering if anyone knows how to add a custom css stylesheet to the admin backend section, without altering the original masterpages/umbraco.aspx.

I have a custom section implemented, so it has it's own section tray icon, and I can add the css to the 'umbracoGui.css', but I'd like to just 'inject' my own css file for any further styles too, knowing that all of the original files are intact.

In summary, say I have customStyle.css, with all of my css in. To add it to the head of the whole of the admin section.

There seems to be a few mentions of skinning, but it seems a bit overkill to me.

Is there a way of creating a class or something, that can register the stylesheet, or something like that?

Thanks for any help!

Cheers, Bav

like image 960
SatBav Avatar asked Jan 16 '13 15:01

SatBav


1 Answers

In case anyone is still looking for an answer to this, Umbraco 7 (at least, I'm not sure if this applies to earlier versions) has the ability to inject a stylesheet into pages using the App_Plugins folder. Add a new sub-folder, create a JSON package.manifest file in the new folder that looks something like e.g.

{
  css: [ '~/App_Plugins/YourFolder/customStyle.css' ]
}

Then obviously create the custom stylesheet at the specified location in the App_Plugins folder and the stylesheet markup should appear in pages being served.

like image 90
David Clarke Avatar answered Sep 29 '22 18:09

David Clarke