Skip to content

Commit ae79d26

Browse files
Docs: help clarify 'fit' is option name, not value (#3410)
1 parent eacb833 commit ae79d26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/api-resize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ When both a `width` and `height` are provided, the possible methods by which the
1414

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

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

1919
* `sharp.position`: `top`, `right top`, `right`, `right bottom`, `bottom`, `left bottom`, `left`, `left top`.
2020
* `sharp.gravity`: `north`, `northeast`, `east`, `southeast`, `south`, `southwest`, `west`, `northwest`, `center` or `centre`.

lib/resize.js

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

0 commit comments

Comments
 (0)