@profitlich/template-toolkit 2.12.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profitlich/template-toolkit",
3
- "version": "2.12.0",
3
+ "version": "2.13.1",
4
4
  "description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
5
5
  "type": "module",
6
6
  "exports": {
@@ -28,7 +28,9 @@ export class ImagesLoaded {
28
28
  if (img.complete && img.naturalHeight > 0) {
29
29
  this.#signalLoaded(img);
30
30
  } else {
31
- // Ansonsten auf das erfolgreiche Lade-Event warten
31
+ // Noch nicht geladenen Bildern Atrribut geben zum Ausblenden mit CSS
32
+ img.setAttribute(this.#attributeName, 'false');
33
+ // Auf das erfolgreiche Lade-Event warten
32
34
  img.addEventListener('load', () => this.#signalLoaded(img));
33
35
 
34
36
  // Fehlerbehandlung (optional)
@@ -1,5 +1,9 @@
1
1
  img {
2
- opacity: 0;
2
+ // Bilder ohne per JS zugewiesenem Attribut false sind sichtbar
3
+ &[data-loaded="false"] {
4
+ opacity: 0;
5
+ transition: opacity 0.3s cubic-bezier(0.76, 0, 0.24, 1);
6
+ }
3
7
 
4
8
  &[data-loaded="true"] {
5
9
  opacity: 1;