package
inline() plugin for rework, formerly included in core
npm install rework-plugin-inlineGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
inline() plugin for rework, formerly included in core
Inline files from dir directly to CSS. Replace inline(path) to Data URI
with base64 encoding of file. It is useful for small images and fonts.
Of course, you can use inline only with node. It is not available in the browser with component.
var css = rework(read(css))
.use(rework.inline('images/', 'fonts/'))
.toString().logo {
background: inline(icons/logo.png);
}yields:
.logo {
background: url("data:image/png;base64,iVBORw0…");
}slexaxton
alexsexton@gmail.com
Estimated unpacked size across 4 packages.
157.4 kB
Includes dependencies.