Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 699 Bytes

README.md

File metadata and controls

42 lines (33 loc) · 699 Bytes

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.