How to add a custom css stylesheet to Umbraco Admin
Asked Answered
P

2

7

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

Prone answered 16/1, 2013 at 15:5 Comment(0)
A
8

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.

Alcoholism answered 6/2, 2016 at 1:47 Comment(0)
M
0

This may not be much help, but the first thought that comes to mind is some sort of HTTP handler which could inject the CSS file into the markup. I don't have a lot of experience with it, but I know it's a common approach for analytics tracking and the like.

Murmurous answered 18/6, 2013 at 16:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.