Skip to content

Commit 74dc4c2

Browse files
themacguffinmantdumitrescu
authored andcommitted
use specific "background-color" rule instead of "background" combo-rule to prevent CSS rule expansion in adoptedStylesheets
1 parent 3b2ac99 commit 74dc4c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/browser/component.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,15 @@ describe(`Simple Component instance`, function () {
321321

322322
context(`when applying override styles`, function () {
323323
it(`appends the overriding styles to the default styles`, async function () {
324-
el.setAttribute(`style-override`, `:host { background: red; }`);
324+
el.setAttribute(`style-override`, `:host { background-color: red; }`);
325325
await nextAnimationFrame();
326-
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background: red; }`);
326+
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background-color: red; }`);
327327
});
328328

329329
it(`it applies the styles even if the component isn't attached to the DOM`, function () {
330330
el = document.createElement(`shadow-dom-app`);
331-
el.setAttribute(`style-override`, `:host { background: red; }`);
332-
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background: red; }`);
331+
el.setAttribute(`style-override`, `:host { background-color: red; }`);
332+
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background-color: red; }`);
333333
});
334334
});
335335
});

0 commit comments

Comments
 (0)