postcss-merge-idents

Merge keyframe and counter style identifiers.

MIT 52 个版本
安装
npm install postcss-merge-idents
yarn add postcss-merge-idents
pnpm add postcss-merge-idents
bun add postcss-merge-idents
README

postcss-merge-idents

Merge keyframe and counter style identifiers.

Install

With npm do:

npm install postcss-merge-idents --save

Example

This module will merge identifiers such as @keyframes and @counter-style, if their properties are identical. Then, it will update those declarations that depend on the duplicated property.

Input

@keyframes rotate {
    from { transform: rotate(0) }
    to { transform: rotate(360deg) }
}

@keyframes flip {
    from { transform: rotate(0) }
    to { transform: rotate(360deg) }
}

.rotate {
    animation-name: rotate
}

.flip {
    animation-name: flip
}

Output

@keyframes flip {
    from { transform: rotate(0) }
    to { transform: rotate(360deg) }
}

.rotate {
    animation-name: flip
}

.flip {
    animation-name: flip
}

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

版本列表
8.0.1 2026-06-11
8.0.0 2026-05-06
7.0.3 2026-05-02
7.0.2 2026-04-20
7.0.1 2025-05-06
7.0.0 2024-04-24
6.0.3 2024-03-06
6.0.2 2024-02-22
6.0.1 2023-12-14
6.0.0 2023-03-27
5.1.1 2022-03-21
5.1.0 2022-03-01
5.0.3 2022-02-07
5.0.2 2022-01-07
5.0.1 2021-05-19
5.0.0-rc.2 2021-03-15
5.0.0-rc.1 2021-03-05
5.0.0-rc.0 2021-02-19
5.0.0 2021-04-10
4.0.1 2018-09-24
4.0.0-rc.2 2017-08-06
4.0.0-rc.0 2017-06-01
4.0.0 2018-07-04
2.1.7 2016-08-16
2.1.6 2016-05-10
2.1.5 2016-02-07
2.1.4 2016-01-24
2.1.3 2015-10-26
2.1.2 2015-10-26
2.1.1 2015-10-08
2.1.0 2015-09-10
2.0.0 2015-09-04
1.0.2 2015-09-01
1.0.1 2015-05-13
1.0.0 2015-05-10