Skip to content

pantoken / flatten-property

flatten-property

Beta

@pantoken/plugin-flatten-property — huri i ngā at-rule @property ki ngā tauākī rawa-ā-taonga (custom-property) māmā.

Ngā at-rule @property e rēhita ana i ngā rawa ritenga CSS whai momo mā ngā whakaahuatanga syntax, inherits, me initial-value. He nui tō rātou utu pitopito kōnae — tata ki te 60 pātene mō ia rawa — ā, kāore e hiahiatia ana mēnā he pūtau kotahi te paparanga ārahi ā–tiraa (stylesheet) kaore hoki he painga mō te rēhitatanga momo i te wā whakahaere. Ka whakakapi tēnei pūtahuri i ia tūnga @property ki tētahi tauākī --name: value noa i roto i tētahi kairēhita kua whiriwhiria, kia whakahokia mai ngā utu pitopito katoa.

Tuhipānga ā-wairua: ka tangohia te @property ka ngaro te rēhitatanga momo CSS. Kei runga i tēnei rēhitatanga ngā whakawhitinga/aho huringa (typed transitions/animations), @starting-style, me te CSS Typed OM. Whakamahia anake tēnei ki ngā pūtau (bundles) kāore ēnei tikanga e hiahiatia.

Tauira

ts
import postcss from "postcss";
import { flattenProperty } from "@pantoken/plugin-flatten-property";
const out = postcss([flattenProperty()]).process(css, { from: undefined }).css;

Ngā Atanga

Ngā Taipūtī