From b7ed26c6cfdae23ca20ae2b550d3a232a3b5ac52 Mon Sep 17 00:00:00 2001 From: Tommmaso Menga Date: Tue, 3 Dec 2024 13:00:47 +0100 Subject: [PATCH] fix: pr feedbacks pt.3 --- src/elements/core/styles/core.scss | 7 +++++++ src/elements/teaser-hero/teaser-hero.scss | 7 ------- .../teaser-product/teaser-product/teaser-product.scss | 6 ------ src/elements/teaser/teaser.scss | 6 ------ 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/elements/core/styles/core.scss b/src/elements/core/styles/core.scss index af7d75c5b0..e649fa7f96 100644 --- a/src/elements/core/styles/core.scss +++ b/src/elements/core/styles/core.scss @@ -158,6 +158,13 @@ input[data-sbb-time-input] { // Apply the brightness effect on mouse hover // TODO: Move back to the teaser components when the global css refactoring happens :is(sbb-teaser, sbb-teaser-hero, sbb-teaser-product) { + --sbb-teaser-image-brightness-hover: var(--sbb-hover-image-brightness); + --sbb-teaser-image-animation-duration: var( + --sbb-disable-animation-zero-duration, + var(--sbb-animation-duration-4x) + ); + --sbb-teaser-image-animation-easing: var(--sbb-animation-easing); + & [slot='image']:is(sbb-image, img), & [slot='image'] :is(sbb-image, img) { will-change: filter; diff --git a/src/elements/teaser-hero/teaser-hero.scss b/src/elements/teaser-hero/teaser-hero.scss index 1f627c5045..182283b055 100644 --- a/src/elements/teaser-hero/teaser-hero.scss +++ b/src/elements/teaser-hero/teaser-hero.scss @@ -10,13 +10,6 @@ // which appears in normalize css of several frameworks. outline: none !important; - --sbb-teaser-image-brightness-hover: var(--sbb-hover-image-brightness); - --sbb-teaser-image-animation-duration: var( - --sbb-disable-animation-zero-duration, - var(--sbb-animation-duration-4x) - ); - --sbb-teaser-image-animation-easing: var(--sbb-animation-easing); - @include sbb.panel-variables; } diff --git a/src/elements/teaser-product/teaser-product/teaser-product.scss b/src/elements/teaser-product/teaser-product/teaser-product.scss index 680fd08905..b47cb2dde0 100644 --- a/src/elements/teaser-product/teaser-product/teaser-product.scss +++ b/src/elements/teaser-product/teaser-product/teaser-product.scss @@ -1,12 +1,6 @@ @use '../../core/styles' as sbb; :host { - --sbb-teaser-image-brightness-hover: var(--sbb-hover-image-brightness); - --sbb-teaser-image-animation-duration: var( - --sbb-disable-animation-zero-duration, - var(--sbb-animation-duration-4x) - ); - --sbb-teaser-image-animation-easing: var(--sbb-animation-easing); --sbb-teaser-product-border-radius: var(--sbb-border-radius-4x); // Simulate link color optically diff --git a/src/elements/teaser/teaser.scss b/src/elements/teaser/teaser.scss index 4001370ad4..c793df135d 100644 --- a/src/elements/teaser/teaser.scss +++ b/src/elements/teaser/teaser.scss @@ -17,12 +17,6 @@ --sbb-teaser-gap: var(--sbb-spacing-fixed-4x); --sbb-teaser-width: fit-content; --sbb-teaser-border-radius: var(--sbb-border-radius-4x); - --sbb-teaser-image-brightness-hover: var(--sbb-hover-image-brightness); - --sbb-teaser-image-animation-duration: var( - --sbb-disable-animation-zero-duration, - var(--sbb-animation-duration-4x) - ); - --sbb-teaser-image-animation-easing: var(--sbb-animation-easing); @include sbb.if-forced-colors { --sbb-teaser-description-color: LinkText;