Skip to content

pantoken / plugins/postcss/flatten-property/src / flattenProperty

Taipūtī: flattenProperty

const flattenProperty: {(options?): Plugin; postcss: true; }

Beta

Hangaia te taapiri PostCSS flatten-@property.

Haerehia ngā at-rule @property katoa i te raupapa kāhua, tangohia ia whakamārama initial-value, whakamokohia te at-rule, ā, whakamuahia tētahi ture injectSelector { --name: value; … } kotahi e rongo ana i ngā tuhinga kua tangohia. Ka whakahēhia ngā ture kāhore he ihirangi me ngā poraka @layer i toe i muri i te tangohanga.

Type Declaration

Ngā Tawhā

options?

FlattenPropertyOptions

FlattenPropertyOptions.

Whakahokia

Plugin

He PostCSS Plugin.

postcss

postcss: true

Tohu mono PostCSS e hiahiatia ana.

Ngā tauira

Tāpokina taunoa ki roto i :root

ts
import postcss from "postcss";
import { flattenProperty } from "@pantoken/plugin-flatten-property";

const out = postcss([flattenProperty()]).process(css, { from: undefined }).css;

Tāpokina ki :scope (mō te whakamahi i roto i ngā poraka scope)

ts
import postcss from "postcss";
import { flattenProperty } from "@pantoken/plugin-flatten-property";

const out = postcss([flattenProperty({ injectSelector: ":scope" })]).process(css, { from: undefined }).css;
ts
Preserve