How to override css from child module to parent module
Dear Ivy team.
I just wanna ask you that is there any possibility to override CSS from child module to parent module.
For example, we are having 2 ivy projects: project Parent and project Child, Child depends on Parent and both of them are deployed in the same application.
We need to change some style for both of them but the problem is we don't have right to modify project Parent. So in project Child, we defined some custom CSS styles and import it in XHTML page. This way works well for only views that belong to Child project, but with the view in Parent project, it can't work because we can't inject our CSS to Parent project.
Our attempt was creating a custom theme as this suggestion: [https://answers.axonivy.com/questions/12/how-to-create-my-own-theme-for-html-user-dialogs][1] and put this jar file under Designer/Engine folder. The way just works perfectly, our custom CSS style can apply for both Parent and Child. But the small problem is whenever we change our style, we need to build the jar and put it in Designer/Engine manually, it's really not convenient.
So to overcome this inconvenience, we try to put our custom theme in project Child with the same structure of custom PrimeFaces theme like this:
![alt text][2]
With this way still only work for Child project, not Parent project because when we start a view in Parent project, we got a problem:
FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-serenity-bluegrey" library
that error comes from org.primefaces.renderkit.HeadRenderer
![alt text][3]
After debugging, I figure out that Ivy also takes part in the resource loading process:
![alt text][4]
Unfortunately, we can't see what inside that class and don't know is there any possibility to inject our custom CSS into that process.
I know that inject CSS from child to parent is something weird but actually, we can't find an alternative way.
So I just wanna ask you that is there any possibility to inject CSS from child to parent?
Thank in advance!
[1]: https://answers.axonivy.com/questions/12/how-to-create-my-own-theme-for-html-user-dialogs
[2]: https://answers.axonivy.com/upfiles/Image1.png
[3]: https://answers.axonivy.com/upfiles/Image2.png
[4]: https://answers.axonivy.com/upfiles/Image3.png