From ae79d26ead038b2d354d50c46716c7f88fdb7c7c Mon Sep 17 00:00:00 2001 From: Gino Emiliozzi Date: Mon, 17 Oct 2022 16:26:59 +0200 Subject: [PATCH] Docs: help clarify 'fit' is option name, not value (#3410) --- docs/api-resize.md | 2 +- lib/resize.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-resize.md b/docs/api-resize.md index b2f61e6c..9178c97e 100644 --- a/docs/api-resize.md +++ b/docs/api-resize.md @@ -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`. diff --git a/lib/resize.js b/lib/resize.js index adc3324d..b7b208ad 100644 --- a/lib/resize.js +++ b/lib/resize.js @@ -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.