storybook-addon-pseudo-states
storybook-addon-pseudo-states copied to clipboard
More sophisticated rule rewriting is needed
Exact error received:
withPseudoState.js:178 DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet':
Failed to parse the rule '.MuiButtonGroup-root > :focus, .pseudo-focus .MuiButtonGroup-root > { z-index: 2; }'
Input selector:
.MuiButtonGroup-root > :focus { ... }
Actual output selector:
.MuiButtonGroup-root > :focus, .pseudo-focus .MuiButtonGroup-root > { ... }
Expected output selector (proposed):
.MuiButtonGroup-root > :focus, .pseudo-focus .MuiButtonGroup-root > * { ... }
Possibly related to #9.
I thought I could work around it, by updating the input selector to:
.MuiButtonGroup-root > *:focus { ... }
Which I would imagine would work, but I can't confirm because the old selector is cached? I've tried clearing the Storybook cache and starting it with the --no-manager-cache flag, but no luck.
Is this addon doing something to cache the rewrites?