I am currently working on implementing a plugin which is based on custom css.
Therefore I need to inject the styles into the application. Since I am quite new to indico I am also quite clueless on how to achieve the import. I read about an inject-css function but it seems to be deprecated.
Therefore I would be delighted if someone could help me with this topic.
Just wondering, Search · inject_bundle · GitHub doesn’t show any examples of injecting a CSS file, only JS files. Are there examples with CSS files as well? And is it possible to inject a CSS file only in the payment process, but not to all pages of a specific type?
Hi,
Sorry but I don’t get it. Under my plugin folder I have a css file inside a folder as I see in the examples: “static/client/style.css” (also tried placing it just under “static/style.css”) .
Then in my plugin class init() method I use this code:
self.inject_bundle(‘style.css’, WPRequestsEventManagement)
But I don’t see my css loaded at all.
Can you tell me what’s wrong with this? Where should I put my css and then inject it? Should it be a .css file or a .scss file?
Thanks
ah! this step I did not do. We don’t have an “Indico development” site (our dev server has a production install)
I see that that script is not available to me.
So there’s no other way I can get this css to be picked up by my plugin?
Thanks for your response
You MUST use a dev install to do well… development. Having a ‘dev server’ for testing is a good idea (usually people call this “staging” or “qa” though), but for actual development tasks you need to have a dev setup. Typically that’s locally on each developer’s PC or some virtual machine…