@ibragim-dev-org/ui-forge-library 1.1.9 → 1.2.0

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.
@@ -340,17 +340,25 @@ class SkeletonDirective {
340
340
  this.renderer = renderer;
341
341
  effect(() => {
342
342
  if (this.$isLoading()) {
343
+ this.applyHostSkeletonStyles();
343
344
  this.applySkeletonRecursive(this.el.nativeElement, 0);
344
345
  }
345
346
  else {
346
347
  this.removeSkeletonRecursive(this.el.nativeElement);
348
+ this.removeHostSkeletonStyles();
347
349
  }
348
350
  });
349
351
  }
350
352
  ngAfterViewInit() {
353
+ this.injectKeyframes();
354
+ }
355
+ applyHostSkeletonStyles() {
351
356
  this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
352
357
  this.renderer.setStyle(this.el.nativeElement, 'overflow', 'hidden');
353
- this.injectKeyframes();
358
+ }
359
+ removeHostSkeletonStyles() {
360
+ this.renderer.removeStyle(this.el.nativeElement, 'position');
361
+ this.renderer.removeStyle(this.el.nativeElement, 'overflow');
354
362
  }
355
363
  injectKeyframes() {
356
364
  const styleSheet = document.styleSheets[0];