Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Specify font formats as keywords in CSS — ❌ Deprecated: use `@csstools/postcss-font-format-keywords` instead

License

Notifications You must be signed in to change notification settings

valtlai/postcss-font-format-keywords

Repository files navigation

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);
}

About

Specify font formats as keywords in CSS — ❌ Deprecated: use `@csstools/postcss-font-format-keywords` instead

Topics

Resources

License

Stars

Watchers

Forks