From 74dc4c21b3e1729ae5c38298d0fac64c23e58cc2 Mon Sep 17 00:00:00 2001 From: Joshua Thong Date: Thu, 16 Jun 2022 21:01:31 -0700 Subject: [PATCH] use specific "background-color" rule instead of "background" combo-rule to prevent CSS rule expansion in adoptedStylesheets --- test/browser/component.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/browser/component.js b/test/browser/component.js index 09d7d9d0..b3b26476 100644 --- a/test/browser/component.js +++ b/test/browser/component.js @@ -321,15 +321,15 @@ describe(`Simple Component instance`, function () { context(`when applying override styles`, function () { it(`appends the overriding styles to the default styles`, async function () { - el.setAttribute(`style-override`, `:host { background: red; }`); + el.setAttribute(`style-override`, `:host { background-color: red; }`); await nextAnimationFrame(); - expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background: red; }`); + expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background-color: red; }`); }); it(`it applies the styles even if the component isn't attached to the DOM`, function () { el = document.createElement(`shadow-dom-app`); - el.setAttribute(`style-override`, `:host { background: red; }`); - expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background: red; }`); + el.setAttribute(`style-override`, `:host { background-color: red; }`); + expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background-color: red; }`); }); }); });