I want to use Bootstrap for my App_Plugin packages. I want to call it once or put in a specific location from where all my plugin packages can reference the css files. How can I do that?
d
D_Inventor
07/06/2023, 6:56 AM
Hi there! If you want multiple packages to make use of this css file, you have several alternatives:
You can put the bootstrap css into a separate package and simply reference it with its own package manifest. Read more about package manifest here: https://docs.umbraco.com/umbraco-cms/extending/property-editors/package-manifest
You can host it in a specific location and use the assetsService in angularjs to insert the bootstrap css into the backoffice. Read more about assetsService here: https://our.umbraco.com/apidocs/v8/ui/#/api/umbraco.services.assetsService
That being said: I recommend you to be careful with bootstrap, because the backoffice has several overlapping classes and including bootstrap may break certain parts of the backoffice.
s
shakir820
07/06/2023, 8:55 AM
Thanks a lot.
m
Mike Chambers
07/06/2023, 10:11 AM
can you not leverage shadowdom like in blockgrid/list to mitigate namespacing collisions? or namespace a custom bootstrap build?