diff --git a/__snapshots__/Card.md b/__snapshots__/Card.md index de8e50482..7e962ac9c 100644 --- a/__snapshots__/Card.md +++ b/__snapshots__/Card.md @@ -12,8 +12,8 @@
-
-
+
+
@@ -22,10 +22,10 @@
-
+
- +
diff --git a/components/card/src/vwc-card.scss b/components/card/src/vwc-card.scss index afe7a6c32..84a40acad 100644 --- a/components/card/src/vwc-card.scss +++ b/components/card/src/vwc-card.scss @@ -21,19 +21,20 @@ padding: 1.5rem; } - &-header { + &-wrapper { display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 0.5rem; - + width: 100%; + column-gap: 0.5rem; :host([text]) & { margin-bottom: 12px; } + } - &-content { - display: inline-flex; - } + &-header { + display: inline-flex; + align-items: flex-start; + justify-content: space-between; + column-gap: 0.5rem; } &-title, @@ -80,7 +81,7 @@ .icon { flex-shrink: 0; align-self: baseline; - margin: 4px 10px 0 0; + margin: 4px 2px 0 0; } .icon { @@ -93,6 +94,7 @@ align-self: flex-start; margin-block-start: -0.5rem; margin-inline-end: -0.5rem; + margin-inline-start: auto; } .no-content { diff --git a/components/card/src/vwc-card.ts b/components/card/src/vwc-card.ts index 037bd9584..311cdc925 100644 --- a/components/card/src/vwc-card.ts +++ b/components/card/src/vwc-card.ts @@ -90,7 +90,10 @@ export class VWCCard extends LitElement {
- ${this.renderHeader()} +
+ ${this.renderHeader()} + +
${this.text ? this.text : nothing}
@@ -108,16 +111,13 @@ export class VWCCard extends LitElement { private renderHeader() { return html`
-
- - ${this.icon ? this.renderIcon() : ''} - -
-
${this.heading}
-
${this.subtitle}
-
+ + ${this.icon ? this.renderIcon() : ''} + +
+
${this.heading}
+
${this.subtitle}
-
`; } diff --git a/ui-tests/snapshots/vwc-card.png b/ui-tests/snapshots/vwc-card.png index c7cf7d75d..e6f10d118 100644 Binary files a/ui-tests/snapshots/vwc-card.png and b/ui-tests/snapshots/vwc-card.png differ diff --git a/ui-tests/tests/vwc-card/index.js b/ui-tests/tests/vwc-card/index.js index 1d7e4f52a..a1596ff81 100644 --- a/ui-tests/tests/vwc-card/index.js +++ b/ui-tests/tests/vwc-card/index.js @@ -100,6 +100,10 @@ export async function createElementVariations(wrapper) {
I'm the card content that overrides the content from attributes. I have no text styles or any styles for that matter :) You can do whatever you want here
+ + + + `; wrapper.appendChild(elementWrapper); }