Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
doc(#508): new CSS variable use to display smoothly the images
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Nov 29, 2019
1 parent 0b0a4d7 commit c817666
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ The following theming options will affect this component if set on its host or p
| --deckgo-lazy-img-display | | The display property of the image |
| --deckgo-lazy-img-border-radius | | In case you would like to specify a border radius for the image |
| --deckgo-lazy-img-object-fit | | The property object-fit of the image |
| --deckgo-lazy-img-opacity-not-loaded | 0 | The opacity of the image when not loaded |
| --deckgo-lazy-img-opacity-loaded | 1 | The opacity of the image when loaded |
| --deckgo-lazy-img-transition | opacity 0.15s linear | The animation of the image, notably use to display smoothly the image when loaded |

### Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,21 @@ export class AppComponentsLazyImg {
<td></td>
<td>The property object-fit of the image</td>
</tr>
<tr>
<td>--deckgo-lazy-img-opacity-not-loaded</td>
<td>0</td>
<td>The opacity of the image when not loaded</td>
</tr>
<tr>
<td>--deckgo-lazy-img-opacity-loaded</td>
<td>1</td>
<td>The opacity of the image when loaded</td>
</tr>
<tr>
<td>--deckgo-lazy-img-transition</td>
<td>opacity 0.15s linear</td>
<td>The animation of the image, notably use to display smoothly the image when loaded</td>
</tr>
</tbody></table>
<h3 id="app-components-lazy-img-methods">Methods</h3>
<p>This component also export an async method <code>lazyLoad()</code> in case you would like to trigger &quot;manually&quot; the loading of the image.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ img, svg {

opacity: var(--deckgo-lazy-img-opacity-not-loaded, 0);

transition: var(--deckgo-lazy-img-transition, opacity 0.2s linear);
transition: var(--deckgo-lazy-img-transition, opacity 0.15s linear);
}

0 comments on commit c817666

Please sign in to comment.