govuk_publishing_components 18.1.1 → 18.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +11 -5
  3. data/app/views/govuk_publishing_components/components/docs/share_links.yml +10 -7
  4. data/lib/govuk_publishing_components/version.rb +1 -1
  5. data/node_modules/jquery/AUTHORS.txt +266 -0
  6. data/node_modules/jquery/LICENSE.txt +36 -0
  7. data/node_modules/jquery/README.md +65 -0
  8. data/node_modules/jquery/bower.json +14 -0
  9. data/node_modules/jquery/dist/jquery.js +11008 -0
  10. data/node_modules/jquery/dist/jquery.min.js +5 -0
  11. data/node_modules/jquery/dist/jquery.min.map +1 -0
  12. data/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
  13. data/node_modules/jquery/external/sizzle/dist/sizzle.js +2143 -0
  14. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  15. data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  16. data/node_modules/jquery/package.json +157 -0
  17. data/node_modules/jquery/src/ajax.js +842 -0
  18. data/node_modules/jquery/src/ajax/jsonp.js +100 -0
  19. data/node_modules/jquery/src/ajax/load.js +83 -0
  20. data/node_modules/jquery/src/ajax/parseJSON.js +53 -0
  21. data/node_modules/jquery/src/ajax/parseXML.js +31 -0
  22. data/node_modules/jquery/src/ajax/script.js +95 -0
  23. data/node_modules/jquery/src/ajax/var/location.js +3 -0
  24. data/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  25. data/node_modules/jquery/src/ajax/var/rquery.js +3 -0
  26. data/node_modules/jquery/src/ajax/xhr.js +229 -0
  27. data/node_modules/jquery/src/attributes.js +11 -0
  28. data/node_modules/jquery/src/attributes/attr.js +281 -0
  29. data/node_modules/jquery/src/attributes/classes.js +174 -0
  30. data/node_modules/jquery/src/attributes/prop.js +156 -0
  31. data/node_modules/jquery/src/attributes/support.js +70 -0
  32. data/node_modules/jquery/src/attributes/val.js +191 -0
  33. data/node_modules/jquery/src/callbacks.js +232 -0
  34. data/node_modules/jquery/src/core.js +529 -0
  35. data/node_modules/jquery/src/core/access.js +65 -0
  36. data/node_modules/jquery/src/core/init.js +140 -0
  37. data/node_modules/jquery/src/core/parseHTML.js +41 -0
  38. data/node_modules/jquery/src/core/ready.js +163 -0
  39. data/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
  40. data/node_modules/jquery/src/css.js +563 -0
  41. data/node_modules/jquery/src/css/addGetHookIf.js +24 -0
  42. data/node_modules/jquery/src/css/adjustCSS.js +65 -0
  43. data/node_modules/jquery/src/css/curCSS.js +137 -0
  44. data/node_modules/jquery/src/css/defaultDisplay.js +72 -0
  45. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +42 -0
  46. data/node_modules/jquery/src/css/showHide.js +45 -0
  47. data/node_modules/jquery/src/css/support.js +184 -0
  48. data/node_modules/jquery/src/css/var/cssExpand.js +3 -0
  49. data/node_modules/jquery/src/css/var/isHidden.js +16 -0
  50. data/node_modules/jquery/src/css/var/rmargin.js +3 -0
  51. data/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
  52. data/node_modules/jquery/src/css/var/swap.js +24 -0
  53. data/node_modules/jquery/src/data.js +342 -0
  54. data/node_modules/jquery/src/data/support.js +23 -0
  55. data/node_modules/jquery/src/data/var/acceptData.js +20 -0
  56. data/node_modules/jquery/src/deferred.js +159 -0
  57. data/node_modules/jquery/src/deprecated.js +34 -0
  58. data/node_modules/jquery/src/dimensions.js +56 -0
  59. data/node_modules/jquery/src/effects.js +640 -0
  60. data/node_modules/jquery/src/effects/Tween.js +121 -0
  61. data/node_modules/jquery/src/effects/animatedSelector.js +13 -0
  62. data/node_modules/jquery/src/effects/support.js +58 -0
  63. data/node_modules/jquery/src/event.js +1134 -0
  64. data/node_modules/jquery/src/event/ajax.js +20 -0
  65. data/node_modules/jquery/src/event/alias.js +25 -0
  66. data/node_modules/jquery/src/event/support.js +28 -0
  67. data/node_modules/jquery/src/exports/amd.js +24 -0
  68. data/node_modules/jquery/src/exports/global.js +26 -0
  69. data/node_modules/jquery/src/intro.js +44 -0
  70. data/node_modules/jquery/src/jquery.js +37 -0
  71. data/node_modules/jquery/src/manipulation.js +585 -0
  72. data/node_modules/jquery/src/manipulation/_evalUrl.js +21 -0
  73. data/node_modules/jquery/src/manipulation/buildFragment.js +157 -0
  74. data/node_modules/jquery/src/manipulation/createSafeFragment.js +20 -0
  75. data/node_modules/jquery/src/manipulation/getAll.js +33 -0
  76. data/node_modules/jquery/src/manipulation/setGlobalEval.js +19 -0
  77. data/node_modules/jquery/src/manipulation/support.js +72 -0
  78. data/node_modules/jquery/src/manipulation/var/nodeNames.js +5 -0
  79. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
  80. data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
  81. data/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
  82. data/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
  83. data/node_modules/jquery/src/manipulation/wrapMap.js +30 -0
  84. data/node_modules/jquery/src/offset.js +219 -0
  85. data/node_modules/jquery/src/outro.js +2 -0
  86. data/node_modules/jquery/src/queue.js +144 -0
  87. data/node_modules/jquery/src/queue/delay.js +22 -0
  88. data/node_modules/jquery/src/selector-sizzle.js +14 -0
  89. data/node_modules/jquery/src/selector.js +1 -0
  90. data/node_modules/jquery/src/serialize.js +125 -0
  91. data/node_modules/jquery/src/support.js +63 -0
  92. data/node_modules/jquery/src/traversing.js +179 -0
  93. data/node_modules/jquery/src/traversing/findFilter.js +100 -0
  94. data/node_modules/jquery/src/traversing/var/dir.js +20 -0
  95. data/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
  96. data/node_modules/jquery/src/traversing/var/siblings.js +15 -0
  97. data/node_modules/jquery/src/var/class2type.js +5 -0
  98. data/node_modules/jquery/src/var/concat.js +5 -0
  99. data/node_modules/jquery/src/var/deletedIds.js +3 -0
  100. data/node_modules/jquery/src/var/document.js +3 -0
  101. data/node_modules/jquery/src/var/documentElement.js +5 -0
  102. data/node_modules/jquery/src/var/hasOwn.js +5 -0
  103. data/node_modules/jquery/src/var/indexOf.js +5 -0
  104. data/node_modules/jquery/src/var/pnum.js +3 -0
  105. data/node_modules/jquery/src/var/push.js +5 -0
  106. data/node_modules/jquery/src/var/rcssNum.js +7 -0
  107. data/node_modules/jquery/src/var/rnotwhite.js +3 -0
  108. data/node_modules/jquery/src/var/slice.js +5 -0
  109. data/node_modules/jquery/src/var/support.js +5 -0
  110. data/node_modules/jquery/src/var/toString.js +5 -0
  111. data/node_modules/jquery/src/wrap.js +77 -0
  112. metadata +109 -2
@@ -0,0 +1,24 @@
1
+ define( function() {
2
+
3
+ function addGetHookIf( conditionFn, hookFn ) {
4
+
5
+ // Define the hook, we'll check on the first run if it's really needed.
6
+ return {
7
+ get: function() {
8
+ if ( conditionFn() ) {
9
+
10
+ // Hook not needed (or it's not possible to use it due
11
+ // to missing dependency), remove it.
12
+ delete this.get;
13
+ return;
14
+ }
15
+
16
+ // Hook needed; redefine it so that the support test is not executed again.
17
+ return ( this.get = hookFn ).apply( this, arguments );
18
+ }
19
+ };
20
+ }
21
+
22
+ return addGetHookIf;
23
+
24
+ } );
@@ -0,0 +1,65 @@
1
+ define( [
2
+ "../core",
3
+ "../var/rcssNum"
4
+ ], function( jQuery, rcssNum ) {
5
+
6
+ function adjustCSS( elem, prop, valueParts, tween ) {
7
+ var adjusted,
8
+ scale = 1,
9
+ maxIterations = 20,
10
+ currentValue = tween ?
11
+ function() { return tween.cur(); } :
12
+ function() { return jQuery.css( elem, prop, "" ); },
13
+ initial = currentValue(),
14
+ unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
15
+
16
+ // Starting value computation is required for potential unit mismatches
17
+ initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
18
+ rcssNum.exec( jQuery.css( elem, prop ) );
19
+
20
+ if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
21
+
22
+ // Trust units reported by jQuery.css
23
+ unit = unit || initialInUnit[ 3 ];
24
+
25
+ // Make sure we update the tween properties later on
26
+ valueParts = valueParts || [];
27
+
28
+ // Iteratively approximate from a nonzero starting point
29
+ initialInUnit = +initial || 1;
30
+
31
+ do {
32
+
33
+ // If previous iteration zeroed out, double until we get *something*.
34
+ // Use string for doubling so we don't accidentally see scale as unchanged below
35
+ scale = scale || ".5";
36
+
37
+ // Adjust and apply
38
+ initialInUnit = initialInUnit / scale;
39
+ jQuery.style( elem, prop, initialInUnit + unit );
40
+
41
+ // Update scale, tolerating zero or NaN from tween.cur()
42
+ // Break the loop if scale is unchanged or perfect, or if we've just had enough.
43
+ } while (
44
+ scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
45
+ );
46
+ }
47
+
48
+ if ( valueParts ) {
49
+ initialInUnit = +initialInUnit || +initial || 0;
50
+
51
+ // Apply relative offset (+=/-=) if specified
52
+ adjusted = valueParts[ 1 ] ?
53
+ initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
54
+ +valueParts[ 2 ];
55
+ if ( tween ) {
56
+ tween.unit = unit;
57
+ tween.start = initialInUnit;
58
+ tween.end = adjusted;
59
+ }
60
+ }
61
+ return adjusted;
62
+ }
63
+
64
+ return adjustCSS;
65
+ } );
@@ -0,0 +1,137 @@
1
+ define( [
2
+ "exports",
3
+ "../core",
4
+ "../var/documentElement",
5
+ "./var/rnumnonpx",
6
+ "./var/rmargin",
7
+ "./support",
8
+ "../selector" // contains
9
+ ], function( exports, jQuery, documentElement, rnumnonpx, rmargin, support ) {
10
+
11
+ var getStyles, curCSS,
12
+ rposition = /^(top|right|bottom|left)$/;
13
+
14
+ if ( window.getComputedStyle ) {
15
+ getStyles = function( elem ) {
16
+
17
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
18
+ // IE throws on elements created in popups
19
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
20
+ var view = elem.ownerDocument.defaultView;
21
+
22
+ if ( !view || !view.opener ) {
23
+ view = window;
24
+ }
25
+
26
+ return view.getComputedStyle( elem );
27
+ };
28
+
29
+ curCSS = function( elem, name, computed ) {
30
+ var width, minWidth, maxWidth, ret,
31
+ style = elem.style;
32
+
33
+ computed = computed || getStyles( elem );
34
+
35
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
36
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
37
+
38
+ // Support: Opera 12.1x only
39
+ // Fall back to style even without computed
40
+ // computed is undefined for elems on document fragments
41
+ if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
42
+ ret = jQuery.style( elem, name );
43
+ }
44
+
45
+ if ( computed ) {
46
+
47
+ // A tribute to the "awesome hack by Dean Edwards"
48
+ // Chrome < 17 and Safari 5.0 uses "computed value"
49
+ // instead of "used value" for margin-right
50
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values,
51
+ // but width seems to be reliably pixels
52
+ // this is against the CSSOM draft spec:
53
+ // http://dev.w3.org/csswg/cssom/#resolved-values
54
+ if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
55
+
56
+ // Remember the original values
57
+ width = style.width;
58
+ minWidth = style.minWidth;
59
+ maxWidth = style.maxWidth;
60
+
61
+ // Put in the new values to get a computed value out
62
+ style.minWidth = style.maxWidth = style.width = ret;
63
+ ret = computed.width;
64
+
65
+ // Revert the changed values
66
+ style.width = width;
67
+ style.minWidth = minWidth;
68
+ style.maxWidth = maxWidth;
69
+ }
70
+ }
71
+
72
+ // Support: IE
73
+ // IE returns zIndex value as an integer.
74
+ return ret === undefined ?
75
+ ret :
76
+ ret + "";
77
+ };
78
+ } else if ( documentElement.currentStyle ) {
79
+ getStyles = function( elem ) {
80
+ return elem.currentStyle;
81
+ };
82
+
83
+ curCSS = function( elem, name, computed ) {
84
+ var left, rs, rsLeft, ret,
85
+ style = elem.style;
86
+
87
+ computed = computed || getStyles( elem );
88
+ ret = computed ? computed[ name ] : undefined;
89
+
90
+ // Avoid setting ret to empty string here
91
+ // so we don't default to auto
92
+ if ( ret == null && style && style[ name ] ) {
93
+ ret = style[ name ];
94
+ }
95
+
96
+ // From the awesome hack by Dean Edwards
97
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
98
+
99
+ // If we're not dealing with a regular pixel number
100
+ // but a number that has a weird ending, we need to convert it to pixels
101
+ // but not position css attributes, as those are
102
+ // proportional to the parent element instead
103
+ // and we can't measure the parent instead because it
104
+ // might trigger a "stacking dolls" problem
105
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
106
+
107
+ // Remember the original values
108
+ left = style.left;
109
+ rs = elem.runtimeStyle;
110
+ rsLeft = rs && rs.left;
111
+
112
+ // Put in the new values to get a computed value out
113
+ if ( rsLeft ) {
114
+ rs.left = elem.currentStyle.left;
115
+ }
116
+ style.left = name === "fontSize" ? "1em" : ret;
117
+ ret = style.pixelLeft + "px";
118
+
119
+ // Revert the changed values
120
+ style.left = left;
121
+ if ( rsLeft ) {
122
+ rs.left = rsLeft;
123
+ }
124
+ }
125
+
126
+ // Support: IE
127
+ // IE returns zIndex value as an integer.
128
+ return ret === undefined ?
129
+ ret :
130
+ ret + "" || "auto";
131
+ };
132
+ }
133
+
134
+ exports.getStyles = getStyles;
135
+ exports.curCSS = curCSS;
136
+
137
+ } );
@@ -0,0 +1,72 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document",
4
+ "../manipulation" // appendTo
5
+ ], function( jQuery, document ) {
6
+
7
+ var iframe,
8
+ elemdisplay = {
9
+
10
+ // Support: Firefox
11
+ // We have to pre-define these values for FF (#10227)
12
+ HTML: "block",
13
+ BODY: "block"
14
+ };
15
+
16
+ /**
17
+ * Retrieve the actual display of a element
18
+ * @param {String} name nodeName of the element
19
+ * @param {Object} doc Document object
20
+ */
21
+
22
+ // Called only from within defaultDisplay
23
+ function actualDisplay( name, doc ) {
24
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
25
+
26
+ display = jQuery.css( elem[ 0 ], "display" );
27
+
28
+ // We don't have any data stored on the element,
29
+ // so use "detach" method as fast way to get rid of the element
30
+ elem.detach();
31
+
32
+ return display;
33
+ }
34
+
35
+ /**
36
+ * Try to determine the default display value of an element
37
+ * @param {String} nodeName
38
+ */
39
+ function defaultDisplay( nodeName ) {
40
+ var doc = document,
41
+ display = elemdisplay[ nodeName ];
42
+
43
+ if ( !display ) {
44
+ display = actualDisplay( nodeName, doc );
45
+
46
+ // If the simple way fails, read from inside an iframe
47
+ if ( display === "none" || !display ) {
48
+
49
+ // Use the already-created iframe if possible
50
+ iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
51
+ .appendTo( doc.documentElement );
52
+
53
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
54
+ doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
55
+
56
+ // Support: IE
57
+ doc.write();
58
+ doc.close();
59
+
60
+ display = actualDisplay( nodeName, doc );
61
+ iframe.detach();
62
+ }
63
+
64
+ // Store the correct default display
65
+ elemdisplay[ nodeName ] = display;
66
+ }
67
+
68
+ return display;
69
+ }
70
+
71
+ return defaultDisplay;
72
+ } );
@@ -0,0 +1,42 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document",
4
+ "./support",
5
+ "../selector",
6
+ "../css"
7
+ ], function( jQuery, document, support ) {
8
+
9
+ function getDisplay( elem ) {
10
+ return elem.style && elem.style.display || jQuery.css( elem, "display" );
11
+ }
12
+
13
+ function filterHidden( elem ) {
14
+
15
+ // Disconnected elements are considered hidden
16
+ if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {
17
+ return true;
18
+ }
19
+ while ( elem && elem.nodeType === 1 ) {
20
+ if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) {
21
+ return true;
22
+ }
23
+ elem = elem.parentNode;
24
+ }
25
+ return false;
26
+ }
27
+
28
+ jQuery.expr.filters.hidden = function( elem ) {
29
+
30
+ // Support: Opera <= 12.12
31
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
32
+ return support.reliableHiddenOffsets() ?
33
+ ( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
34
+ !elem.getClientRects().length ) :
35
+ filterHidden( elem );
36
+ };
37
+
38
+ jQuery.expr.filters.visible = function( elem ) {
39
+ return !jQuery.expr.filters.hidden( elem );
40
+ };
41
+
42
+ } );
@@ -0,0 +1,45 @@
1
+ define( [], function() {
2
+ function showHide( elements, show ) {
3
+ var display, elem,
4
+ values = [],
5
+ index = 0,
6
+ length = elements.length;
7
+
8
+ // Determine new display value for elements that need to change
9
+ for ( ; index < length; index++ ) {
10
+ elem = elements[ index ];
11
+ if ( !elem.style ) {
12
+ continue;
13
+ }
14
+
15
+ display = elem.style.display;
16
+ if ( show ) {
17
+ if ( display === "none" ) {
18
+
19
+ // Restore a pre-hide() value if we have one
20
+ values[ index ] = jQuery._data( elem, "display" ) || "";
21
+ }
22
+ } else {
23
+ if ( display !== "none" ) {
24
+ values[ index ] = "none";
25
+
26
+ // Remember the value we're replacing
27
+ jQuery._data( elem, "display", display );
28
+ }
29
+ }
30
+ }
31
+
32
+ // Set the display of the elements in a second loop
33
+ // to avoid the constant reflow
34
+ for ( index = 0; index < length; index++ ) {
35
+ if ( values[ index ] != null ) {
36
+ elements[ index ].style.display = values[ index ];
37
+ }
38
+ }
39
+
40
+ return elements;
41
+ }
42
+
43
+ return showHide;
44
+
45
+ } );
@@ -0,0 +1,184 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document",
4
+ "../var/documentElement",
5
+ "../var/support"
6
+ ], function( jQuery, document, documentElement, support ) {
7
+
8
+ ( function() {
9
+ var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,
10
+ reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,
11
+ container = document.createElement( "div" ),
12
+ div = document.createElement( "div" );
13
+
14
+ // Finish early in limited (non-browser) environments
15
+ if ( !div.style ) {
16
+ return;
17
+ }
18
+
19
+ div.style.cssText = "float:left;opacity:.5";
20
+
21
+ // Support: IE<9
22
+ // Make sure that element opacity exists (as opposed to filter)
23
+ support.opacity = div.style.opacity === "0.5";
24
+
25
+ // Verify style float existence
26
+ // (IE uses styleFloat instead of cssFloat)
27
+ support.cssFloat = !!div.style.cssFloat;
28
+
29
+ div.style.backgroundClip = "content-box";
30
+ div.cloneNode( true ).style.backgroundClip = "";
31
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
32
+
33
+ container = document.createElement( "div" );
34
+ container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
35
+ "padding:0;margin-top:1px;position:absolute";
36
+ div.innerHTML = "";
37
+ container.appendChild( div );
38
+
39
+ // Support: Firefox<29, Android 2.3
40
+ // Vendor-prefix box-sizing
41
+ support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
42
+ div.style.WebkitBoxSizing === "";
43
+
44
+ jQuery.extend( support, {
45
+ reliableHiddenOffsets: function() {
46
+ if ( pixelPositionVal == null ) {
47
+ computeStyleTests();
48
+ }
49
+ return reliableHiddenOffsetsVal;
50
+ },
51
+
52
+ boxSizingReliable: function() {
53
+
54
+ // We're checking for pixelPositionVal here instead of boxSizingReliableVal
55
+ // since that compresses better and they're computed together anyway.
56
+ if ( pixelPositionVal == null ) {
57
+ computeStyleTests();
58
+ }
59
+ return boxSizingReliableVal;
60
+ },
61
+
62
+ pixelMarginRight: function() {
63
+
64
+ // Support: Android 4.0-4.3
65
+ if ( pixelPositionVal == null ) {
66
+ computeStyleTests();
67
+ }
68
+ return pixelMarginRightVal;
69
+ },
70
+
71
+ pixelPosition: function() {
72
+ if ( pixelPositionVal == null ) {
73
+ computeStyleTests();
74
+ }
75
+ return pixelPositionVal;
76
+ },
77
+
78
+ reliableMarginRight: function() {
79
+
80
+ // Support: Android 2.3
81
+ if ( pixelPositionVal == null ) {
82
+ computeStyleTests();
83
+ }
84
+ return reliableMarginRightVal;
85
+ },
86
+
87
+ reliableMarginLeft: function() {
88
+
89
+ // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
90
+ if ( pixelPositionVal == null ) {
91
+ computeStyleTests();
92
+ }
93
+ return reliableMarginLeftVal;
94
+ }
95
+ } );
96
+
97
+ function computeStyleTests() {
98
+ var contents, divStyle,
99
+ documentElement = document.documentElement;
100
+
101
+ // Setup
102
+ documentElement.appendChild( container );
103
+
104
+ div.style.cssText =
105
+
106
+ // Support: Android 2.3
107
+ // Vendor-prefix box-sizing
108
+ "-webkit-box-sizing:border-box;box-sizing:border-box;" +
109
+ "position:relative;display:block;" +
110
+ "margin:auto;border:1px;padding:1px;" +
111
+ "top:1%;width:50%";
112
+
113
+ // Support: IE<9
114
+ // Assume reasonable values in the absence of getComputedStyle
115
+ pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;
116
+ pixelMarginRightVal = reliableMarginRightVal = true;
117
+
118
+ // Check for getComputedStyle so that this code is not run in IE<9.
119
+ if ( window.getComputedStyle ) {
120
+ divStyle = window.getComputedStyle( div );
121
+ pixelPositionVal = ( divStyle || {} ).top !== "1%";
122
+ reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
123
+ boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px";
124
+
125
+ // Support: Android 4.0 - 4.3 only
126
+ // Some styles come back with percentage values, even though they shouldn't
127
+ div.style.marginRight = "50%";
128
+ pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";
129
+
130
+ // Support: Android 2.3 only
131
+ // Div with explicit width and no margin-right incorrectly
132
+ // gets computed margin-right based on width of container (#3333)
133
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
134
+ contents = div.appendChild( document.createElement( "div" ) );
135
+
136
+ // Reset CSS: box-sizing; display; margin; border; padding
137
+ contents.style.cssText = div.style.cssText =
138
+
139
+ // Support: Android 2.3
140
+ // Vendor-prefix box-sizing
141
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
142
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
143
+ contents.style.marginRight = contents.style.width = "0";
144
+ div.style.width = "1px";
145
+
146
+ reliableMarginRightVal =
147
+ !parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );
148
+
149
+ div.removeChild( contents );
150
+ }
151
+
152
+ // Support: IE6-8
153
+ // First check that getClientRects works as expected
154
+ // Check if table cells still have offsetWidth/Height when they are set
155
+ // to display:none and there are still other visible table cells in a
156
+ // table row; if so, offsetWidth/Height are not reliable for use when
157
+ // determining if an element has been hidden directly using
158
+ // display:none (it is still safe to use offsets if a parent element is
159
+ // hidden; don safety goggles and see bug #4512 for more information).
160
+ div.style.display = "none";
161
+ reliableHiddenOffsetsVal = div.getClientRects().length === 0;
162
+ if ( reliableHiddenOffsetsVal ) {
163
+ div.style.display = "";
164
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
165
+ div.childNodes[ 0 ].style.borderCollapse = "separate";
166
+ contents = div.getElementsByTagName( "td" );
167
+ contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
168
+ reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
169
+ if ( reliableHiddenOffsetsVal ) {
170
+ contents[ 0 ].style.display = "";
171
+ contents[ 1 ].style.display = "none";
172
+ reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
173
+ }
174
+ }
175
+
176
+ // Teardown
177
+ documentElement.removeChild( container );
178
+ }
179
+
180
+ } )();
181
+
182
+ return support;
183
+
184
+ } );