[Seaside] Inlining styles in document (also: reporting)

Philippe Marschall philippe.marschall at gmail.com
Fri Sep 14 08:02:34 UTC 2018


On Thu, Sep 13, 2018 at 8:25 PM Esteban A. Maringolo
<emaringolo at gmail.com> wrote:
>
> Hi,
>
> I need to export an HTML document from Seaside, which is done easily by
> creating a new canvas builder and rendering a full document with it.
>
> What I'm rendering in the exported document is very similar to what's
> rendered on screen without a few "interactive" elements.
>
> The issue I face is that I should include a minimum set of CSS rules in
> the .html file to produce an output that looks as close as possible to
> the one displayed on screen.
>
> I've done this manually before to send styled HTML formatted mails, but
> now I'd like to integrate something like bootstrap.css. Is there a way
> to do it easily? Did anybody create something to ease this?

We have formal support for inline CSS and JavaScript in the upcoming
3.3.0 release [1]. It starts getting tricky when the CSS includes
links to images eg. for backgrounds. In these cases you could try to
"compile" the CSS and replace the image links with data URLs.

 [1] https://github.com/SeasideSt/Seaside/issues/839

Cheers
Philippe


More information about the seaside mailing list