Interestingly enough, using the old {#asset}
directive to inject the assets works perfectly - I can split everything into different files and mix-and-match as I wanted. Should that be considered a regression bug, maybe?
diego-bevilaqua86
@diego-bevilaqua86
Posts made by diego-bevilaqua86
-
RE: Splitting CSS files
-
RE: Splitting CSS files
Another thing I tried and haven't been successful in doing is using CSS's native
@import
to load different CSS files into one. Is that something possible, with a file URL inside the directive, instead of an{{asset}}
? -
RE: Splitting CSS files
Thanks for the help @jan_blaha. I'd read about components already, but it was my understanding they were meant to be used to split the template i.e. split parts of my report's handlebars template. I'll give it a try then.
-
Splitting CSS files
My company has already some different reports that share common CSS. As the reports grow, also grow the CSS we've been mantaining, so in order to make it something more manageable, I wanted to split it into different CSS files and mix-and-match according to my needs to each report. The idea is something like:
/shared /css base.css system-font.css ...
And whatever else we needed. With that structure, I wanted to then import, for example,
system-font.css
intobase.css
. That's where my problem begins, as I can't do it using CSS's@import
statement, and trying to use JSReport's{{asset}}
doesn't work either - possible assets inside the "imported" CSS file are not correctly parsed and included in the final file. How should I proceed to do this? Is it even something possible to be done?In this playground it's possibile to see what I've tried to explain above.