Dust.HTML.Styles (Dust v0.0.2-dev) View Source

Link to this section Summary

Functions

Split and prepare each CSS asset and embed Base64 encoded images into each stylesheet. It needs both image assets and stylesheets to lookup references to images in CSS sources and replace them with data images.

Link to this section Types

Specs

styles() :: [binary()]

Link to this section Functions

Specs

inline([Dust.Asset.t()] | keyword()) :: styles()

Split and prepare each CSS asset and embed Base64 encoded images into each stylesheet. It needs both image assets and stylesheets to lookup references to images in CSS sources and replace them with data images.

Parameters:

  • assets list of stylesheets and images [css: [...], image: [...]].

Returns:

  • [String.t()] CSS content with Base64 encoded and embedded images.