Package detail

postcss-font-format-keywords

valtlai143ISCdeprecated4.0.2

Package discontinued. Please use @csstools/postcss-font-format-keywords instead.

Specify font formats as keywords in CSS

postcss-plugin, css, font-face, fonts

readme

PostCSS Font Format Keywords PostCSS

NPM

This PostCSS plugin 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");
}

[!IMPORTANT]

❌ Deprecated

This module is deprecated and will not receive any updates anymore. Please use @csstools/postcss-font-format-keywords instead.

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

Install

npm install postcss-font-format-keywords

Usage

import postcss from 'postcss';
import formatKeywords from 'postcss-font-format-keywords';
// OR
const postcss = require('postcss');
const formatKeywords = require('postcss-font-format-keywords');

await postcss([formatKeywords]).process(YOUR_CSS);

Options

preserve: true

Keep the original CSS declaration alongside the transformed one.

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

changelog

Changelog

This project uses semantic versioning.

v4.0.2 (2023-11-03)

4.0.1 (2022-11-03)

  • Fixed readme

4.0.0 (2022-11-03)

  • BREAKING: Removed the singleQuote option
  • BREAKING: Dropped the support for Node.js 12 and 17 (so Node.js 14, 16, and 18 or greater are now supported)
  • Added a new option preserve: true to keep the original CSS declaration alongside the transformed one
  • Changed the license from MIT to ISC

3.0.2 (2021-05-31)

  • Updated readme

3.0.1 (2021-05-26)

  • Fixed readme

3.0.0 (2021-05-26)

  • BREAKING: Dropped the support for Node.js 10 and 15 (so Node.js 12, 14, and 16 or greater are now supported)
  • Added an ESM version for Node.js
  • Added support for Deno 🦕

2.0.2 (2020-10-23)

  • Fixed the postcss peer dependency version to be ^8.0.0

2.0.1 (2020-09-22)

  • Removed the development fields from package.json before publishing

2.0.0 (2020-09-17)

  • BREAKING: Moved to PostCSS 8
  • BREAKING: Removed the support for non-lowercase identifiers
  • BREAKING: Made postcss a peer dependency
  • BREAKING: Added support for Node.js 10 and dropped from v13
  • Added the new collection format keyword
  • Added tests
  • Updated the dependencies

1.0.3 (2020-05-25)

  • Updated the changelog format
  • Updated the ESLint config
  • Removed the package-lock

1.0.2 (2019-12-10)

  • Refactored code
  • Meta: renamed the changelog file
  • Meta: clarified the previous changelog item

1.0.1 (2019-12-09)

  • Meta: added the license badge
  • Meta: added more package keywords

1.0.0 (2019-12-09)

  • Initial release