Skip to content

Support external .css files via <link .../> elements in HTML <head> element + all enhancements from the fusionnx fork#29

Open
chrisco484 wants to merge 4 commits intoalanhay:masterfrom
chrisco484:master
Open

Support external .css files via <link .../> elements in HTML <head> element + all enhancements from the fusionnx fork#29
chrisco484 wants to merge 4 commits intoalanhay:masterfrom
chrisco484:master

Conversation

@chrisco484
Copy link

@chrisco484 chrisco484 commented Mar 20, 2024

Some HTML is produced by tools which do not 'auto embed' the contents of #include files into the generated source but assume that the HTML processor will be able to include .css files added via <link .. /> elements in the header at processing time.
Previously html-exporter was not such a HTML processor but with this enhancement, by setting an IResourceLoader, html-exporter is capable of handling external .css files specified in <link ../> elements within the element.

The demo report.vm includes a file called report.css - this was not a "well formed" .css file because its contents were wrapped within:

<style>
...
</style>

Note: With support for external css files the report.css file needed to be a "well formed" .css file so the <style..> wrapper has been removed from the .css file and placed within the report.vm file. This means that the new demo file report-external-css.vm can share this report.css file.

The inclusion of external .css files is facilitated with an implementation of IResourceLoader that must be supplied by the user of the html-exporter library so that implementation is completely up to the user.
The IResourceLoader implementation must be set via:

excelExporter.setResourceLoader(resourceLoader);

prior to calling:

excelExporter.exportHtml(...)

A sample implementation is provided in the ../demo/ReportGeneratorExternalCss.java file.

Also - includes the changes from the fusionnx fork which add support for size attributes that have trailing suffixes like 'pt', 'px', '%' etc.,

…17.1

Added "test" scope to logback and log4j - libraries should not be placing explicit dependencies on logging libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants