calebdwilliams / construct-style-sheets

Constructible style sheets/adopted style sheets polyfill
MIT License
142 stars 21 forks source link

Mutating CSSStyleDeclaration (via `.setProperty()` for example) does not update injected style #114

Open fsmorygo opened 2 years ago

fsmorygo commented 2 years ago

Describe the bug Mutating CSSStyleDeclaration (via .setProperty() for example) does not update injected style. When I change its value, only ConstructedStyleSheet is changed, but I don't see any changes in DOM

To Reproduce

  1. Create and add a Stylesheet with some rules to a Shadow DOM's adoptedStyleSheets
  2. Change some property with myRule.style.setPropety('width', '10px)3.
  3. Check the DOM and verify no changes have happened.

Expected behavior** Injected style will update as it would on Chrome with native constructed style sheets support

Desktop (please complete the following information):