Blame view

node_modules/postcss-merge-idents/README.md 1.61 KB
aaac7fed   liuqimichale   add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  # [postcss][postcss]-merge-idents [![Build Status](https://travis-ci.org/ben-eb/postcss-merge-idents.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-merge-idents.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-merge-idents.svg)][deps]
  
  > Merge keyframe and counter style identifiers.
  
  
  ## Install
  
  With [npm](https://npmjs.org/package/postcss-merge-idents) 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
  
  ```css
  @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
  
  ```css
  @keyframes flip {
      from { transform: rotate(0) }
      to { transform: rotate(360deg) }
  }
  
  .rotate {
      animation-name: flip
  }
  
  .flip {
      animation-name: flip
  }
  ```
  
  
  ## Usage
  
  See the [PostCSS documentation](https://github.com/postcss/postcss#usage) 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](http://beneb.info)
  
  
  [ci]:      https://travis-ci.org/ben-eb/postcss-merge-idents
  [deps]:    https://gemnasium.com/ben-eb/postcss-merge-idents
  [npm]:     http://badge.fury.io/js/postcss-merge-idents
  [postcss]: https://github.com/postcss/postcss