guff-compass 0.7.0

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 (186) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +21 -0
  3. data/.gitignore +6 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +21 -0
  6. data/demo/bower_components/jquery/.bower.json +21 -0
  7. data/demo/bower_components/jquery/.editorconfig +43 -0
  8. data/demo/bower_components/jquery/.gitattributes +2 -0
  9. data/demo/bower_components/jquery/.gitignore +14 -0
  10. data/demo/bower_components/jquery/.gitmodules +6 -0
  11. data/demo/bower_components/jquery/.jshintrc +17 -0
  12. data/demo/bower_components/jquery/.mailmap +94 -0
  13. data/demo/bower_components/jquery/AUTHORS.txt +170 -0
  14. data/demo/bower_components/jquery/CONTRIBUTING.md +216 -0
  15. data/demo/bower_components/jquery/Gruntfile.js +594 -0
  16. data/demo/bower_components/jquery/MIT-LICENSE.txt +21 -0
  17. data/demo/bower_components/jquery/README.md +398 -0
  18. data/demo/bower_components/jquery/bower.json +11 -0
  19. data/demo/bower_components/jquery/build/release-notes.js +59 -0
  20. data/demo/bower_components/jquery/build/release.js +316 -0
  21. data/demo/bower_components/jquery/component.json +15 -0
  22. data/demo/bower_components/jquery/composer.json +35 -0
  23. data/demo/bower_components/jquery/jquery-migrate.js +511 -0
  24. data/demo/bower_components/jquery/jquery-migrate.min.js +3 -0
  25. data/demo/bower_components/jquery/jquery.js +9789 -0
  26. data/demo/bower_components/jquery/jquery.min.js +6 -0
  27. data/demo/bower_components/jquery/jquery.min.map +1 -0
  28. data/demo/bower_components/jquery/package.json +38 -0
  29. data/demo/bower_components/jquery/speed/benchmark.js +15 -0
  30. data/demo/bower_components/jquery/speed/benchmarker.css +65 -0
  31. data/demo/bower_components/jquery/speed/benchmarker.js +181 -0
  32. data/demo/bower_components/jquery/speed/closest.html +39 -0
  33. data/demo/bower_components/jquery/speed/css.html +82 -0
  34. data/demo/bower_components/jquery/speed/event.html +58 -0
  35. data/demo/bower_components/jquery/speed/filter.html +183 -0
  36. data/demo/bower_components/jquery/speed/find.html +179 -0
  37. data/demo/bower_components/jquery/speed/index.html +72 -0
  38. data/demo/bower_components/jquery/speed/jquery-basis.js +6238 -0
  39. data/demo/bower_components/jquery/speed/slice.vs.concat.html +47 -0
  40. data/demo/bower_components/jquery/src/.jshintrc +27 -0
  41. data/demo/bower_components/jquery/src/ajax.js +855 -0
  42. data/demo/bower_components/jquery/src/ajax/jsonp.js +80 -0
  43. data/demo/bower_components/jquery/src/ajax/script.js +86 -0
  44. data/demo/bower_components/jquery/src/ajax/xhr.js +207 -0
  45. data/demo/bower_components/jquery/src/attributes.js +659 -0
  46. data/demo/bower_components/jquery/src/callbacks.js +197 -0
  47. data/demo/bower_components/jquery/src/core.js +981 -0
  48. data/demo/bower_components/jquery/src/css.js +661 -0
  49. data/demo/bower_components/jquery/src/data.js +336 -0
  50. data/demo/bower_components/jquery/src/deferred.js +141 -0
  51. data/demo/bower_components/jquery/src/deprecated.js +11 -0
  52. data/demo/bower_components/jquery/src/dimensions.js +41 -0
  53. data/demo/bower_components/jquery/src/effects.js +732 -0
  54. data/demo/bower_components/jquery/src/event-alias.js +32 -0
  55. data/demo/bower_components/jquery/src/event.js +995 -0
  56. data/demo/bower_components/jquery/src/exports.js +21 -0
  57. data/demo/bower_components/jquery/src/intro.js +20 -0
  58. data/demo/bower_components/jquery/src/manipulation.js +744 -0
  59. data/demo/bower_components/jquery/src/offset.js +169 -0
  60. data/demo/bower_components/jquery/src/outro.js +2 -0
  61. data/demo/bower_components/jquery/src/queue.js +146 -0
  62. data/demo/bower_components/jquery/src/serialize.js +99 -0
  63. data/demo/bower_components/jquery/src/sizzle-jquery.js +7 -0
  64. data/demo/bower_components/jquery/src/support.js +246 -0
  65. data/demo/bower_components/jquery/src/traversing.js +283 -0
  66. data/demo/bower_components/jquery/src/wrap.js +66 -0
  67. data/demo/bower_components/jquery/test/.jshintignore +3 -0
  68. data/demo/bower_components/jquery/test/.jshintrc +60 -0
  69. data/demo/bower_components/jquery/test/data/1x1.jpg +0 -0
  70. data/demo/bower_components/jquery/test/data/ajax/unreleasedXHR.html +25 -0
  71. data/demo/bower_components/jquery/test/data/atom+xml.php +4 -0
  72. data/demo/bower_components/jquery/test/data/badcall.js +1 -0
  73. data/demo/bower_components/jquery/test/data/badjson.js +1 -0
  74. data/demo/bower_components/jquery/test/data/cleanScript.html +10 -0
  75. data/demo/bower_components/jquery/test/data/core/cc_on.html +22 -0
  76. data/demo/bower_components/jquery/test/data/dashboard.xml +11 -0
  77. data/demo/bower_components/jquery/test/data/dimensions/documentLarge.html +17 -0
  78. data/demo/bower_components/jquery/test/data/dimensions/documentSmall.html +21 -0
  79. data/demo/bower_components/jquery/test/data/echoData.php +1 -0
  80. data/demo/bower_components/jquery/test/data/echoQuery.php +1 -0
  81. data/demo/bower_components/jquery/test/data/errorWithJSON.php +6 -0
  82. data/demo/bower_components/jquery/test/data/errorWithText.php +5 -0
  83. data/demo/bower_components/jquery/test/data/etag.php +21 -0
  84. data/demo/bower_components/jquery/test/data/evalScript.php +1 -0
  85. data/demo/bower_components/jquery/test/data/event/focusElem.html +16 -0
  86. data/demo/bower_components/jquery/test/data/event/longLoadScript.php +4 -0
  87. data/demo/bower_components/jquery/test/data/event/promiseReady.html +17 -0
  88. data/demo/bower_components/jquery/test/data/event/syncReady.html +23 -0
  89. data/demo/bower_components/jquery/test/data/headers.php +18 -0
  90. data/demo/bower_components/jquery/test/data/if_modified_since.php +20 -0
  91. data/demo/bower_components/jquery/test/data/iframe.html +8 -0
  92. data/demo/bower_components/jquery/test/data/jquery-1.9.1.ajax_xhr.min.js +5 -0
  93. data/demo/bower_components/jquery/test/data/json.php +13 -0
  94. data/demo/bower_components/jquery/test/data/json_obj.js +1 -0
  95. data/demo/bower_components/jquery/test/data/jsonp.php +14 -0
  96. data/demo/bower_components/jquery/test/data/manipulation/iframe-denied.html +36 -0
  97. data/demo/bower_components/jquery/test/data/name.html +1 -0
  98. data/demo/bower_components/jquery/test/data/name.php +24 -0
  99. data/demo/bower_components/jquery/test/data/nocontent.php +5 -0
  100. data/demo/bower_components/jquery/test/data/offset/absolute.html +41 -0
  101. data/demo/bower_components/jquery/test/data/offset/body.html +26 -0
  102. data/demo/bower_components/jquery/test/data/offset/fixed.html +34 -0
  103. data/demo/bower_components/jquery/test/data/offset/relative.html +31 -0
  104. data/demo/bower_components/jquery/test/data/offset/scroll.html +39 -0
  105. data/demo/bower_components/jquery/test/data/offset/static.html +31 -0
  106. data/demo/bower_components/jquery/test/data/offset/table.html +43 -0
  107. data/demo/bower_components/jquery/test/data/params_html.php +12 -0
  108. data/demo/bower_components/jquery/test/data/readywaitasset.js +1 -0
  109. data/demo/bower_components/jquery/test/data/readywaitloader.js +25 -0
  110. data/demo/bower_components/jquery/test/data/script.php +11 -0
  111. data/demo/bower_components/jquery/test/data/selector/html5_selector.html +114 -0
  112. data/demo/bower_components/jquery/test/data/selector/sizzle_cache.html +21 -0
  113. data/demo/bower_components/jquery/test/data/statusText.php +5 -0
  114. data/demo/bower_components/jquery/test/data/support/bodyBackground.html +28 -0
  115. data/demo/bower_components/jquery/test/data/support/boxSizing.html +19 -0
  116. data/demo/bower_components/jquery/test/data/support/csp.js +3 -0
  117. data/demo/bower_components/jquery/test/data/support/csp.php +22 -0
  118. data/demo/bower_components/jquery/test/data/support/shrinkWrapBlocks.html +23 -0
  119. data/demo/bower_components/jquery/test/data/support/testElementCrash.html +17 -0
  120. data/demo/bower_components/jquery/test/data/test.html +7 -0
  121. data/demo/bower_components/jquery/test/data/test.js +3 -0
  122. data/demo/bower_components/jquery/test/data/test.php +7 -0
  123. data/demo/bower_components/jquery/test/data/test2.html +5 -0
  124. data/demo/bower_components/jquery/test/data/test3.html +3 -0
  125. data/demo/bower_components/jquery/test/data/testinit.js +264 -0
  126. data/demo/bower_components/jquery/test/data/testrunner.js +371 -0
  127. data/demo/bower_components/jquery/test/data/testsuite.css +155 -0
  128. data/demo/bower_components/jquery/test/data/text.php +12 -0
  129. data/demo/bower_components/jquery/test/data/ua.txt +272 -0
  130. data/demo/bower_components/jquery/test/data/with_fries.xml +25 -0
  131. data/demo/bower_components/jquery/test/data/with_fries_over_jsonp.php +7 -0
  132. data/demo/bower_components/jquery/test/delegatetest.html +228 -0
  133. data/demo/bower_components/jquery/test/hovertest.html +158 -0
  134. data/demo/bower_components/jquery/test/index.html +337 -0
  135. data/demo/bower_components/jquery/test/jquery.js +5 -0
  136. data/demo/bower_components/jquery/test/localfile.html +75 -0
  137. data/demo/bower_components/jquery/test/networkerror.html +84 -0
  138. data/demo/bower_components/jquery/test/readywait.html +70 -0
  139. data/demo/bower_components/jquery/test/unit/ajax.js +2016 -0
  140. data/demo/bower_components/jquery/test/unit/attributes.js +1388 -0
  141. data/demo/bower_components/jquery/test/unit/callbacks.js +342 -0
  142. data/demo/bower_components/jquery/test/unit/core.js +1360 -0
  143. data/demo/bower_components/jquery/test/unit/css.js +1056 -0
  144. data/demo/bower_components/jquery/test/unit/data.js +645 -0
  145. data/demo/bower_components/jquery/test/unit/deferred.js +436 -0
  146. data/demo/bower_components/jquery/test/unit/deprecated.js +8 -0
  147. data/demo/bower_components/jquery/test/unit/dimensions.js +472 -0
  148. data/demo/bower_components/jquery/test/unit/effects.js +2242 -0
  149. data/demo/bower_components/jquery/test/unit/event.js +2755 -0
  150. data/demo/bower_components/jquery/test/unit/exports.js +7 -0
  151. data/demo/bower_components/jquery/test/unit/manipulation.js +2120 -0
  152. data/demo/bower_components/jquery/test/unit/offset.js +559 -0
  153. data/demo/bower_components/jquery/test/unit/queue.js +314 -0
  154. data/demo/bower_components/jquery/test/unit/selector.js +172 -0
  155. data/demo/bower_components/jquery/test/unit/serialize.js +148 -0
  156. data/demo/bower_components/jquery/test/unit/support.js +370 -0
  157. data/demo/bower_components/jquery/test/unit/traversing.js +797 -0
  158. data/demo/bower_components/jquery/test/unit/wrap.js +265 -0
  159. data/demo/bower_components/jquery/test/xhtml.php +5 -0
  160. data/demo/index.html +347 -0
  161. data/demo/styles/main.css +208 -0
  162. data/demo/styles/main.scss +138 -0
  163. data/docs/docco.css +506 -0
  164. data/docs/guff.html +1127 -0
  165. data/docs/public/fonts/aller-bold.eot +0 -0
  166. data/docs/public/fonts/aller-bold.ttf +0 -0
  167. data/docs/public/fonts/aller-bold.woff +0 -0
  168. data/docs/public/fonts/aller-light.eot +0 -0
  169. data/docs/public/fonts/aller-light.ttf +0 -0
  170. data/docs/public/fonts/aller-light.woff +0 -0
  171. data/docs/public/fonts/novecento-bold.eot +0 -0
  172. data/docs/public/fonts/novecento-bold.ttf +0 -0
  173. data/docs/public/fonts/novecento-bold.woff +0 -0
  174. data/docs/public/stylesheets/normalize.css +375 -0
  175. data/guff.gemspec +16 -0
  176. data/guff.scss +514 -0
  177. data/gulpfile.js +67 -0
  178. data/lib/guff.rb +4 -0
  179. data/lib/stylesheets/_guff.scss +514 -0
  180. data/package.json +19 -0
  181. data/src/_functions.scss +57 -0
  182. data/src/_mixins.scss +301 -0
  183. data/src/_reset.scss +67 -0
  184. data/src/_settings.scss +22 -0
  185. data/src/_typography.scss +67 -0
  186. metadata +259 -0
@@ -0,0 +1,661 @@
1
+ var iframe, getStyles, curCSS,
2
+ ralpha = /alpha\([^)]*\)/i,
3
+ ropacity = /opacity\s*=\s*([^)]*)/,
4
+ rposition = /^(top|right|bottom|left)$/,
5
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
6
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
7
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
8
+ rmargin = /^margin/,
9
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
10
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
11
+ rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
12
+ elemdisplay = { BODY: "block" },
13
+
14
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
15
+ cssNormalTransform = {
16
+ letterSpacing: 0,
17
+ fontWeight: 400
18
+ },
19
+
20
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
21
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
22
+
23
+ // return a css property mapped to a potentially vendor prefixed property
24
+ function vendorPropName( style, name ) {
25
+
26
+ // shortcut for names that are not vendor prefixed
27
+ if ( name in style ) {
28
+ return name;
29
+ }
30
+
31
+ // check for vendor prefixed names
32
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
33
+ origName = name,
34
+ i = cssPrefixes.length;
35
+
36
+ while ( i-- ) {
37
+ name = cssPrefixes[ i ] + capName;
38
+ if ( name in style ) {
39
+ return name;
40
+ }
41
+ }
42
+
43
+ return origName;
44
+ }
45
+
46
+ function isHidden( elem, el ) {
47
+ // isHidden might be called from jQuery#filter function;
48
+ // in that case, element will be second argument
49
+ elem = el || elem;
50
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
51
+ }
52
+
53
+ function showHide( elements, show ) {
54
+ var display, elem, hidden,
55
+ values = [],
56
+ index = 0,
57
+ length = elements.length;
58
+
59
+ for ( ; index < length; index++ ) {
60
+ elem = elements[ index ];
61
+ if ( !elem.style ) {
62
+ continue;
63
+ }
64
+
65
+ values[ index ] = jQuery._data( elem, "olddisplay" );
66
+ display = elem.style.display;
67
+ if ( show ) {
68
+ // Reset the inline display of this element to learn if it is
69
+ // being hidden by cascaded rules or not
70
+ if ( !values[ index ] && display === "none" ) {
71
+ elem.style.display = "";
72
+ }
73
+
74
+ // Set elements which have been overridden with display: none
75
+ // in a stylesheet to whatever the default browser style is
76
+ // for such an element
77
+ if ( elem.style.display === "" && isHidden( elem ) ) {
78
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
79
+ }
80
+ } else {
81
+
82
+ if ( !values[ index ] ) {
83
+ hidden = isHidden( elem );
84
+
85
+ if ( display && display !== "none" || !hidden ) {
86
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ // Set the display of most of the elements in a second loop
93
+ // to avoid the constant reflow
94
+ for ( index = 0; index < length; index++ ) {
95
+ elem = elements[ index ];
96
+ if ( !elem.style ) {
97
+ continue;
98
+ }
99
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
100
+ elem.style.display = show ? values[ index ] || "" : "none";
101
+ }
102
+ }
103
+
104
+ return elements;
105
+ }
106
+
107
+ jQuery.fn.extend({
108
+ css: function( name, value ) {
109
+ return jQuery.access( this, function( elem, name, value ) {
110
+ var len, styles,
111
+ map = {},
112
+ i = 0;
113
+
114
+ if ( jQuery.isArray( name ) ) {
115
+ styles = getStyles( elem );
116
+ len = name.length;
117
+
118
+ for ( ; i < len; i++ ) {
119
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
120
+ }
121
+
122
+ return map;
123
+ }
124
+
125
+ return value !== undefined ?
126
+ jQuery.style( elem, name, value ) :
127
+ jQuery.css( elem, name );
128
+ }, name, value, arguments.length > 1 );
129
+ },
130
+ show: function() {
131
+ return showHide( this, true );
132
+ },
133
+ hide: function() {
134
+ return showHide( this );
135
+ },
136
+ toggle: function( state ) {
137
+ if ( typeof state === "boolean" ) {
138
+ return state ? this.show() : this.hide();
139
+ }
140
+
141
+ return this.each(function() {
142
+ if ( isHidden( this ) ) {
143
+ jQuery( this ).show();
144
+ } else {
145
+ jQuery( this ).hide();
146
+ }
147
+ });
148
+ }
149
+ });
150
+
151
+ jQuery.extend({
152
+ // Add in style property hooks for overriding the default
153
+ // behavior of getting and setting a style property
154
+ cssHooks: {
155
+ opacity: {
156
+ get: function( elem, computed ) {
157
+ if ( computed ) {
158
+ // We should always get a number back from opacity
159
+ var ret = curCSS( elem, "opacity" );
160
+ return ret === "" ? "1" : ret;
161
+ }
162
+ }
163
+ }
164
+ },
165
+
166
+ // Don't automatically add "px" to these possibly-unitless properties
167
+ cssNumber: {
168
+ "columnCount": true,
169
+ "fillOpacity": true,
170
+ "fontWeight": true,
171
+ "lineHeight": true,
172
+ "opacity": true,
173
+ "order": true,
174
+ "orphans": true,
175
+ "widows": true,
176
+ "zIndex": true,
177
+ "zoom": true
178
+ },
179
+
180
+ // Add in properties whose names you wish to fix before
181
+ // setting or getting the value
182
+ cssProps: {
183
+ // normalize float css property
184
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
185
+ },
186
+
187
+ // Get and set the style property on a DOM Node
188
+ style: function( elem, name, value, extra ) {
189
+ // Don't set styles on text and comment nodes
190
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
191
+ return;
192
+ }
193
+
194
+ // Make sure that we're working with the right name
195
+ var ret, type, hooks,
196
+ origName = jQuery.camelCase( name ),
197
+ style = elem.style;
198
+
199
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
200
+
201
+ // gets hook for the prefixed version
202
+ // followed by the unprefixed version
203
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
204
+
205
+ // Check if we're setting a value
206
+ if ( value !== undefined ) {
207
+ type = typeof value;
208
+
209
+ // convert relative number strings (+= or -=) to relative numbers. #7345
210
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
211
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
212
+ // Fixes bug #9237
213
+ type = "number";
214
+ }
215
+
216
+ // Make sure that NaN and null values aren't set. See: #7116
217
+ if ( value == null || type === "number" && isNaN( value ) ) {
218
+ return;
219
+ }
220
+
221
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
222
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
223
+ value += "px";
224
+ }
225
+
226
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
227
+ // but it would mean to define eight (for every problematic property) identical functions
228
+ if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
229
+ style[ name ] = "inherit";
230
+ }
231
+
232
+ // If a hook was provided, use that value, otherwise just set the specified value
233
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
234
+
235
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
236
+ // Fixes bug #5509
237
+ try {
238
+ style[ name ] = value;
239
+ } catch(e) {}
240
+ }
241
+
242
+ } else {
243
+ // If a hook was provided get the non-computed value from there
244
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
245
+ return ret;
246
+ }
247
+
248
+ // Otherwise just get the value from the style object
249
+ return style[ name ];
250
+ }
251
+ },
252
+
253
+ css: function( elem, name, extra, styles ) {
254
+ var num, val, hooks,
255
+ origName = jQuery.camelCase( name );
256
+
257
+ // Make sure that we're working with the right name
258
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
259
+
260
+ // gets hook for the prefixed version
261
+ // followed by the unprefixed version
262
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
263
+
264
+ // If a hook was provided get the computed value from there
265
+ if ( hooks && "get" in hooks ) {
266
+ val = hooks.get( elem, true, extra );
267
+ }
268
+
269
+ // Otherwise, if a way to get the computed value exists, use that
270
+ if ( val === undefined ) {
271
+ val = curCSS( elem, name, styles );
272
+ }
273
+
274
+ //convert "normal" to computed value
275
+ if ( val === "normal" && name in cssNormalTransform ) {
276
+ val = cssNormalTransform[ name ];
277
+ }
278
+
279
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
280
+ if ( extra === "" || extra ) {
281
+ num = parseFloat( val );
282
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
283
+ }
284
+ return val;
285
+ }
286
+ });
287
+
288
+ // NOTE: we've included the "window" in window.getComputedStyle
289
+ // because jsdom on node.js will break without it.
290
+ if ( window.getComputedStyle ) {
291
+ getStyles = function( elem ) {
292
+ return window.getComputedStyle( elem, null );
293
+ };
294
+
295
+ curCSS = function( elem, name, _computed ) {
296
+ var width, minWidth, maxWidth,
297
+ computed = _computed || getStyles( elem ),
298
+
299
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
300
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
301
+ style = elem.style;
302
+
303
+ if ( computed ) {
304
+
305
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
306
+ ret = jQuery.style( elem, name );
307
+ }
308
+
309
+ // A tribute to the "awesome hack by Dean Edwards"
310
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
311
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
312
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
313
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
314
+
315
+ // Remember the original values
316
+ width = style.width;
317
+ minWidth = style.minWidth;
318
+ maxWidth = style.maxWidth;
319
+
320
+ // Put in the new values to get a computed value out
321
+ style.minWidth = style.maxWidth = style.width = ret;
322
+ ret = computed.width;
323
+
324
+ // Revert the changed values
325
+ style.width = width;
326
+ style.minWidth = minWidth;
327
+ style.maxWidth = maxWidth;
328
+ }
329
+ }
330
+
331
+ return ret;
332
+ };
333
+ } else if ( document.documentElement.currentStyle ) {
334
+ getStyles = function( elem ) {
335
+ return elem.currentStyle;
336
+ };
337
+
338
+ curCSS = function( elem, name, _computed ) {
339
+ var left, rs, rsLeft,
340
+ computed = _computed || getStyles( elem ),
341
+ ret = computed ? computed[ name ] : undefined,
342
+ style = elem.style;
343
+
344
+ // Avoid setting ret to empty string here
345
+ // so we don't default to auto
346
+ if ( ret == null && style && style[ name ] ) {
347
+ ret = style[ name ];
348
+ }
349
+
350
+ // From the awesome hack by Dean Edwards
351
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
352
+
353
+ // If we're not dealing with a regular pixel number
354
+ // but a number that has a weird ending, we need to convert it to pixels
355
+ // but not position css attributes, as those are proportional to the parent element instead
356
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
357
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
358
+
359
+ // Remember the original values
360
+ left = style.left;
361
+ rs = elem.runtimeStyle;
362
+ rsLeft = rs && rs.left;
363
+
364
+ // Put in the new values to get a computed value out
365
+ if ( rsLeft ) {
366
+ rs.left = elem.currentStyle.left;
367
+ }
368
+ style.left = name === "fontSize" ? "1em" : ret;
369
+ ret = style.pixelLeft + "px";
370
+
371
+ // Revert the changed values
372
+ style.left = left;
373
+ if ( rsLeft ) {
374
+ rs.left = rsLeft;
375
+ }
376
+ }
377
+
378
+ return ret === "" ? "auto" : ret;
379
+ };
380
+ }
381
+
382
+ function setPositiveNumber( elem, value, subtract ) {
383
+ var matches = rnumsplit.exec( value );
384
+ return matches ?
385
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
386
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
387
+ value;
388
+ }
389
+
390
+ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
391
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
392
+ // If we already have the right measurement, avoid augmentation
393
+ 4 :
394
+ // Otherwise initialize for horizontal or vertical properties
395
+ name === "width" ? 1 : 0,
396
+
397
+ val = 0;
398
+
399
+ for ( ; i < 4; i += 2 ) {
400
+ // both box models exclude margin, so add it if we want it
401
+ if ( extra === "margin" ) {
402
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
403
+ }
404
+
405
+ if ( isBorderBox ) {
406
+ // border-box includes padding, so remove it if we want content
407
+ if ( extra === "content" ) {
408
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
409
+ }
410
+
411
+ // at this point, extra isn't border nor margin, so remove border
412
+ if ( extra !== "margin" ) {
413
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
414
+ }
415
+ } else {
416
+ // at this point, extra isn't content, so add padding
417
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
418
+
419
+ // at this point, extra isn't content nor padding, so add border
420
+ if ( extra !== "padding" ) {
421
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
422
+ }
423
+ }
424
+ }
425
+
426
+ return val;
427
+ }
428
+
429
+ function getWidthOrHeight( elem, name, extra ) {
430
+
431
+ // Start with offset property, which is equivalent to the border-box value
432
+ var valueIsBorderBox = true,
433
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
434
+ styles = getStyles( elem ),
435
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
436
+
437
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
438
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
439
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
440
+ if ( val <= 0 || val == null ) {
441
+ // Fall back to computed then uncomputed css if necessary
442
+ val = curCSS( elem, name, styles );
443
+ if ( val < 0 || val == null ) {
444
+ val = elem.style[ name ];
445
+ }
446
+
447
+ // Computed unit is not pixels. Stop here and return.
448
+ if ( rnumnonpx.test(val) ) {
449
+ return val;
450
+ }
451
+
452
+ // we need the check for style in case a browser which returns unreliable values
453
+ // for getComputedStyle silently falls back to the reliable elem.style
454
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
455
+
456
+ // Normalize "", auto, and prepare for extra
457
+ val = parseFloat( val ) || 0;
458
+ }
459
+
460
+ // use the active box-sizing model to add/subtract irrelevant styles
461
+ return ( val +
462
+ augmentWidthOrHeight(
463
+ elem,
464
+ name,
465
+ extra || ( isBorderBox ? "border" : "content" ),
466
+ valueIsBorderBox,
467
+ styles
468
+ )
469
+ ) + "px";
470
+ }
471
+
472
+ // Try to determine the default display value of an element
473
+ function css_defaultDisplay( nodeName ) {
474
+ var doc = document,
475
+ display = elemdisplay[ nodeName ];
476
+
477
+ if ( !display ) {
478
+ display = actualDisplay( nodeName, doc );
479
+
480
+ // If the simple way fails, read from inside an iframe
481
+ if ( display === "none" || !display ) {
482
+ // Use the already-created iframe if possible
483
+ iframe = ( iframe ||
484
+ jQuery("<iframe frameborder='0' width='0' height='0'/>")
485
+ .css( "cssText", "display:block !important" )
486
+ ).appendTo( doc.documentElement );
487
+
488
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
489
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
490
+ doc.write("<!doctype html><html><body>");
491
+ doc.close();
492
+
493
+ display = actualDisplay( nodeName, doc );
494
+ iframe.detach();
495
+ }
496
+
497
+ // Store the correct default display
498
+ elemdisplay[ nodeName ] = display;
499
+ }
500
+
501
+ return display;
502
+ }
503
+
504
+ // Called ONLY from within css_defaultDisplay
505
+ function actualDisplay( name, doc ) {
506
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
507
+ display = jQuery.css( elem[0], "display" );
508
+ elem.remove();
509
+ return display;
510
+ }
511
+
512
+ jQuery.each([ "height", "width" ], function( i, name ) {
513
+ jQuery.cssHooks[ name ] = {
514
+ get: function( elem, computed, extra ) {
515
+ if ( computed ) {
516
+ // certain elements can have dimension info if we invisibly show them
517
+ // however, it must have a current display style that would benefit from this
518
+ return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
519
+ jQuery.swap( elem, cssShow, function() {
520
+ return getWidthOrHeight( elem, name, extra );
521
+ }) :
522
+ getWidthOrHeight( elem, name, extra );
523
+ }
524
+ },
525
+
526
+ set: function( elem, value, extra ) {
527
+ var styles = extra && getStyles( elem );
528
+ return setPositiveNumber( elem, value, extra ?
529
+ augmentWidthOrHeight(
530
+ elem,
531
+ name,
532
+ extra,
533
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
534
+ styles
535
+ ) : 0
536
+ );
537
+ }
538
+ };
539
+ });
540
+
541
+ if ( !jQuery.support.opacity ) {
542
+ jQuery.cssHooks.opacity = {
543
+ get: function( elem, computed ) {
544
+ // IE uses filters for opacity
545
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
546
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
547
+ computed ? "1" : "";
548
+ },
549
+
550
+ set: function( elem, value ) {
551
+ var style = elem.style,
552
+ currentStyle = elem.currentStyle,
553
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
554
+ filter = currentStyle && currentStyle.filter || style.filter || "";
555
+
556
+ // IE has trouble with opacity if it does not have layout
557
+ // Force it by setting the zoom level
558
+ style.zoom = 1;
559
+
560
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
561
+ // if value === "", then remove inline opacity #12685
562
+ if ( ( value >= 1 || value === "" ) &&
563
+ jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
564
+ style.removeAttribute ) {
565
+
566
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
567
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
568
+ // style.removeAttribute is IE Only, but so apparently is this code path...
569
+ style.removeAttribute( "filter" );
570
+
571
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
572
+ if ( value === "" || currentStyle && !currentStyle.filter ) {
573
+ return;
574
+ }
575
+ }
576
+
577
+ // otherwise, set new filter values
578
+ style.filter = ralpha.test( filter ) ?
579
+ filter.replace( ralpha, opacity ) :
580
+ filter + " " + opacity;
581
+ }
582
+ };
583
+ }
584
+
585
+ // These hooks cannot be added until DOM ready because the support test
586
+ // for it is not run until after DOM ready
587
+ jQuery(function() {
588
+ if ( !jQuery.support.reliableMarginRight ) {
589
+ jQuery.cssHooks.marginRight = {
590
+ get: function( elem, computed ) {
591
+ if ( computed ) {
592
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
593
+ // Work around by temporarily setting element display to inline-block
594
+ return jQuery.swap( elem, { "display": "inline-block" },
595
+ curCSS, [ elem, "marginRight" ] );
596
+ }
597
+ }
598
+ };
599
+ }
600
+
601
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
602
+ // getComputedStyle returns percent when specified for top/left/bottom/right
603
+ // rather than make the css module depend on the offset module, we just check for it here
604
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
605
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
606
+ jQuery.cssHooks[ prop ] = {
607
+ get: function( elem, computed ) {
608
+ if ( computed ) {
609
+ computed = curCSS( elem, prop );
610
+ // if curCSS returns percentage, fallback to offset
611
+ return rnumnonpx.test( computed ) ?
612
+ jQuery( elem ).position()[ prop ] + "px" :
613
+ computed;
614
+ }
615
+ }
616
+ };
617
+ });
618
+ }
619
+
620
+ });
621
+
622
+ if ( jQuery.expr && jQuery.expr.filters ) {
623
+ jQuery.expr.filters.hidden = function( elem ) {
624
+ // Support: Opera <= 12.12
625
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
626
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
627
+ (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
628
+ };
629
+
630
+ jQuery.expr.filters.visible = function( elem ) {
631
+ return !jQuery.expr.filters.hidden( elem );
632
+ };
633
+ }
634
+
635
+ // These hooks are used by animate to expand properties
636
+ jQuery.each({
637
+ margin: "",
638
+ padding: "",
639
+ border: "Width"
640
+ }, function( prefix, suffix ) {
641
+ jQuery.cssHooks[ prefix + suffix ] = {
642
+ expand: function( value ) {
643
+ var i = 0,
644
+ expanded = {},
645
+
646
+ // assumes a single number if not a string
647
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
648
+
649
+ for ( ; i < 4; i++ ) {
650
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
651
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
652
+ }
653
+
654
+ return expanded;
655
+ }
656
+ };
657
+
658
+ if ( !rmargin.test( prefix ) ) {
659
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
660
+ }
661
+ });