Skip to content

Commit

Permalink
Docs: help clarify 'fit' is option name, not value (#3410)
Browse files Browse the repository at this point in the history
  • Loading branch information
ginoemiliozzi authored Oct 17, 2022
1 parent eacb833 commit ae79d26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api-resize.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ When both a `width` and `height` are provided, the possible methods by which the

Some of these values are based on the [object-fit][1] CSS property.

When using a `fit` of `cover` or `contain`, the default **position** is `centre`. Other options are:
When using a **fit** of `cover` or `contain`, the default **position** is `centre`. Other options are:

* `sharp.position`: `top`, `right top`, `right`, `right bottom`, `bottom`, `left bottom`, `left`, `left top`.
* `sharp.gravity`: `north`, `northeast`, `east`, `southeast`, `south`, `southwest`, `west`, `northwest`, `center` or `centre`.
Expand Down
2 changes: 1 addition & 1 deletion lib/resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function isResizeExpected (options) {
*
* Some of these values are based on the [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.
*
* When using a `fit` of `cover` or `contain`, the default **position** is `centre`. Other options are:
* When using a **fit** of `cover` or `contain`, the default **position** is `centre`. Other options are:
* - `sharp.position`: `top`, `right top`, `right`, `right bottom`, `bottom`, `left bottom`, `left`, `left top`.
* - `sharp.gravity`: `north`, `northeast`, `east`, `southeast`, `south`, `southwest`, `west`, `northwest`, `center` or `centre`.
* - `sharp.strategy`: `cover` only, dynamically crop using either the `entropy` or `attention` strategy.
Expand Down

0 comments on commit ae79d26

Please sign in to comment.