Socket
Socket
Sign inDemoInstall

postcss-remote-font-inliner

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-remote-font-inliner

A postcss plugin for inlining remote fonts


Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS Remote Font Inliner

I had a very specific use case for base64 inlining hosted fonts (in my case Google). All this plugin does is look for font-face src declarations with http(s) urls, downloads the fonts, base64 encodes them, and inlines them.

It works very well with Font Magician.

Usage

Simply include it in your postcss pipeline:

postcss([
   require('postcss-remote-font-inliner')()
]).process(
   fs.readFileSync('./css/src/style.css', 'utf8')
).then(function (result) {
   fs.writeFileSync('./css/style.css', result.css);
});

Options

Currently, there are none.

License

MIT

Keywords

FAQs

Package last updated on 19 Nov 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc