diff --git a/.vdiff.json b/.vdiff.json
index b69cb6b0767..21b5d65ee13 100644
--- a/.vdiff.json
+++ b/.vdiff.json
@@ -7,7 +7,7 @@
],
"system": {
"platform": "linux",
- "release": "6.14.0-1017-azure",
+ "release": "6.17.0-1008-azure",
"arch": "x64"
}
}
diff --git a/components/alert/alert.js b/components/alert/alert.js
index 6b396ab6a62..93094ba9663 100644
--- a/components/alert/alert.js
+++ b/components/alert/alert.js
@@ -52,8 +52,8 @@ class Alert extends LocalizeCoreElement(LitElement) {
:host {
animation: 600ms ease drop-in;
- background: white;
- border: 1px solid var(--d2l-color-mica);
+ background: var(--d2l-theme-background-color-base);
+ border: 1px solid var(--d2l-theme-border-color-standard);
border-inline-start-width: 0.3rem;
border-radius: 0.3rem;
box-sizing: border-box;
@@ -70,17 +70,17 @@ class Alert extends LocalizeCoreElement(LitElement) {
:host([type="critical"]),
:host([type="error"]) {
- border-inline-start-color: var(--d2l-color-feedback-error);
+ border-inline-start-color: var(--d2l-theme-status-color-error);
}
:host([type="warning"]) {
- border-inline-start-color: var(--d2l-color-feedback-warning);
+ border-inline-start-color: var(--d2l-theme-status-color-warning);
}
:host([type="default"]),
:host([type="call-to-action"]) {
- border-inline-start-color: var(--d2l-color-feedback-action);
+ border-inline-start-color: var(--d2l-theme-status-color-default);
}
:host([type="success"]) {
- border-inline-start-color: var(--d2l-color-feedback-success);
+ border-inline-start-color: var(--d2l-theme-status-color-success);
}
.d2l-alert-text {
diff --git a/components/alert/test/alert-toast.vdiff.js b/components/alert/test/alert-toast.vdiff.js
index 6206b5d3035..cf45d41ee11 100644
--- a/components/alert/test/alert-toast.vdiff.js
+++ b/components/alert/test/alert-toast.vdiff.js
@@ -45,10 +45,11 @@ describe('alert-toast', () => {
{ name: 'subtext-button-close', template: alertWithSubtextAndCloseButton },
{ name: 'subtext-no-close', template: html`Critical message.` },
{ name: 'long-button-text', template: html`A message.` },
- { name: 'long-button-text-subtext', template: html`A message.` }
- ].forEach(({ name, template }) => {
+ { name: 'long-button-text-subtext', template: html`A message.` },
+ { name: 'long-button-text-subtext-dark', colorMode: 'dark', template: html`A message.` }
+ ].forEach(({ name, colorMode, template }) => {
it(name, async() => {
- await fixture(template, { viewport: { width: 700, height: 200 } });
+ await fixture(template, { colorMode, viewport: { width: 700, height: 200 } });
await expect(document).to.be.golden();
});
});
diff --git a/components/alert/test/alert.vdiff.js b/components/alert/test/alert.vdiff.js
index 138ad6d00f3..cab7b3b1b6d 100644
--- a/components/alert/test/alert.vdiff.js
+++ b/components/alert/test/alert.vdiff.js
@@ -14,12 +14,19 @@ function createAlertWithCloseButton(opts) {
describe('alert', () => {
[ 'default', 'success', 'critical', 'warning', 'error', 'call-to-action'].forEach(type => {
+
+ const template = html`${`A${type === 'error' ? 'n' : ''} ${type === 'call-to-action' ? 'call to action.' : `${type} message.`}`}`;
+
it(`type-${type}`, async() => {
- const elem = await fixture(html`
- ${`A${type === 'error' ? 'n' : ''} ${type === 'call-to-action' ? 'call to action.' : `${type} message.`}`}
- `);
+ const elem = await fixture(template);
+ await expect(elem).to.be.golden();
+ });
+
+ it(`type-${type}-dark`, async() => {
+ const elem = await fixture(template, { colorMode: 'dark' });
await expect(elem).to.be.golden();
});
+
});
[
@@ -30,7 +37,7 @@ describe('alert', () => {
{ name: 'hidden', rtl: true, template: html`
A hidden message.
` },
{ name: 'no-padding', template: createAlertWithCloseButton({ noPadding: true }) },
{ name: 'no-padding-rtl', rtl: true, template: createAlertWithCloseButton({ noPadding: true }) }
- ].forEach(({ name, template, rtl }) => {
+ ].forEach(({ name, rtl, template }) => {
it(name, async() => {
const elem = await fixture(template, { rtl });
await expect(elem).to.be.golden();
diff --git a/components/alert/test/golden/alert-toast/chromium/long-button-text-subtext-dark.png b/components/alert/test/golden/alert-toast/chromium/long-button-text-subtext-dark.png
new file mode 100644
index 00000000000..c6dd9c3a92d
Binary files /dev/null and b/components/alert/test/golden/alert-toast/chromium/long-button-text-subtext-dark.png differ
diff --git a/components/alert/test/golden/alert/chromium/type-call-to-action-dark.png b/components/alert/test/golden/alert/chromium/type-call-to-action-dark.png
new file mode 100644
index 00000000000..a93c314e94a
Binary files /dev/null and b/components/alert/test/golden/alert/chromium/type-call-to-action-dark.png differ
diff --git a/components/alert/test/golden/alert/chromium/type-critical-dark.png b/components/alert/test/golden/alert/chromium/type-critical-dark.png
new file mode 100644
index 00000000000..e86f236f67c
Binary files /dev/null and b/components/alert/test/golden/alert/chromium/type-critical-dark.png differ
diff --git a/components/alert/test/golden/alert/chromium/type-default-dark.png b/components/alert/test/golden/alert/chromium/type-default-dark.png
new file mode 100644
index 00000000000..57c69e749ce
Binary files /dev/null and b/components/alert/test/golden/alert/chromium/type-default-dark.png differ
diff --git a/components/alert/test/golden/alert/chromium/type-error-dark.png b/components/alert/test/golden/alert/chromium/type-error-dark.png
new file mode 100644
index 00000000000..ab24e398330
Binary files /dev/null and b/components/alert/test/golden/alert/chromium/type-error-dark.png differ
diff --git a/components/alert/test/golden/alert/chromium/type-success-dark.png b/components/alert/test/golden/alert/chromium/type-success-dark.png
new file mode 100644
index 00000000000..e1a473fcd56
Binary files /dev/null and b/components/alert/test/golden/alert/chromium/type-success-dark.png differ
diff --git a/components/alert/test/golden/alert/chromium/type-warning-dark.png b/components/alert/test/golden/alert/chromium/type-warning-dark.png
new file mode 100644
index 00000000000..290cdae53f5
Binary files /dev/null and b/components/alert/test/golden/alert/chromium/type-warning-dark.png differ