0.1.3 • Published 8 years ago

postcss-b64i v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Inline base64 image

body {
  background: inline-image-files('../assets/img/logo.png') no-repeat top left transparent;
}
body {
  background: url(data:imageimage/png;base64,...) no-repeat top left transparent;
}

Font-face base64 inline font

@font-face{
	font-family:"Roboto";
	font-style:normal;
	font-weight:100;
	src:inline-font-files('../fonts/roboto/roboto-thin.woff2') format("woff2");
}	
@font-face{
	font-family:"Roboto";
	font-style:normal;
	font-weight:100;
	src:url(data:application/font-woff2;base64,....) format("woff2");
}	

Usage

postcss([ require('postcss-b64i') ])

See PostCSS docs for examples for your environment.