From 92514b3019b43fb1318d1d2c8df6fe702e9500ed Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 9 Oct 2018 12:52:44 -0500 Subject: [PATCH] fix(card-header): get color property working references #14723 references #14853 --- .../components/card-header/card-header.scss | 13 ++++ .../components/card-header/test/basic/e2e.ts | 10 +++ .../card-header/test/basic/index.html | 71 +++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 core/src/components/card-header/test/basic/e2e.ts create mode 100644 core/src/components/card-header/test/basic/index.html diff --git a/core/src/components/card-header/card-header.scss b/core/src/components/card-header/card-header.scss index c6e7a21ee5..963f4620ae 100644 --- a/core/src/components/card-header/card-header.scss +++ b/core/src/components/card-header/card-header.scss @@ -6,4 +6,17 @@ :host { display: block; position: relative; + + background: var(--background); + color: var(--color); } + +:host(.ion-color) { + background: current-color(base); + color: current-color(contrast); +} + +:host(.ion-color) ::slotted(ion-card-title), +:host(.ion-color) ::slotted(ion-card-subtitle) { + color: currentColor; +} \ No newline at end of file diff --git a/core/src/components/card-header/test/basic/e2e.ts b/core/src/components/card-header/test/basic/e2e.ts new file mode 100644 index 0000000000..c1b836fdb9 --- /dev/null +++ b/core/src/components/card-header/test/basic/e2e.ts @@ -0,0 +1,10 @@ +import { newE2EPage } from '@stencil/core/testing'; + +it('card-header: basic', async () => { + const page = await newE2EPage({ + url: '/src/components/card-header/test/basic?ionic:animated=false' + }); + + const compare = await page.compareScreenshot(); + expect(compare).toMatchScreenshot(); +}); diff --git a/core/src/components/card-header/test/basic/index.html b/core/src/components/card-header/test/basic/index.html new file mode 100644 index 0000000000..15d8a58758 --- /dev/null +++ b/core/src/components/card-header/test/basic/index.html @@ -0,0 +1,71 @@ + + + + + + Card Header - Basic + + + + + + + + + + + Card Header - Basic + + + + + + Card Subtitle + Card Title + Custom Subtitle + Custom Title + Color Subtitle + Color Title + + + + + Card Subtitle + Card Title + + + This is Card Content + + + + + + Card Subtitle + Card Title + + + This is Card Content + + + + + + + + + +