New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

postcss-inline

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-inline

PostCSS plugin that puts fonts / and images as data URIs into your CSS

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

PostCSS Inline Build Status

PostCSS plugin that puts images and fonts as data URIs into your CSS. (based on PostCSS Image Inline)

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.woff') format('woff');
}
.foo {
    background-inline: url(one_pixel_transparent.gif);
}
@font-face {
  font-family: 'MyWebFont';
  src: url('data:application/x-font-woff;base64,AACH5BAEAAAAALA...==') format('woff');
}
.foo {
    background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==);
}

Usage

postcss([ require('postcss-inline') ])
// Inline only woff files:
postcss([ require('postcss-inline'){filter: /.woff$/} ])
// Specify the base path for the assets
postcss([ require('postcss-inline'){basePath: '/some/path'} ])

See PostCSS docs for examples for your environment.

Keywords

postcss

FAQs

Package last updated on 15 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts