Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@csstools/postcss-font-format-keywords

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-font-format-keywords

Use unquoted format on @font-face CSS definitions.

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9M
increased by4.75%
Maintainers
3
Weekly downloads
 
Created
Source

PostCSS Font Format PostCSS Logo

npm version CSS Standard Status Build Status Discord

PostCSS Font Format Keywords lets you specify font formats as keywords, following the CSS Fonts specification.

@font-face {
  src: url(file.woff2) format(woff2);
}

/* becomes */

@font-face {
  src: url(file.woff2) format("woff2");
}

See prior work by valtlai here postcss-font-format-keywords To ensure long term maintenance and to provide the needed features this plugin was recreated based on valtlai's work.

Usage

Add PostCSS Font Format Keywords to your project:

npm install postcss @csstools/postcss-font-format-keywords --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssFontFormatKeywords = require('@csstools/postcss-font-format-keywords');

postcss([
  postcssFontFormatKeywords(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Font Format Keywords runs in all Node environments, with special instructions for:

NodePostCSS CLIWebpackGulpGrunt

Options

preserve

The preserve option determines whether the original source is preserved. By default, it is not preserved.

postcssFontFormatKeywords({ preserve: true })
@font-face {
  src: url(file.woff2) format(woff2);
}

/* becomes */

@font-face {
  src: url(file.woff2) format("woff2");
  src: url(file.woff2) format(woff2);
}

Keywords

FAQs

Package last updated on 15 Dec 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