compass_formalize 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +5 -4
  4. data/README.md +31 -0
  5. data/compass_formalize.gemspec +2 -2
  6. data/stylesheets/_formalize.sass +226 -170
  7. data/templates/{dojo → common}/button.png +0 -0
  8. data/templates/{dojo → common}/select_arrow.gif +0 -0
  9. data/templates/dojo/dojo.formalize.js +46 -19
  10. data/templates/dojo/dojo.formalize.min.js +1 -1
  11. data/templates/dojo/manifest.rb +5 -0
  12. data/templates/extjs/extjs.formalize.js +48 -25
  13. data/templates/extjs/extjs.formalize.min.js +1 -1
  14. data/templates/jquery-legacy/jquery.formalize.legacy.js +187 -0
  15. data/templates/jquery-legacy/jquery.formalize.legacy.min.js +1 -0
  16. data/templates/jquery-legacy/manifest.rb +42 -0
  17. data/templates/jquery/jquery.formalize.js +42 -20
  18. data/templates/jquery/jquery.formalize.min.js +1 -1
  19. data/templates/jquery/manifest.rb +6 -1
  20. data/templates/mootools/manifest.rb +5 -0
  21. data/templates/mootools/mootools.formalize.js +49 -20
  22. data/templates/mootools/mootools.formalize.min.js +1 -1
  23. data/templates/prototype/manifest.rb +5 -0
  24. data/templates/prototype/prototype.formalize.js +43 -23
  25. data/templates/prototype/prototype.formalize.min.js +1 -1
  26. data/templates/yui/manifest.rb +5 -0
  27. data/templates/yui/yui.formalize.js +57 -43
  28. data/templates/yui/yui.formalize.min.js +1 -1
  29. metadata +11 -40
  30. data/templates/extjs/button.png +0 -0
  31. data/templates/extjs/select_arrow.gif +0 -0
  32. data/templates/jquery/button.png +0 -0
  33. data/templates/jquery/select_arrow.gif +0 -0
  34. data/templates/mootools/button.png +0 -0
  35. data/templates/mootools/select_arrow.gif +0 -0
  36. data/templates/prototype/button.png +0 -0
  37. data/templates/prototype/select_arrow.gif +0 -0
  38. data/templates/yui/button.png +0 -0
  39. data/templates/yui/select_arrow.gif +0 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b3af7cd8a6e1b7701c064900be2f133791be935b
4
+ data.tar.gz: 929b4a45b5268c729c60643a2e6128606302b2c9
5
+ SHA512:
6
+ metadata.gz: e8090c19aa14417aba4bfcd890eaed947db08396c081d893d884f978a164394048b0de63600fa8bf7ad8638acca70ead91cad149e3da2209818af4562190ca65
7
+ data.tar.gz: e9bce6c9c8f04613f5162080269f5458594a27262341ac9ce462dbe6a3c6d84ca577b939a03c4802557cc5b8340be77af2d9506a66d6c63202e434fd34fa0e6a
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  pkg
2
2
  .sass-cache
3
3
  .DS_Store
4
+ compass_formalize-*
@@ -1,11 +1,12 @@
1
1
  # Changelog
2
2
 
3
- [0.0.4 - July 7,
3
+ * [0.0.5 - October 11, 2013 Updated JS to from Formalize 1.1 to 1.2](https://github.com/alienresident/compass_formalize/compare/v0.0.4...v0.0.5)
4
+ * [0.0.4 - July 7,
4
5
  2011](https://github.com/pengwynn/compass_formalize/compare/v0.0.3...v0.0.4)
5
- [0.0.3 - June 25,
6
+ * [0.0.3 - June 25,
6
7
  2011](https://github.com/pengwynn/compass_formalize/compare/v0.0.2...v0.0.3)
7
- 0.0.2 - April 27, 2011 - Patch from @hoverlover for Compass includes.
8
- 0.0.1 - April 19, 2011 - Initial release
8
+ * 0.0.2 - April 27, 2011 - Patch from @hoverlover for Compass includes.
9
+ * 0.0.1 - April 19, 2011 - Initial release
9
10
 
10
11
 
11
12
 
data/README.md CHANGED
@@ -26,14 +26,45 @@ your JavaScript framework taste:
26
26
  compass install formalize/dojo
27
27
  compass install formalize/extjs
28
28
  compass install formalize/jquery
29
+ compass install formalize/jquery-legacy
29
30
  compass install formalize/mootools
30
31
  compass install formalize/prototype
31
32
  compass install formalize/yui
32
33
 
34
+ Don't forget to add this to your sass files
35
+
36
+ If you're using SCSS syntax, in your stylesheet:
37
+
38
+ @import "formalize";
39
+
40
+ or if you're using indented (Sass) syntax
41
+
42
+ @import "formalize"
43
+
33
44
  After following the provided instructions, we need to tell Compass to use relative paths so that all our resources load correctly. In config.rb, we uncomment the following line:
34
45
 
35
46
  relative_assets = true
36
47
 
48
+ __New__ in version 0.0.5
49
+ If you don't need or want to support IE6 and/or IE7 you can add the following to your file before your @import "formalize"
50
+
51
+ If you're using SCSS syntax, in your stylesheet:
52
+
53
+ $legacy-support-for-ie6: false;
54
+ $legacy-support-for-ie7: false;
55
+ @import "formalize";
56
+
57
+ or if you're using indented (Sass) syntax
58
+
59
+ $legacy-support-for-ie6: false
60
+ $legacy-support-for-ie7: false
61
+ @import "formalize"
62
+
63
+ This will not add the IE 6 and IE 7 css hacks and extra classes to the formalize css. You don't need the JS libraries either.
64
+
65
+ To remove legacy webkit and firefox support and experimental opera and khtml css see: http://compass-style.org/reference/compass/support
66
+
67
+
37
68
  And we're all set!
38
69
 
39
70
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{compass_formalize}
5
- s.version = "0.0.4"
5
+ s.version = "0.0.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
8
  s.authors = ["Wynn Netherland", "Nathan Smith"]
9
- s.date = %q{2011-07-07}
9
+ s.date = %q{2013-10-09}
10
10
  s.description = %q{Compass and Sass port of Nathan Smith's Formalize HTML form normalizer.}
11
11
  s.email = %w{wynn.netherland@gmail.com nathan@sonspring.com}
12
12
  s.files = `git ls-files`.split("\n")
@@ -2,10 +2,7 @@
2
2
  // Sass = http://sass-lang.com
3
3
  // Compass = http://compass-style.org
4
4
 
5
- @import compass/css3/box-sizing
6
- @import compass/css3/gradient
7
- @import compass/css3/border-radius
8
- @import compass/css3/background-clip
5
+ @import compass/css3
9
6
 
10
7
  // `Widths
11
8
  //----------------------------------------------------------------------------------------------------
@@ -28,11 +25,13 @@
28
25
  .input_xxlarge
29
26
  width: 300px
30
27
 
31
- .input_full
32
- width: 100%
28
+ @if $legacy-support-for-ie7
29
+ .input_full
30
+ width: 100%
31
+
32
+ // Added via JS to <textarea> and class="input-full".
33
+ // Applies only to IE7. Other browsers don't need it.
33
34
 
34
- // Added via JS to <textarea> and class="input-full".
35
- // Applies only to IE7. Other browsers don't need it.
36
35
  .input_full_wrap
37
36
  display: block
38
37
  padding-right: 8px
@@ -40,48 +39,88 @@
40
39
  // `UI Consistency
41
40
  //----------------------------------------------------------------------------------------------------
42
41
 
43
- ::-moz-focus-inner
44
- border: 0
45
- padding: 0
46
-
47
42
  input[type="search"]::-webkit-search-decoration
48
43
  display: none
49
44
 
50
45
  input,
51
46
  button,
47
+ a.button,
52
48
  select,
53
49
  textarea
54
- margin: 0
55
- vertical-align: middle
50
+ // Suppress red glow that Firefox
51
+ // adds to form fields by default.
52
+ &:invalid
53
+ +box-shadow(none)
54
+
55
+ // Add blue glow.
56
+ &:focus
57
+ +box-shadow(#06f 0 0 5px 0)
58
+ // for Opera
59
+ z-index: 1
60
+
61
+ input[type="file"],
62
+ input[type="radio"],
63
+ input[type="checkbox"]
64
+ &:focus,
65
+ &:active
66
+ +box-shadow(none)
56
67
 
57
68
  button,
69
+ a.button,
58
70
  input[type="reset"],
59
71
  input[type="submit"],
60
72
  input[type="button"]
61
73
  -webkit-appearance: none
62
- +border-radius(11px)
74
+ +border-radius(4px)
63
75
  +background-clip(padding-box)
64
- background: #ddd image-url("button.png") repeat-x
65
- +background-image(linear-gradient(color-stops(#fff, #ddd)))
76
+ // Base64 encoded "../images/button.png' with IE7 fallback
77
+ background: #ddd url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAAAAADhgtq/AAAAHElEQVQoz2P8z4ADsOCW+UeGnsFs2nDzz5AMHQA+JRlAyyOraAAAAABJRU5ErkJggg==) repeat-x
78
+ @if $legacy-support-for-ie7
79
+ background: #ddd image-url('button.png') repeat-x
80
+ +background-image(linear-gradient(#fff, #ddd))
66
81
  border: 1px solid
67
82
  border-color: #ddd #bbb #999
68
83
  cursor: pointer
69
84
  color: #333
70
- font: bold 12px/1.2 Arial, sans-serif
85
+ display: inline-block
86
+ // Helvetica Neue present, because it works better
87
+ // for line-height on buttons than Arial, on OS X.
88
+ font: bold 12px/1.3 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif
71
89
  outline: 0
72
90
  overflow: visible
73
- padding: 3px 10px 4px
91
+ margin: 0
92
+ padding: 3px 10px
74
93
  text-shadow: #fff 0 1px 1px
94
+ text-decoration: none
95
+ vertical-align: top
75
96
  width: auto
76
-
77
- // IE7
78
- *padding-top: 2px
79
- *padding-bottom: 0px
80
-
81
- button
82
- // IE7
83
- *padding-top: 1px
84
- *padding-bottom: 1px
97
+ &:hover
98
+ +background-image(linear-gradient(#fff, #eee 1px, #ccc))
99
+ text-decoration: none
100
+ &:active
101
+ +background-image(linear-gradient(#ddd, #eee))
102
+ +box-shadow(inset rgba(#000, 0.25) 0 1px 2px 0)
103
+ border-color: #999 #bbb #ddd
104
+ @if $legacy-support-for-ie7
105
+ // IE7
106
+ *padding-top: 2px
107
+ *padding-bottom: 0
108
+
109
+ // Kill phantom spacing and dotted
110
+ // border that appears in Firefox.
111
+ &::-moz-focus-inner
112
+ border: 0
113
+ padding: 0
114
+
115
+ @if $legacy-support-for-ie7
116
+ a.button
117
+ // IE7
118
+ *padding-bottom: 3px
119
+
120
+ button
121
+ // IE7
122
+ *padding-top: 1px
123
+ *padding-bottom: 1px
85
124
 
86
125
  textarea,
87
126
  select,
@@ -98,112 +137,112 @@ input[type="text"],
98
137
  input[type="time"],
99
138
  input[type="url"],
100
139
  input[type="week"]
101
- -webkit-appearance: none
102
- +border-radius(0)
103
140
  +box-sizing(border-box)
104
141
  +background-clip(padding-box)
142
+ +border-radius(0)
143
+ -webkit-appearance: none
105
144
  background-color: #fff
106
145
  border: 1px solid
107
146
  border-color: #848484 #c1c1c1 #e1e1e1
108
147
  color: #000
109
148
  outline: 0
149
+ margin: 0
110
150
  padding: 2px 3px
111
- font:
112
- size: 13px
113
- family: Arial, sans-serif
151
+ text-align: left
152
+ font-size: 13px
153
+ // Leaving out Helvetica Neue, to not throw off size="..."
154
+ // on inputs. Arial is more reliable, on Windows and OS X.
155
+ font-family: Arial, 'Liberation Sans', FreeSans, sans-serif
114
156
  height: 1.8em
115
-
116
- // IE7
117
- *padding-top: 2px
118
- *padding-bottom: 1px
119
- *height: auto
120
-
121
- // Separate rule for Firefox.
122
- // Cannot stack with WebKit's.
123
-
124
- input.placeholder-text,
125
- textarea.placeholder-text,
126
- input:-moz-placeholder,
127
- textarea:-moz-placeholder
128
- color: #888
129
-
130
- ::-webkit-input-placeholder
131
- color: #888
132
-
133
- button:focus,
134
- button:active,
135
- input:focus,
136
- input:active,
137
- select:focus,
138
- select:active,
139
- textarea:focus,
140
- textarea:active
141
- -moz-box-shadow: #06f 0 0 7px
142
- -webkit-box-shadow: #06f 0 0 7px
143
- box-shadow: #06f 0 0 7px
144
-
145
- // for Opera
146
- z-index: 1
147
-
148
- input[type="file"]:focus,
149
- input[type="file"]:active,
150
- input[type="radio"]:focus,
151
- input[type="radio"]:active,
152
- input[type="checkbox"]:focus,
153
- input[type="checkbox"]:active
154
- -moz-box-shadow: none
155
- -webkit-box-shadow: none
156
- box-shadow: none
157
-
158
- select[disabled],
159
- textarea[disabled],
160
- input[type="date"][disabled],
161
- input[type="datetime"][disabled],
162
- input[type="datetime-local"][disabled],
163
- input[type="email"][disabled],
164
- input[type="month"][disabled],
165
- input[type="number"][disabled],
166
- input[type="password"][disabled],
167
- input[type="search"][disabled],
168
- input[type="tel"][disabled],
169
- input[type="text"][disabled],
170
- input[type="time"][disabled],
171
- input[type="url"][disabled],
172
- input[type="week"][disabled]
173
- background-color: #eee
157
+ vertical-align: top
158
+ @if $legacy-support-for-ie7
159
+ // IE7
160
+ *padding-top: 2px
161
+ *padding-bottom: 1px
162
+ *height: auto
163
+ &[disabled]
164
+ background-color: #eee
174
165
 
175
166
  button[disabled],
176
167
  input[disabled],
177
168
  select[disabled],
178
169
  select[disabled] option,
179
170
  select[disabled] optgroup,
180
- textarea[disabled]
181
- -moz-box-shadow: none
182
- -webkit-box-shadow: none
183
- box-shadow: none
171
+ textarea[disabled],
172
+ a.button_disabled
173
+ +box-shadow(none)
174
+ -moz-user-select: -moz-none
184
175
  -webkit-user-select: none
185
- -moz-user-select: none
176
+ -khtml-user-select: none
186
177
  user-select: none
187
178
  color: #888
188
179
  cursor: default
189
180
 
190
- .is_webkit select
191
- // Tweaks for Safari + Chrome.
192
- background:
193
- image: image-url("select_arrow.gif")
194
- repeat: no-repeat
195
- position: right center
196
- padding-right: 20px
181
+ // Separate rule for Firefox.
182
+ // Separate rule for IE, too.
183
+ // Cannot stack with WebKit's.
184
+ input::-webkit-input-placeholder,
185
+ textarea::-webkit-input-placeholder
186
+ color: #888
187
+
188
+ input:-moz-placeholder,
189
+ textarea:-moz-placeholder
190
+ color: #888
191
+
192
+ input.placeholder_text,
193
+ textarea.placeholder_text
194
+ color: #888
197
195
 
198
196
  textarea,
199
197
  select[size],
200
198
  select[multiple]
201
199
  height: auto
202
200
 
203
- .is_webkit select[size],
204
- .is_webkit select[multiple]
205
- background-image: none
206
- padding: 0
201
+ // Set height back to normal,
202
+ // for Opera, WebKit, and IE.
203
+ select[size="0"],
204
+ select[size="1"]
205
+ height: 1.8em
206
+ @if $legacy-support-for-ie7
207
+ // IE7
208
+ *height: auto
209
+
210
+ // Tweaks for Safari + Chrome.
211
+ @media (-webkit-min-device-pixel-ratio: 0)
212
+ select[size],
213
+ select[multiple],
214
+ select[multiple][size]
215
+ background-image: none
216
+ padding-right: 3px
217
+
218
+ select,
219
+ select[size="0"],
220
+ select[size="1"]
221
+ // Base64 encoded "../images/select_arrow.gif"
222
+ background-image: url(data:image/png;base64,R0lGODlhDQAEAIAAAAAAAP8A/yH5BAEHAAEALAAAAAANAAQAAAILhA+hG5jMDpxvhgIAOw==)
223
+ background-repeat: no-repeat
224
+ background-position: right center
225
+ padding-right: 20px
226
+
227
+ ::-webkit-validation-bubble-message
228
+ -webkit-box-shadow: none
229
+ box-shadow: none
230
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #666), color-stop(1, #000))
231
+ border: 0
232
+ color: #fff
233
+ font: 13px/17px 'Lucida Grande', Arial, 'Liberation Sans', FreeSans, sans-serif
234
+ overflow: hidden
235
+ padding: 15px 15px 17px
236
+ text-shadow: #000 0 0 1px
237
+ min-height: 16px
238
+
239
+ ::-webkit-validation-bubble-arrow,
240
+ ::-webkit-validation-bubble-top-outer-arrow,
241
+ ::-webkit-validation-bubble-top-inner-arrow
242
+ -webkit-box-shadow: none
243
+ box-shadow: none
244
+ background: #666
245
+ border-color: #666
207
246
 
208
247
  textarea
209
248
  min-height: 40px
@@ -215,65 +254,82 @@ optgroup
215
254
  color: #000
216
255
  font-style: normal
217
256
  font-weight: normal
218
-
219
- // `IE6
220
- //----------------------------------------------------------------------------------------------------
221
-
222
- // Everything below this line is for IE6.
223
- // Delete it if you don't support it! :)
224
-
225
- // Classes are added dynamically via JS,
226
- // because IE6 doesn't support attribute
227
- // selectors: .ie6_button, .ie6_input, etc.
228
-
229
- // Note: These style rules are somewhat
230
- // duplicated because IE6 bombs out when
231
- // it sees attribute selectors. Example:
232
-
233
- // .ie6_button {
234
- // This works in IE6.
235
- // }
236
-
237
- // .ie6_button,
238
- // input[type=submit] {
239
- // This doesn't work.
240
- // }
241
-
242
- .ie6_button,
243
- * html button
244
- background: #ddd image-url("button.png") repeat-x
245
- border: 1px solid
246
- border-color: #ddd #bbb #999
247
- cursor: pointer
248
- color: #333
249
- font: bold 12px/1.2 Arial, sans-serif
250
- padding: 2px 10px 0px
251
- overflow: visible
252
- width: auto
253
-
254
- * html button
255
- padding-top: 1px
256
- padding-bottom: 1px
257
-
258
- .ie6_input,
259
- * html textarea,
260
- * html select
261
- background: #fff
262
- border: 1px solid
263
- border-color: #848484 #c1c1c1 #e1e1e1
264
- color: #000
265
- padding: 2px 3px 1px
266
- font-size: 13px
267
- font-family: Arial, sans-serif
268
- vertical-align: top
269
-
270
- * html select
271
- margin-top: 1px
272
-
273
- .placeholder_text,
274
- .ie6_input_disabled,
275
- .ie6_button_disabled
276
- color: #888
277
-
278
- .ie6_input_disabled
279
- background: #eee
257
+ // Font family repeated, for Firefox.
258
+ font-family: Arial, 'Liberation Sans', FreeSans, sans-serif
259
+
260
+ // Kill phantom spacing and dotted
261
+ // border that appears in Firefox.
262
+ &::-moz-focus-inner
263
+ border: 0
264
+ padding: 0
265
+
266
+ @if $legacy-support-for-ie6
267
+ // `IE6
268
+ //----------------------------------------------------------------------------------------------------
269
+
270
+ // Everything below this line is for IE6.
271
+ // Delete it if you don't support it! :)
272
+
273
+ // Classes are added dynamically via JS,
274
+ // because IE6 doesn't support attribute
275
+ // selectors: .ie6_button, .ie6_input, etc.
276
+
277
+ // Note: These style rules are somewhat
278
+ // duplicated because IE6 bombs out when
279
+ // it sees attribute selectors. Example:
280
+
281
+ // .ie6_button {
282
+ // This works in IE6.
283
+ // }
284
+
285
+ // .ie6_button,
286
+ // input[type=submit] {
287
+ // This doesn't work.
288
+ // }
289
+
290
+ .ie6_button,
291
+ * html button,
292
+ * html a.button
293
+ background: #ddd image-url('button.png') repeat-x
294
+ border: 1px solid
295
+ border-color: #ddd #bbb #999
296
+ cursor: pointer
297
+ color: #333
298
+ font: bold 12px/1.2 Arial, sans-serif
299
+ padding: 2px 10px 0
300
+ text-decoration: none
301
+ overflow: visible
302
+ vertical-align: top
303
+ width: auto
304
+
305
+ * html a.button
306
+ position: relative
307
+ top: 3px
308
+ padding-bottom: 2px
309
+
310
+ * html button
311
+ padding-top: 1px
312
+ padding-bottom: 1px
313
+
314
+ .ie6_input,
315
+ * html textarea,
316
+ * html select
317
+ background: #fff
318
+ border: 1px solid
319
+ border-color: #848484 #c1c1c1 #e1e1e1
320
+ color: #000
321
+ padding: 2px 3px 1px
322
+ font-size: 13px
323
+ font-family: Arial, sans-serif
324
+ vertical-align: top
325
+
326
+ * html select
327
+ margin-top: 1px
328
+
329
+ .placeholder_text,
330
+ .ie6_input_disabled,
331
+ .ie6_button_disabled
332
+ color: #888
333
+
334
+ .ie6_input_disabled
335
+ background: #eee