maxisoft-git / postcss-b64i

Postcss plugin include inline base64 file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Postcss plugin include inline base64 file

License:MIT License


Languages

Language:JavaScript 100.0%