I would like to propose a patch to Pod::HTML (and consequently to
pod2html) by allowing to specify a stylesheet to be inlined in the
HTML output (instead of a link as it is already supported).
Today if you say
$ pod2html --css=s.css t.pod
a HTML page is produced with the link
<link rel="stylesheet" href="s.css" type="text/css" />
With the extension you could use it as
$ pod2html --icss=s.css t.pod
and the HTML page would contain a tag like
<style type="text/css">
... the contents of s.css
</style>
The rationale is being able to produce a self-contained HTML page
without having to send together the stylesheet as a separate file.
This if for the case when the page is not online.
Is it worthy? Should I submit such a patch? A long time ago I
questioned on this issue and was told to contribute to the new
POD->HTML processors (which are based on Pod::Simple and the way to
go). But Pod::HTML is the one at the standard Perl distribution.
In the case of a positive, there are some decisions to be taken in
this minor patch and I would gladly like to hear suggestions on what
would work best:
* Another alternative to a switch --icss would be to overload --css
with some special pattern for inlining: for example, --css=s.css keeps
the actual meaning and --css=+s.css means find and inline "s.css".
What is nicer?
* While the actual meaning waits for URL, the inline option would
expect for a path that must be resolved at the local machine where
pod2html is run. If the stylesheet cannot be found, it would be a good
idea:
+ to warn and ignore, or
+ to warn and revert to including a link?
* If the switch --icss is added, what should be done if --css and
--icss are both included?
Regards,
Adriano.