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
Open
Conversation
…..> tags can be used
…17.1 Added "test" scope to logback and log4j - libraries should not be placing explicit dependencies on logging libraries.
alanhay
approved these changes
Mar 26, 2024
alanhay
approved these changes
Mar 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.,