From 227e2182dd1c12974c0c26a7f52aa3066dbb098a Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sun, 13 Nov 2016 17:08:16 -0500 Subject: [PATCH 1/3] Dimensions: normalize outerWidth and outerHeight --- entries/outerHeight.xml | 10 +++++----- entries/outerWidth.xml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml index ab497404..9f3a8fe5 100644 --- a/entries/outerHeight.xml +++ b/entries/outerHeight.xml @@ -1,6 +1,6 @@ - Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements. + Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements or set the outer height of every matched element. .outerHeight() @@ -9,10 +9,10 @@ A Boolean indicating whether to include the element's margin in the calculation. - Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements. + Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements. -

The top and bottom padding and border are always included in the .outerHeight() calculation; if the includeMargin argument is set to true, the margin (top and bottom) is also included.

-

This method is not applicable to window and document objects; for these, use .height() instead.

+

Returns the height of the element, including top and bottom padding, border, and optionally margin, in pixels.

+

This method is not applicable to window and document objects; for these, use .height() instead. Although .outerHeight() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.

Figure 1 - Illustration of the measured height
@@ -60,7 +60,7 @@ $( "p:last" ).text( A function returning the outer height to set. Receives the index position of the element in the set and the old outer height as arguments. Within the function, this refers to the current element in the set. - Set the CSS outer Height of each element in the set of matched elements. + Set the CSS outer height of each element in the set of matched elements.

When calling .outerHeight(value), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used (such as 100px, 50%, or auto).

diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml index 64687fb9..dcf7d23c 100644 --- a/entries/outerWidth.xml +++ b/entries/outerWidth.xml @@ -1,6 +1,6 @@ - Get the current computed width for the first element in the set of matched elements, including padding and border. + Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements or set the outer width of every matched element. .outerWidth() @@ -9,10 +9,9 @@ A Boolean indicating whether to include the element's margin in the calculation. - Get the current computed width for the first element in the set of matched elements, including padding and border. + Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements. -

Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels.

-

If includeMargin is omitted or false, the padding and border are included in the calculation; if true, the margin is also included.

+

Returns the width of the element, including left and right padding, border, and optionally margin, in pixels.

This method is not applicable to window and document objects; for these, use .width() instead. Although .outerWidth() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.

@@ -45,6 +44,7 @@ $( "p:last" ).text( + 1.8.0 From a095cdd5874f32c956bb2428b8d62844bbb24155 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sun, 13 Nov 2016 17:21:31 -0500 Subject: [PATCH 2/3] Dimensions: Document empty-context getters Fixes gh-997 --- entries/innerHeight.xml | 2 +- entries/innerWidth.xml | 2 +- entries/outerHeight.xml | 2 +- entries/outerWidth.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entries/innerHeight.xml b/entries/innerHeight.xml index b8c5654e..a66259c8 100644 --- a/entries/innerHeight.xml +++ b/entries/innerHeight.xml @@ -9,7 +9,7 @@ Get the current computed height for the first element in the set of matched elements, including padding but not border. -

This method returns the height of the element, including top and bottom padding, in pixels.

+

This method returns the height of the element, including top and bottom padding, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

This method is not applicable to window and document objects; for these, use .height() instead.

diff --git a/entries/innerWidth.xml b/entries/innerWidth.xml index 6e9fd0d3..6a312359 100644 --- a/entries/innerWidth.xml +++ b/entries/innerWidth.xml @@ -8,7 +8,7 @@ Get the current computed inner width for the first element in the set of matched elements, including padding but not border. -

This method returns the width of the element, including left and right padding, in pixels.

+

This method returns the width of the element, including left and right padding, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

This method is not applicable to window and document objects; for these, use .width() instead.

diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml index 9f3a8fe5..4dee7175 100644 --- a/entries/outerHeight.xml +++ b/entries/outerHeight.xml @@ -11,7 +11,7 @@ Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements. -

Returns the height of the element, including top and bottom padding, border, and optionally margin, in pixels.

+

Returns the height of the element, including top and bottom padding, border, and optionally margin, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

This method is not applicable to window and document objects; for these, use .height() instead. Although .outerHeight() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.

diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml index dcf7d23c..18708efb 100644 --- a/entries/outerWidth.xml +++ b/entries/outerWidth.xml @@ -11,7 +11,7 @@ Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements. -

Returns the width of the element, including left and right padding, border, and optionally margin, in pixels.

+

Returns the width of the element, including left and right padding, border, and optionally margin, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

This method is not applicable to window and document objects; for these, use .width() instead. Although .outerWidth() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.

From e4756988d63d4e118d46912080e20c15f645146a Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sun, 13 Nov 2016 21:32:41 -0500 Subject: [PATCH 3/3] Dimensions: Correct version number reference --- entries/innerHeight.xml | 2 +- entries/innerWidth.xml | 2 +- entries/outerHeight.xml | 2 +- entries/outerWidth.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entries/innerHeight.xml b/entries/innerHeight.xml index a66259c8..bdc22f23 100644 --- a/entries/innerHeight.xml +++ b/entries/innerHeight.xml @@ -9,7 +9,7 @@ Get the current computed height for the first element in the set of matched elements, including padding but not border. -

This method returns the height of the element, including top and bottom padding, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

+

This method returns the height of the element, including top and bottom padding, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 3.0).

This method is not applicable to window and document objects; for these, use .height() instead.

diff --git a/entries/innerWidth.xml b/entries/innerWidth.xml index 6a312359..d3641b00 100644 --- a/entries/innerWidth.xml +++ b/entries/innerWidth.xml @@ -8,7 +8,7 @@ Get the current computed inner width for the first element in the set of matched elements, including padding but not border. -

This method returns the width of the element, including left and right padding, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

+

This method returns the width of the element, including left and right padding, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 3.0).

This method is not applicable to window and document objects; for these, use .width() instead.

diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml index 4dee7175..c50dd23d 100644 --- a/entries/outerHeight.xml +++ b/entries/outerHeight.xml @@ -11,7 +11,7 @@ Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements. -

Returns the height of the element, including top and bottom padding, border, and optionally margin, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

+

Returns the height of the element, including top and bottom padding, border, and optionally margin, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 3.0).

This method is not applicable to window and document objects; for these, use .height() instead. Although .outerHeight() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.

diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml index 18708efb..bb37d571 100644 --- a/entries/outerWidth.xml +++ b/entries/outerWidth.xml @@ -11,7 +11,7 @@ Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements. -

Returns the width of the element, including left and right padding, border, and optionally margin, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 2.2.0).

+

Returns the width of the element, including left and right padding, border, and optionally margin, in pixels. If called on an empty set of elements, returns undefined (null before jQuery 3.0).

This method is not applicable to window and document objects; for these, use .width() instead. Although .outerWidth() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.