From 4c5e478474abe6c0842c41e9a9d3710f8f5a548e Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Fri, 20 Dec 2019 10:05:08 +1300 Subject: [PATCH] fix: get theme element working in storybook Fix an issue where the theme element was not updating in Storybook. Also, remove a visual test that is no longer used. --- packages/theme/src/theme.ts | 2 +- test/visual/stories.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/theme/src/theme.ts b/packages/theme/src/theme.ts index db99e48634..02fb56c963 100644 --- a/packages/theme/src/theme.ts +++ b/packages/theme/src/theme.ts @@ -182,7 +182,7 @@ export class Theme extends HTMLElement { } protected attributeChangedCallback(): void { - if (window.ShadyCSS !== undefined) { + if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) { window.ShadyCSS.styleElement(this); } else { this.adoptStyles(); diff --git a/test/visual/stories.js b/test/visual/stories.js index d303189a88..0cd0b5caa3 100644 --- a/test/visual/stories.js +++ b/test/visual/stories.js @@ -118,7 +118,6 @@ module.exports = [ 'theme--default', 'theme--none', 'theme--nested-theme', - 'theme--nested-color', 'toast--default', 'toast--negative', 'toast--positive',