Actually I have looked at the documentation, but what I am looking for here is how to style the backoffice editor view and I can't find any documentation on this (when working grid layout). Do I create a .css file somewhere and somehow make it accessible to Umbraco. Right now I'm doing inline styles inside the App_plugins/[package]/Views/[view].html, but this doesn't quite feels right :D
Aaaa, like that - Hmmm that's a good question. I'm actually not sure about any other ways than you have just described. Perhaps it's something that should be added as a feature request on the issue tracker since the approach you're using feels a bit dirty even though it works :)
I am trying to apply styles to the back office editor view of a grid. In the datatype definition there is the option to apply stylesheets but does this apply only to the RTE and not the entire grid?
It only applies to the RTE. Looks like your are trying to achieve the same thing I was (styling the back office editor view).
I ended up doing the styling inline inside the App_plugins/[package]/Views/[view].html. Not an ideal solution, but it worked.
What I have worked out is that if I apply a stylesheet directly to the editor view .cshtml then it gets applied. I don't want to do this as it ends up showing on front end site too. Is there a way of selectively applying this? e.g.
That's a good question. I actually don't know if you are able to selectively apply it. I think you should post a new question in the forum regarding this.
I've come up with a solution that seems to work for us, we include the stylesheet in the package manifest for LeBlender, however this meant that all our styles would be applied to the entire Umbraco back end, to solve this we created a new sass file and wrapped our imports in a selector for the editors we wanted (in our case .list-editor) which also means there is no bloat on the front end stylesheet.
Editor styles (grid layout)
Hi all,
Where do I place custom grid layout editors styles/css? inline on the editor view itself?
Can figure out what the "Stylesheet" property does on the Umbraco.Grid data type. :/
/Mathias
Hi Mathias
Have you had a look on the documentation about the grid editor where it mentions how to change/add styles here https://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors-v7/grid-layout
/Jan
Actually I have looked at the documentation, but what I am looking for here is how to style the backoffice editor view and I can't find any documentation on this (when working grid layout).
Do I create a .css file somewhere and somehow make it accessible to Umbraco.
Right now I'm doing inline styles inside the App_plugins/[package]/Views/[view].html, but this doesn't quite feels right :D
Hi Mathias
Aaaa, like that - Hmmm that's a good question. I'm actually not sure about any other ways than you have just described. Perhaps it's something that should be added as a feature request on the issue tracker since the approach you're using feels a bit dirty even though it works :)
/Jan
Okay - I'll go dirty inline style for now and if no one has a magical solution by tommorow I'll add a feature request. :) Thanks Jan!
I am trying to apply styles to the back office editor view of a grid. In the datatype definition there is the option to apply stylesheets but does this apply only to the RTE and not the entire grid?
It only applies to the RTE. Looks like your are trying to achieve the same thing I was (styling the back office editor view). I ended up doing the styling inline inside the App_plugins/[package]/Views/[view].html. Not an ideal solution, but it worked.
What I have worked out is that if I apply a stylesheet directly to the editor view .cshtml then it gets applied. I don't want to do this as it ends up showing on front end site too. Is there a way of selectively applying this? e.g.
@if(adminMode== true){
}
That's a good question. I actually don't know if you are able to selectively apply it. I think you should post a new question in the forum regarding this.
/mathias
I'm using LeBlender so have found this which works perfectly:
if(!Lecoati.LeBlender.Extension.Helper.IsFrontEnd()){ }
You can use UmbracoContext.IsFrontEndUmbracoRequest and add your style, but not sure if this will work.
I want to try this, but not sure where to include my custom stylesheet, can anyone help?
I've come up with a solution that seems to work for us, we include the stylesheet in the package manifest for LeBlender, however this meant that all our styles would be applied to the entire Umbraco back end, to solve this we created a new sass file and wrapped our imports in a selector for the editors we wanted (in our case .list-editor) which also means there is no bloat on the front end stylesheet.
is working on a reply...