From dbe0a29755579789918c18f3cc580d27c08165c4 Mon Sep 17 00:00:00 2001 From: oscar marina Date: Tue, 13 Sep 2022 07:19:54 +0200 Subject: [PATCH] fix(blockquote-base-style-helpers): add control support nativeShadow --- .../src/setDocumentStyles.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/base/blockquote-base-style-helpers/src/setDocumentStyles.js b/packages/base/blockquote-base-style-helpers/src/setDocumentStyles.js index c5058f71..c485c997 100644 --- a/packages/base/blockquote-base-style-helpers/src/setDocumentStyles.js +++ b/packages/base/blockquote-base-style-helpers/src/setDocumentStyles.js @@ -2,12 +2,14 @@ import { supportsAdoptingStyleSheets /* adoptStyles */ } from 'lit'; import '@blockquote/polymer/lib/elements/custom-style.js'; export { supportsAdoptingStyleSheets /* adoptStyles */ } from 'lit'; + export const supportCustomStyleInterface = - window.ShadyCSS && /* c8 ignore next */ window.ShadyCSS.CustomStyleInterface; + /* c8 ignore next */ + window.ShadyCSS && window.ShadyCSS.CustomStyleInterface && !window.ShadyCSS.nativeShadow; -const renderDocumentRoot = supportsAdoptingStyleSheets - ? document - : /* c8 ignore next */ document.head; +const renderDocumentRoot = + /* c8 ignore next */ + supportsAdoptingStyleSheets ? document : document.head; export const documentAdoptStyles = (renderRoot, styles) => { if (supportsAdoptingStyleSheets) {