Closed a-gagnon closed 1 year ago
You need to copy the adoptedStyleSheets
from the source document to the new document.
Here's a fixed sandbox: https://codesandbox.io/s/itwinui-react-upgrade-and-popout-forked-wn5lfy?file=/src/copyStyles.ts:296-331
Is there a way to enable the ToggleSwitch
contour to be available inside the child window as well ?
https://codesandbox.io/s/itwinui-react-upgrade-and-popout-forked-5z6mpz?file=/src/App.tsx
@raplemie This looks like a different problem specific to ToggleSwitch. Could you open a new issue for tracking it? I may have an idea what's going wrong.
Describe the bug (actual behavior)
Using the popout functionality from appui, I noticed we're now getting errors about the CSS:
After some digging, it is caused by the ButtonGroup component that we use. Most likely, this is a theming issue and is not tied to this specific component.
Expected behavior
CSS styles should be applied properly in popout window without any error.
Reproduction
I created a sandbox using itwinui-react ^2.11.2. CSS style in popout is not applied. By downgrading to itwinui-react 2.7.0, everything works as intended. https://codesandbox.io/s/itwinui-react-upgrade-and-popout-wxt6gm
Steps to reproduce
Additional information