Skip to content

Commit 3d9df1c

Browse files
authored
docs: ✏️ added instructions for the ignoreCssString option (#153)
1 parent 7838861 commit 3d9df1c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/images/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In addition to the `{{picture src='' alt='' /}}` shortcode. This plugin adds the
6363

6464
Takes a relative path of the image and returns all the srcsets and data from the `ejs-image-manifest.json`.
6565

66-
### `helpers.images.picture(path, {maxWidth: 2000, class:'', alt: ''})`
66+
### `helpers.images.picture(path, {maxWidth: 2000, class:'', alt: '', ignoreCssString: false})`
6767

6868
Takes a `path` and `opts` object and outputs the `<picture>` tag similar to the shortcode.
6969

@@ -72,6 +72,9 @@ Takes a `path` and `opts` object and outputs the `<picture>` tag similar to the
7272
- `maxWidth` The largest responsive image to be included.
7373
- `class` a class added to the `<picture>`
7474
- `alt` alt tag added to the `<img>`.
75+
- `ignoreCssString` option to make the image ignore the default `cssString` styles.
76+
77+
If you need to use custom styles for a specific image instance but don't want to disable the default styles (`cssString`), you can set the `ignoreCssString` option to `true`. It will change the wrapper class `.ejs` to be `.custom-ejs` so that the default styles won't have an impact on this particular image instance.
7578

7679
### `helpers.images.largest(path, {maxWidth: 2000})`
7780

0 commit comments

Comments
 (0)