iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
8 stars 2 forks source link

Correctly copy styles of complex shorthand properties #940

Closed GerardasB closed 1 month ago

GerardasB commented 1 month ago

Changes

This PR fixes #893 by refactoring copyStyles to avoid using cssText property when copying document.styleSheets.

Additionally, a visual element is added to the test-app widget that is styled using various property variations with both styleSheets and adoptedStyleSheets.

Seems like cssText is serialized as expected when used from within a contructable style sheet.

Testing

Added a visual test.