Opal-Estate-Pro/node_modules/postcss-merge-idents
2019-09-13 09:44:33 +07:00
..
dist uapte 2019-09-13 09:44:33 +07:00
CHANGELOG.md uapte 2019-09-13 09:44:33 +07:00
LICENSE-MIT uapte 2019-09-13 09:44:33 +07:00
package.json uapte 2019-09-13 09:44:33 +07:00
README.md uapte 2019-09-13 09:44:33 +07:00

postcss-merge-idents Build Status NPM version Dependency Status

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.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs