diff --git a/docs/_includes/popper-documentation.md b/docs/_includes/popper-documentation.md index 9415d892ba..b957da131b 100644 --- a/docs/_includes/popper-documentation.md +++ b/docs/_includes/popper-documentation.md @@ -9,8 +9,8 @@
dataObject
-

The dataObject is an object containing all the informations used by Popper.js -this object get passed to modifiers and to the onCreate and onUpdate callbacks.

+

The dataObject is an object containing all the information used by Popper.js. +This object is passed to modifiers and to the onCreate and onUpdate callbacks.

referenceObject

The referenceObject is an object that provides an interface compatible with Popper.js @@ -18,7 +18,7 @@ and lets you use it as replacement of a real DOM node.
You can use this method to position a popper relatively to a set of coordinates in case you don't have a DOM node to use as reference.

new Popper(referenceObject, popperNode);
-

NB: This feature isn't supported in Internet Explorer 10

+

NB: This feature isn't supported in Internet Explorer 10.

@@ -78,23 +78,23 @@ make sure they are performant enough to avoid performance bottlenecks.

### new Popper(reference, popper, options) -Create a new Popper.js instance +Creates a new Popper.js instance. **Returns**: Object - instance - The generated Popper.js instance | Param | Type | Description | | --- | --- | --- | | reference | HTMLElement \| [referenceObject](#referenceObject) | The reference element used to position the popper | -| popper | HTMLElement | The HTML element used as popper. | +| popper | HTMLElement | The HTML element used as the popper | | options | Object | Your custom options to override the ones defined in [Defaults](#defaults) | ### Popper.Defaults : Object Default options provided to Popper.js constructor.
-These can be overriden using the `options` argument of Popper.js.
-To override an option, simply pass as 3rd argument an object with the same -structure of this object, example: +These can be overridden using the `options` argument of Popper.js.
+To override an option, simply pass an object with the same +structure of the `options` object, as the 3rd argument. For example: ``` new Popper(ref, pop, { modifiers: { @@ -116,7 +116,7 @@ new Popper(ref, pop, { #### Defaults.placement -Popper's placement +Popper's placement. **Kind**: static property of [Defaults](#Popper.Defaults) **Properties** @@ -128,7 +128,7 @@ Popper's placement #### Defaults.eventsEnabled -Whether events (resize, scroll) are initially enabled +Whether events (resize, scroll) are initially enabled. **Kind**: static property of [Defaults](#Popper.Defaults) **Properties** @@ -154,7 +154,7 @@ you call the `destroy` method. #### Defaults.modifiers List of modifiers used to modify the offsets before they are applied to the popper. -They provide most of the functionalities of Popper.js +They provide most of the functionalities of Popper.js. **Kind**: static property of [Defaults](#Popper.Defaults) **Properties** @@ -167,7 +167,7 @@ They provide most of the functionalities of Popper.js #### Defaults.onCreate() Callback called when the popper is created.
-By default, is set to no-op.
+By default, it is set to no-op.
Access Popper.js instance with `data.instance`. **Kind**: static method of [Defaults](#Popper.Defaults) @@ -180,10 +180,10 @@ Access Popper.js instance with `data.instance`. #### Defaults.onUpdate() -Callback called when the popper is updated, this callback is not called +Callback called when the popper is updated. This callback is not called on the initialization/creation of the popper, but only on subsequent updates.
-By default, is set to no-op.
+By default, it is set to no-op.
Access Popper.js instance with `data.instance`. **Kind**: static method of [Defaults](#Popper.Defaults) @@ -232,7 +232,7 @@ Prefer `scheduleUpdate` over `update` because of performance reasons. ### Popper.destroy() -Destroy the popper +Destroys the popper. **Kind**: static method of [Popper](#Popper) @@ -246,21 +246,21 @@ position of the popper element when they are triggered. ### Popper.disableEventListeners() It will remove resize/scroll events and won't recalculate popper position -when they are triggered. It also won't trigger onUpdate callback anymore, +when they are triggered. It also won't trigger `onUpdate` callback anymore, unless you call `update` method manually. **Kind**: static method of [Popper](#Popper) ### Popper.scheduleUpdate() -Schedule an update, it will run on the next UI update available +Schedules an update. It will run on the next UI update available. **Kind**: static method of [Popper](#Popper) ## dataObject -The `dataObject` is an object containing all the informations used by Popper.js -this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks. +The `dataObject` is an object containing all the information used by Popper.js. +This object gets passed to modifiers and to the `onCreate` and `onUpdate` callbacks. **Kind**: global variable **Properties** @@ -271,12 +271,12 @@ this object get passed to modifiers and to the `onCreate` and `onUpdate` callbac | data.placement | String | Placement applied to popper | | data.originalPlacement | String | Placement originally defined on init | | data.flipped | Boolean | True if popper has been flipped by flip modifier | -| data.hide | Boolean | True if the reference element is out of boundaries, useful to know when to hide the popper. | +| data.hide | Boolean | True if the reference element is out of boundaries, useful to know when to hide the popper | | data.arrowElement | HTMLElement | Node used as arrow by arrow modifier | -| data.styles | Object | Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`) | -| data.arrowStyles | Object | Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`) | +| data.styles | Object | Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) | +| data.arrowStyles | Object | Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) | | data.boundaries | Object | Offsets of the popper boundaries | -| data.offsets | Object | The measurements of popper, reference and arrow elements. | +| data.offsets | Object | The measurements of popper, reference and arrow elements | | data.offsets.popper | Object | `top`, `left`, `width`, `height` values | | data.offsets.reference | Object | `top`, `left`, `width`, `height` values | | data.offsets.arrow | Object | `top` and `left` offsets, only one of them will be different from 0 | @@ -293,7 +293,7 @@ in case you don't have a DOM node to use as reference. new Popper(referenceObject, popperNode); ``` -NB: This feature isn't supported in Internet Explorer 10 +NB: This feature isn't supported in Internet Explorer 10. **Kind**: global variable **Properties** @@ -422,7 +422,7 @@ It can be one either `-end` or `-start`. The `offset` modifier can shift your popper on both its axis. It accepts the following units: -- `px` or unitless, interpreted as pixels +- `px` or unit-less, interpreted as pixels - `%` or `%r`, percentage relative to the length of the reference element - `%p`, percentage relative to the length of the popper element - `vw`, CSS viewport width unit @@ -430,7 +430,7 @@ It accepts the following units: For length is intended the main axis relative to the placement of the popper.
This means that if the placement is `top` or `bottom`, the length will be the -`width`. In case of `left` or `right`, it will be the height. +`width`. In case of `left` or `right`, it will be the `height`. You can provide a single value (as `Number` or `String`), or a pair of values as `String` divided by a comma or one (or more) white spaces.
@@ -451,7 +451,7 @@ Valid examples are: ``` > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap > with their reference element, unfortunately, you will have to disable the `flip` modifier. -> More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373) +> You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373) **Kind**: inner property of [modifiers](#modifiers) @@ -506,7 +506,7 @@ Valid examples are: ### modifiers~preventOverflow Modifier used to prevent the popper from being positioned outside the boundary. -An scenario exists where the reference itself is not within the boundaries.
+A scenario exists where the reference itself is not within the boundaries.
We can say it has "escaped the boundaries" — or just "escaped".
In this case we need to decide whether the popper should either: @@ -575,25 +575,25 @@ the boundaries in order to remain attached to the edge of the reference. | Name | Type | Default | Description | | --- | --- | --- | --- | -| padding | number | 5 | Amount of pixel used to define a minimum distance between the boundaries and the popper this makes sure the popper has always a little padding between the edges of its container | +| padding | number | 5 | Amount of pixel used to define a minimum distance between the boundaries and the popper. This makes sure the popper always has a little padding between the edges of its container | #### preventOverflow.boundariesElement -**Kind**: static property of [preventOverflow](#modifiers..preventOverflow) +**Kind**: static property of [preventOverflow](#modifiers..preventOverflow) **Properties** | Name | Type | Default | Description | | --- | --- | --- | --- | -| boundariesElement | String \| HTMLElement | 'scrollParent' | Boundaries used by the modifier, can be `scrollParent`, `window`, `viewport` or any DOM element. | +| boundariesElement | String \| HTMLElement | 'scrollParent' | Boundaries used by the modifier. Can be `scrollParent`, `window`, `viewport` or any DOM element. | ### modifiers~keepTogether -Modifier used to make sure the reference and its popper stay near eachothers -without leaving any gap between the two. Expecially useful when the arrow is -enabled and you want to assure it to point to its reference element. -It cares only about the first axis, you can still have poppers with margin +Modifier used to make sure the reference and its popper stay near each other +without leaving any gap between the two. Especially useful when the arrow is +enabled and you want to ensure that it points to its reference element. +It cares only about the first axis. You can still have poppers with margin between the popper and its reference element. **Kind**: inner property of [modifiers](#modifiers) @@ -639,7 +639,7 @@ between the popper and its reference element. This modifier is used to move the `arrowElement` of the popper to make sure it is positioned between the reference element and its popper element. It will read the outer size of the `arrowElement` node to detect how many -pixels of conjuction are needed. +pixels of conjunction are needed. It has no effect if no `arrowElement` is provided. @@ -750,7 +750,7 @@ restart it if it detects the need to flip the placement. | Name | Type | Default | Description | | --- | --- | --- | --- | -| behavior | String \| Array | 'flip' | The behavior used to change the popper's placement. It can be one of `flip`, `clockwise`, `counterclockwise` or an array with a list of valid placements (with optional variations). | +| behavior | String \| Array | 'flip' | The behavior used to change the popper's placement. It can be one of `flip`, `clockwise`, `counterclockwise` or an array with a list of valid placements (with optional variations) | @@ -770,7 +770,7 @@ restart it if it detects the need to flip the placement. | Name | Type | Default | Description | | --- | --- | --- | --- | -| boundariesElement | String \| HTMLElement | 'viewport' | The element which will define the boundaries of the popper position, the popper will never be placed outside of the defined boundaries (except if keepTogether is enabled) | +| boundariesElement | String \| HTMLElement | 'viewport' | The element which will define the boundaries of the popper position. The popper will never be placed outside of the defined boundaries (except if `keepTogether` is enabled) | @@ -826,7 +826,7 @@ out of boundaries. Requires the `preventOverflow` modifier before it in order to work. -**Kind**: inner property of [modifiers](#modifiers) +**Kind**: inner property of [modifiers](#modifiers) * [~hide](#modifiers..hide) * [.order](#modifiers..hide.order) @@ -925,7 +925,7 @@ to change in future major versions of the library. | Name | Type | Default | Description | | --- | --- | --- | --- | -| gpuAcceleration | Boolean | true | If true, it uses the CSS 3d transformation to position the popper. Otherwise, it will use the `top` and `left` properties. | +| gpuAcceleration | Boolean | true | If true, it uses the CSS 3D transformation to position the popper. Otherwise, it will use the `top` and `left` properties | @@ -959,7 +959,7 @@ want to delegate all the DOM manipulations to it. Note that if you disable this modifier, you must make sure the popper element has its position set to `absolute` before Popper.js can do its work! -Just disable this modifier and define you own to achieve the desired effect. +Just disable this modifier and define your own to achieve the desired effect. **Kind**: inner property of [modifiers](#modifiers) @@ -1020,7 +1020,7 @@ Just disable this modifier and define you own to achieve the desired effect. | Name | Type | Default | Description | | --- | --- | --- | --- | -| gpuAcceleration | Boolean | true | If true, it uses the CSS 3d transformation to position the popper. Otherwise, it will use the `top` and `left` properties. | +| gpuAcceleration | Boolean | true | If true, it uses the CSS 3D transformation to position the popper. Otherwise, it will use the `top` and `left` properties |