cssminify 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/.gitignore +9 -0
  2. data/CHANGES.md +3 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.md +22 -0
  5. data/README.md +60 -0
  6. data/Rakefile +1 -0
  7. data/cssminify.gemspec +32 -0
  8. data/lib/cssminify.rb +34 -0
  9. data/lib/cssminify/cssmin.rb +379 -0
  10. data/lib/cssminify/version.rb +5 -0
  11. data/spec/cssminify_spec.rb +257 -0
  12. data/spec/sample.css +100 -0
  13. data/spec/spec_helper.rb +4 -0
  14. data/spec/tests/background-position.css +2 -0
  15. data/spec/tests/background-position.css.min +1 -0
  16. data/spec/tests/border-none.css +5 -0
  17. data/spec/tests/border-none.css.min +1 -0
  18. data/spec/tests/box-model-hack.css +9 -0
  19. data/spec/tests/box-model-hack.css.min +1 -0
  20. data/spec/tests/bug2527974.css +10 -0
  21. data/spec/tests/bug2527974.css.min +1 -0
  22. data/spec/tests/bug2527991.css +19 -0
  23. data/spec/tests/bug2527991.css.min +1 -0
  24. data/spec/tests/bug2527998.css +4 -0
  25. data/spec/tests/bug2527998.css.min +1 -0
  26. data/spec/tests/bug2528034.css +5 -0
  27. data/spec/tests/bug2528034.css.min +1 -0
  28. data/spec/tests/charset-media.css +9 -0
  29. data/spec/tests/charset-media.css.min +1 -0
  30. data/spec/tests/color-simple.css +8 -0
  31. data/spec/tests/color-simple.css.min +1 -0
  32. data/spec/tests/color.css +46 -0
  33. data/spec/tests/color.css.min +1 -0
  34. data/spec/tests/comment.css +3 -0
  35. data/spec/tests/comment.css.min +1 -0
  36. data/spec/tests/concat-charset.css +15 -0
  37. data/spec/tests/concat-charset.css.min +1 -0
  38. data/spec/tests/dataurl-base64-doublequotes.css +23 -0
  39. data/spec/tests/dataurl-base64-doublequotes.css.min +1 -0
  40. data/spec/tests/dataurl-base64-eof.css +10 -0
  41. data/spec/tests/dataurl-base64-eof.css.min +1 -0
  42. data/spec/tests/dataurl-base64-linebreakindata.css +34 -0
  43. data/spec/tests/dataurl-base64-linebreakindata.css.min +1 -0
  44. data/spec/tests/dataurl-base64-noquotes.css +26 -0
  45. data/spec/tests/dataurl-base64-noquotes.css.min +1 -0
  46. data/spec/tests/dataurl-base64-singlequotes.css +23 -0
  47. data/spec/tests/dataurl-base64-singlequotes.css.min +1 -0
  48. data/spec/tests/dataurl-base64-twourls.css +27 -0
  49. data/spec/tests/dataurl-base64-twourls.css.min +1 -0
  50. data/spec/tests/dataurl-dbquote-font.css +30 -0
  51. data/spec/tests/dataurl-dbquote-font.css.min +5 -0
  52. data/spec/tests/dataurl-nonbase64-doublequotes.css +13 -0
  53. data/spec/tests/dataurl-nonbase64-doublequotes.css.min +1 -0
  54. data/spec/tests/dataurl-nonbase64-noquotes.css +11 -0
  55. data/spec/tests/dataurl-nonbase64-noquotes.css.min +1 -0
  56. data/spec/tests/dataurl-nonbase64-singlequotes.css +15 -0
  57. data/spec/tests/dataurl-nonbase64-singlequotes.css.min +2 -0
  58. data/spec/tests/dataurl-noquote-multiline-font.css +31 -0
  59. data/spec/tests/dataurl-noquote-multiline-font.css.min +3 -0
  60. data/spec/tests/dataurl-realdata-doublequotes.css +90 -0
  61. data/spec/tests/dataurl-realdata-doublequotes.css.min +1 -0
  62. data/spec/tests/dataurl-realdata-noquotes.css +90 -0
  63. data/spec/tests/dataurl-realdata-noquotes.css.min +1 -0
  64. data/spec/tests/dataurl-realdata-singlequotes.css +90 -0
  65. data/spec/tests/dataurl-realdata-singlequotes.css.min +1 -0
  66. data/spec/tests/dataurl-realdata-yuiapp.css +106 -0
  67. data/spec/tests/dataurl-realdata-yuiapp.css.min +1 -0
  68. data/spec/tests/dataurl-singlequote-font.css +30 -0
  69. data/spec/tests/dataurl-singlequote-font.css.min +3 -0
  70. data/spec/tests/decimals.css +3 -0
  71. data/spec/tests/decimals.css.min +1 -0
  72. data/spec/tests/dollar-header.css +7 -0
  73. data/spec/tests/dollar-header.css.min +3 -0
  74. data/spec/tests/font-face.css +6 -0
  75. data/spec/tests/font-face.css.min +1 -0
  76. data/spec/tests/ie5mac.css +5 -0
  77. data/spec/tests/ie5mac.css.min +1 -0
  78. data/spec/tests/media-empty-class.css +16 -0
  79. data/spec/tests/media-empty-class.css.min +1 -0
  80. data/spec/tests/media-multi.css +3 -0
  81. data/spec/tests/media-multi.css.min +1 -0
  82. data/spec/tests/media-test.css +3 -0
  83. data/spec/tests/media-test.css.min +1 -0
  84. data/spec/tests/opacity-filter.css +14 -0
  85. data/spec/tests/opacity-filter.css.min +1 -0
  86. data/spec/tests/preserve-case.css +15 -0
  87. data/spec/tests/preserve-case.css.min +1 -0
  88. data/spec/tests/preserve-new-line.css +6 -0
  89. data/spec/tests/preserve-new-line.css.min +3 -0
  90. data/spec/tests/preserve-strings.css +7 -0
  91. data/spec/tests/preserve-strings.css.min +1 -0
  92. data/spec/tests/pseudo-first.css +16 -0
  93. data/spec/tests/pseudo-first.css.min +1 -0
  94. data/spec/tests/pseudo.css +4 -0
  95. data/spec/tests/pseudo.css.min +1 -0
  96. data/spec/tests/special-comments.css +13 -0
  97. data/spec/tests/special-comments.css.min +9 -0
  98. data/spec/tests/star-underscore-hacks.css +5 -0
  99. data/spec/tests/star-underscore-hacks.css.min +1 -0
  100. data/spec/tests/string-in-comment.css +8 -0
  101. data/spec/tests/string-in-comment.css.min +1 -0
  102. data/spec/tests/webkit-transform.css +2 -0
  103. data/spec/tests/webkit-transform.css.min +1 -0
  104. data/spec/tests/zeros.css +6 -0
  105. data/spec/tests/zeros.css.min +1 -0
  106. metadata +275 -0
@@ -0,0 +1 @@
1
+ #AddAddressForm{padding:0}#AddAddressForm .messageBoxNeutral{padding:0}#FeedbackMailForm{padding:0}#FeedbackMailForm .classe{margin:0}.classes,#FeedBackMailForm{margin:0}
@@ -0,0 +1,6 @@
1
+ #sel-o {
2
+ content: "on\"ce upon \
3
+ a time";
4
+ content: 'once upon \
5
+ a ti\'me';
6
+ }
@@ -0,0 +1,3 @@
1
+ #sel-o{content:"on\"ce upon \
2
+ a time";content:'once upon \
3
+ a ti\'me'}
@@ -0,0 +1,7 @@
1
+ /* preserving strings */
2
+ .sele {
3
+ content: "\"keep \" me";
4
+ something: '\\\' . . ';
5
+ else: 'empty{}';
6
+ content: "/* test */"; /* <---- this is not a comment, should be be kept */
7
+ }
@@ -0,0 +1 @@
1
+ .sele{content:"\"keep \" me";something:'\\\' . . ';else:'empty{}';content:"/* test */"}
@@ -0,0 +1,16 @@
1
+ /*
2
+ because of IE6 first-letter and first-line
3
+ must be followed by a space
4
+ http://reference.sitepoint.com/css/pseudoelement-firstletter
5
+ Thanks: P.Sorokin comment at http://www.phpied.com/cssmin-js/
6
+ */
7
+ p:first-letter{
8
+ buh: hum;
9
+ }
10
+ p:first-line{
11
+ baa: 1;
12
+ }
13
+
14
+ p:first-line,a,p:first-letter,b{
15
+ color: red;
16
+ }
@@ -0,0 +1 @@
1
+ p:first-letter {buh:hum}p:first-line {baa:1}p:first-line ,a,p:first-letter ,b{color:red}
@@ -0,0 +1,4 @@
1
+ p :link {
2
+ ba:zinga;;;
3
+ foo: bar;;;
4
+ }
@@ -0,0 +1 @@
1
+ p :link{ba:zinga;foo:bar}
@@ -0,0 +1,13 @@
1
+ /*!************88****
2
+ Preserving comments
3
+ as they are
4
+ ********************
5
+ Keep the initial !
6
+ *******************/
7
+ #yo {
8
+ ma: "ma";
9
+ }
10
+ /*!
11
+ I said
12
+ pre-
13
+ serve! */
@@ -0,0 +1,9 @@
1
+ /*!************88****
2
+ Preserving comments
3
+ as they are
4
+ ********************
5
+ Keep the initial !
6
+ *******************/#yo{ma:"ma"}/*!
7
+ I said
8
+ pre-
9
+ serve! */
@@ -0,0 +1,5 @@
1
+ #elementarr {
2
+ width: 1px;
3
+ *width: 3pt;
4
+ _width: 2em;
5
+ }
@@ -0,0 +1 @@
1
+ #elementarr{width:1px;*width:3pt;_width:2em}
@@ -0,0 +1,8 @@
1
+ /* te " st */
2
+ a{a:1}
3
+ /*!"preserve" me*/
4
+ b{content: "/**/"}
5
+ /* quite " quote ' \' \" */
6
+ /* ie mac \*/
7
+ c {c : 3}
8
+ /* end hiding */
@@ -0,0 +1 @@
1
+ a{a:1}/*!"preserve" me*/b{content:"/**/"}/*\*/c{c:3}/**/
@@ -0,0 +1,2 @@
1
+ c {-webkit-transform-origin: 0 0;}
2
+ d {-MOZ-TRANSFORM-ORIGIN: 0 0 }
@@ -0,0 +1 @@
1
+ c{-webkit-transform-origin:0 0}d{-moz-transform-origin:0 0}
@@ -0,0 +1,6 @@
1
+ a {
2
+ margin: 0px 0pt 0em 0%;
3
+ _padding-top: 0ex;
4
+ background-position: 0 0;
5
+ padding: 0in 0cm 0mm 0pc
6
+ }
@@ -0,0 +1 @@
1
+ a{margin:0;_padding-top:0;background-position:0 0;padding:0}
metadata ADDED
@@ -0,0 +1,275 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cssminify
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matthias Siegel
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &2154137260 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *2154137260
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &2154136540 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2154136540
36
+ description: ! ' The CSSminify gem provides CSS compression using YUI compressor.
37
+ Instead of wrapping around the Java or Javascript version of YUI compressor it uses
38
+ a native Ruby port of the CSS engine. Therefore this gem has no dependencies except
39
+ Bundler.
40
+
41
+ '
42
+ email: matthias.siegel@gmail.com
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files:
46
+ - CHANGES.md
47
+ - LICENSE.md
48
+ - README.md
49
+ files:
50
+ - .gitignore
51
+ - CHANGES.md
52
+ - Gemfile
53
+ - LICENSE.md
54
+ - README.md
55
+ - Rakefile
56
+ - cssminify.gemspec
57
+ - lib/cssminify.rb
58
+ - lib/cssminify/cssmin.rb
59
+ - lib/cssminify/version.rb
60
+ - spec/cssminify_spec.rb
61
+ - spec/sample.css
62
+ - spec/spec_helper.rb
63
+ - spec/tests/background-position.css
64
+ - spec/tests/background-position.css.min
65
+ - spec/tests/border-none.css
66
+ - spec/tests/border-none.css.min
67
+ - spec/tests/box-model-hack.css
68
+ - spec/tests/box-model-hack.css.min
69
+ - spec/tests/bug2527974.css
70
+ - spec/tests/bug2527974.css.min
71
+ - spec/tests/bug2527991.css
72
+ - spec/tests/bug2527991.css.min
73
+ - spec/tests/bug2527998.css
74
+ - spec/tests/bug2527998.css.min
75
+ - spec/tests/bug2528034.css
76
+ - spec/tests/bug2528034.css.min
77
+ - spec/tests/charset-media.css
78
+ - spec/tests/charset-media.css.min
79
+ - spec/tests/color-simple.css
80
+ - spec/tests/color-simple.css.min
81
+ - spec/tests/color.css
82
+ - spec/tests/color.css.min
83
+ - spec/tests/comment.css
84
+ - spec/tests/comment.css.min
85
+ - spec/tests/concat-charset.css
86
+ - spec/tests/concat-charset.css.min
87
+ - spec/tests/dataurl-base64-doublequotes.css
88
+ - spec/tests/dataurl-base64-doublequotes.css.min
89
+ - spec/tests/dataurl-base64-eof.css
90
+ - spec/tests/dataurl-base64-eof.css.min
91
+ - spec/tests/dataurl-base64-linebreakindata.css
92
+ - spec/tests/dataurl-base64-linebreakindata.css.min
93
+ - spec/tests/dataurl-base64-noquotes.css
94
+ - spec/tests/dataurl-base64-noquotes.css.min
95
+ - spec/tests/dataurl-base64-singlequotes.css
96
+ - spec/tests/dataurl-base64-singlequotes.css.min
97
+ - spec/tests/dataurl-base64-twourls.css
98
+ - spec/tests/dataurl-base64-twourls.css.min
99
+ - spec/tests/dataurl-dbquote-font.css
100
+ - spec/tests/dataurl-dbquote-font.css.min
101
+ - spec/tests/dataurl-nonbase64-doublequotes.css
102
+ - spec/tests/dataurl-nonbase64-doublequotes.css.min
103
+ - spec/tests/dataurl-nonbase64-noquotes.css
104
+ - spec/tests/dataurl-nonbase64-noquotes.css.min
105
+ - spec/tests/dataurl-nonbase64-singlequotes.css
106
+ - spec/tests/dataurl-nonbase64-singlequotes.css.min
107
+ - spec/tests/dataurl-noquote-multiline-font.css
108
+ - spec/tests/dataurl-noquote-multiline-font.css.min
109
+ - spec/tests/dataurl-realdata-doublequotes.css
110
+ - spec/tests/dataurl-realdata-doublequotes.css.min
111
+ - spec/tests/dataurl-realdata-noquotes.css
112
+ - spec/tests/dataurl-realdata-noquotes.css.min
113
+ - spec/tests/dataurl-realdata-singlequotes.css
114
+ - spec/tests/dataurl-realdata-singlequotes.css.min
115
+ - spec/tests/dataurl-realdata-yuiapp.css
116
+ - spec/tests/dataurl-realdata-yuiapp.css.min
117
+ - spec/tests/dataurl-singlequote-font.css
118
+ - spec/tests/dataurl-singlequote-font.css.min
119
+ - spec/tests/decimals.css
120
+ - spec/tests/decimals.css.min
121
+ - spec/tests/dollar-header.css
122
+ - spec/tests/dollar-header.css.min
123
+ - spec/tests/font-face.css
124
+ - spec/tests/font-face.css.min
125
+ - spec/tests/ie5mac.css
126
+ - spec/tests/ie5mac.css.min
127
+ - spec/tests/media-empty-class.css
128
+ - spec/tests/media-empty-class.css.min
129
+ - spec/tests/media-multi.css
130
+ - spec/tests/media-multi.css.min
131
+ - spec/tests/media-test.css
132
+ - spec/tests/media-test.css.min
133
+ - spec/tests/opacity-filter.css
134
+ - spec/tests/opacity-filter.css.min
135
+ - spec/tests/preserve-case.css
136
+ - spec/tests/preserve-case.css.min
137
+ - spec/tests/preserve-new-line.css
138
+ - spec/tests/preserve-new-line.css.min
139
+ - spec/tests/preserve-strings.css
140
+ - spec/tests/preserve-strings.css.min
141
+ - spec/tests/pseudo-first.css
142
+ - spec/tests/pseudo-first.css.min
143
+ - spec/tests/pseudo.css
144
+ - spec/tests/pseudo.css.min
145
+ - spec/tests/special-comments.css
146
+ - spec/tests/special-comments.css.min
147
+ - spec/tests/star-underscore-hacks.css
148
+ - spec/tests/star-underscore-hacks.css.min
149
+ - spec/tests/string-in-comment.css
150
+ - spec/tests/string-in-comment.css.min
151
+ - spec/tests/webkit-transform.css
152
+ - spec/tests/webkit-transform.css.min
153
+ - spec/tests/zeros.css
154
+ - spec/tests/zeros.css.min
155
+ homepage: https://github.com/matthiassiegel/cssminify
156
+ licenses:
157
+ - MIT
158
+ post_install_message:
159
+ rdoc_options: []
160
+ require_paths:
161
+ - lib
162
+ required_ruby_version: !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ requirements: []
175
+ rubyforge_project: cssminify
176
+ rubygems_version: 1.8.10
177
+ signing_key:
178
+ specification_version: 3
179
+ summary: CSS minification with YUI compressor, but as native Ruby port.
180
+ test_files:
181
+ - spec/cssminify_spec.rb
182
+ - spec/sample.css
183
+ - spec/spec_helper.rb
184
+ - spec/tests/background-position.css
185
+ - spec/tests/background-position.css.min
186
+ - spec/tests/border-none.css
187
+ - spec/tests/border-none.css.min
188
+ - spec/tests/box-model-hack.css
189
+ - spec/tests/box-model-hack.css.min
190
+ - spec/tests/bug2527974.css
191
+ - spec/tests/bug2527974.css.min
192
+ - spec/tests/bug2527991.css
193
+ - spec/tests/bug2527991.css.min
194
+ - spec/tests/bug2527998.css
195
+ - spec/tests/bug2527998.css.min
196
+ - spec/tests/bug2528034.css
197
+ - spec/tests/bug2528034.css.min
198
+ - spec/tests/charset-media.css
199
+ - spec/tests/charset-media.css.min
200
+ - spec/tests/color-simple.css
201
+ - spec/tests/color-simple.css.min
202
+ - spec/tests/color.css
203
+ - spec/tests/color.css.min
204
+ - spec/tests/comment.css
205
+ - spec/tests/comment.css.min
206
+ - spec/tests/concat-charset.css
207
+ - spec/tests/concat-charset.css.min
208
+ - spec/tests/dataurl-base64-doublequotes.css
209
+ - spec/tests/dataurl-base64-doublequotes.css.min
210
+ - spec/tests/dataurl-base64-eof.css
211
+ - spec/tests/dataurl-base64-eof.css.min
212
+ - spec/tests/dataurl-base64-linebreakindata.css
213
+ - spec/tests/dataurl-base64-linebreakindata.css.min
214
+ - spec/tests/dataurl-base64-noquotes.css
215
+ - spec/tests/dataurl-base64-noquotes.css.min
216
+ - spec/tests/dataurl-base64-singlequotes.css
217
+ - spec/tests/dataurl-base64-singlequotes.css.min
218
+ - spec/tests/dataurl-base64-twourls.css
219
+ - spec/tests/dataurl-base64-twourls.css.min
220
+ - spec/tests/dataurl-dbquote-font.css
221
+ - spec/tests/dataurl-dbquote-font.css.min
222
+ - spec/tests/dataurl-nonbase64-doublequotes.css
223
+ - spec/tests/dataurl-nonbase64-doublequotes.css.min
224
+ - spec/tests/dataurl-nonbase64-noquotes.css
225
+ - spec/tests/dataurl-nonbase64-noquotes.css.min
226
+ - spec/tests/dataurl-nonbase64-singlequotes.css
227
+ - spec/tests/dataurl-nonbase64-singlequotes.css.min
228
+ - spec/tests/dataurl-noquote-multiline-font.css
229
+ - spec/tests/dataurl-noquote-multiline-font.css.min
230
+ - spec/tests/dataurl-realdata-doublequotes.css
231
+ - spec/tests/dataurl-realdata-doublequotes.css.min
232
+ - spec/tests/dataurl-realdata-noquotes.css
233
+ - spec/tests/dataurl-realdata-noquotes.css.min
234
+ - spec/tests/dataurl-realdata-singlequotes.css
235
+ - spec/tests/dataurl-realdata-singlequotes.css.min
236
+ - spec/tests/dataurl-realdata-yuiapp.css
237
+ - spec/tests/dataurl-realdata-yuiapp.css.min
238
+ - spec/tests/dataurl-singlequote-font.css
239
+ - spec/tests/dataurl-singlequote-font.css.min
240
+ - spec/tests/decimals.css
241
+ - spec/tests/decimals.css.min
242
+ - spec/tests/dollar-header.css
243
+ - spec/tests/dollar-header.css.min
244
+ - spec/tests/font-face.css
245
+ - spec/tests/font-face.css.min
246
+ - spec/tests/ie5mac.css
247
+ - spec/tests/ie5mac.css.min
248
+ - spec/tests/media-empty-class.css
249
+ - spec/tests/media-empty-class.css.min
250
+ - spec/tests/media-multi.css
251
+ - spec/tests/media-multi.css.min
252
+ - spec/tests/media-test.css
253
+ - spec/tests/media-test.css.min
254
+ - spec/tests/opacity-filter.css
255
+ - spec/tests/opacity-filter.css.min
256
+ - spec/tests/preserve-case.css
257
+ - spec/tests/preserve-case.css.min
258
+ - spec/tests/preserve-new-line.css
259
+ - spec/tests/preserve-new-line.css.min
260
+ - spec/tests/preserve-strings.css
261
+ - spec/tests/preserve-strings.css.min
262
+ - spec/tests/pseudo-first.css
263
+ - spec/tests/pseudo-first.css.min
264
+ - spec/tests/pseudo.css
265
+ - spec/tests/pseudo.css.min
266
+ - spec/tests/special-comments.css
267
+ - spec/tests/special-comments.css.min
268
+ - spec/tests/star-underscore-hacks.css
269
+ - spec/tests/star-underscore-hacks.css.min
270
+ - spec/tests/string-in-comment.css
271
+ - spec/tests/string-in-comment.css.min
272
+ - spec/tests/webkit-transform.css
273
+ - spec/tests/webkit-transform.css.min
274
+ - spec/tests/zeros.css
275
+ - spec/tests/zeros.css.min