diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index d335bb5b99..9dbc0fd965 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -11,7 +11,7 @@ */ import '../utils/boot.js'; -import { rootPath, strictTemplatePolicy, allowTemplateFromDomModule, legacyOptimizations, legacyWarnings, syncInitialRender, supportsAdoptingStyleSheets, shareBuiltCSSWithAdoptedStyleSheets } from '../utils/settings.js'; +import { rootPath, strictTemplatePolicy, allowTemplateFromDomModule, legacyOptimizations, legacyWarnings, syncInitialRender, supportsAdoptingStyleSheets, useAdoptedStyleSheetsWithBuiltCSS } from '../utils/settings.js'; import { dedupingMixin } from '../utils/mixin.js'; import { stylesFromTemplate, stylesFromModuleImports } from '../utils/style-gather.js'; import { pathFromUrl, resolveCss, resolveUrl } from '../utils/resolve-url.js'; @@ -304,7 +304,7 @@ export const ElementMixin = dedupingMixin(base => { // potentially not shareable and sharing the ones that could be shared // would require some coordination. To keep it simple, all the includes // and styles are collapsed into a single shareable stylesheet. - if (shareBuiltCSSWithAdoptedStyleSheets && builtCSS && + if (useAdoptedStyleSheetsWithBuiltCSS && builtCSS && supportsAdoptingStyleSheets) { // Remove styles in template and make a shareable stylesheet const styles = template.content.querySelectorAll('style'); diff --git a/lib/utils/settings.js b/lib/utils/settings.js index 0e4bd486bf..ee70d3c14b 100644 --- a/lib/utils/settings.js +++ b/lib/utils/settings.js @@ -345,15 +345,15 @@ export const setLegacyNoObservedAttributes = function(noObservedAttributes) { * between component instances' shadow roots, if the app uses built Shady CSS * styles. */ -export let shareBuiltCSSWithAdoptedStyleSheets = - window.Polymer && window.Polymer.shareBuiltCSSWithAdoptedStyleSheets || false; +export let useAdoptedStyleSheetsWithBuiltCSS = + window.Polymer && window.Polymer.useAdoptedStyleSheetsWithBuiltCSS || false; /** - * Sets `shareBuiltCSSWithAdoptedStyleSheets` globally. + * Sets `useAdoptedStyleSheetsWithBuiltCSS` globally. * - * @param {boolean} value enable or disable `shareBuiltCSSWithAdoptedStyleSheets` + * @param {boolean} value enable or disable `useAdoptedStyleSheetsWithBuiltCSS` * @return {void} */ -export const setShareBuiltCSSWithAdoptedStyleSheets = function(value) { - shareBuiltCSSWithAdoptedStyleSheets = value; +export const setUseAdoptedStyleSheetsWithBuiltCSS = function(value) { + useAdoptedStyleSheetsWithBuiltCSS = value; }; diff --git a/test/unit/styling-build-adopted-stylesheets.html b/test/unit/styling-build-adopted-stylesheets.html index 3e511d9447..ae11d5c336 100644 --- a/test/unit/styling-build-adopted-stylesheets.html +++ b/test/unit/styling-build-adopted-stylesheets.html @@ -19,10 +19,10 @@