From c0103995b7692553154e7f7ab7f8bc4539a6f5dc Mon Sep 17 00:00:00 2001 From: Mario Castigliano Date: Wed, 14 Aug 2024 17:58:57 +0200 Subject: [PATCH] fix: address review --- src/elements/container/container/container.scss | 5 +++-- src/elements/container/container/container.ts | 15 ++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/elements/container/container/container.scss b/src/elements/container/container/container.scss index d7f74df89dd..2ada0e76022 100644 --- a/src/elements/container/container/container.scss +++ b/src/elements/container/container/container.scss @@ -4,8 +4,6 @@ @include sbb.box-sizing; :host { - --sbb-image-object-position: bottom; - display: block; } @@ -51,6 +49,9 @@ } ::slotted([slot='image']) { + --sbb-image-border-radius: 0; + --sbb-image-object-position: end; + position: absolute; inset: 0; z-index: -1; diff --git a/src/elements/container/container/container.ts b/src/elements/container/container/container.ts index e95aa5b1cbd..ee268e4a9c1 100644 --- a/src/elements/container/container/container.ts +++ b/src/elements/container/container/container.ts @@ -8,8 +8,6 @@ import { import { customElement, property } from 'lit/decorators.js'; import { slotState } from '../../core/decorators.js'; -import { SbbHydrationMixin } from '../../core/mixins.js'; -import type { SbbImageElement } from '../../image.js'; import style from './container.scss?lit&inline'; @@ -22,7 +20,7 @@ import style from './container.scss?lit&inline'; */ @customElement('sbb-container') @slotState() -export class SbbContainerElement extends SbbHydrationMixin(LitElement) { +export class SbbContainerElement extends LitElement { public static override styles: CSSResultGroup = style; /** Whether the container is expanded. */ @@ -43,19 +41,10 @@ export class SbbContainerElement extends SbbHydrationMixin(LitElement) { } } - private _imageSlotChanged(): void { - const image: SbbImageElement = this.querySelector('sbb-image[slot="image"]') as SbbImageElement; - if (!image) { - return; - } - - image.borderRadius = 'none'; - } - protected override render(): TemplateResult { return html`
- this._imageSlotChanged()}> +