in-content/common.css styles conflict with Storybook's input styles
Categories
(Toolkit :: UI Widgets, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox111 | --- | fixed |
People
(Reporter: hjones, Assigned: hjones)
References
(Blocks 1 open bug)
Details
(Whiteboard: [recomp])
Attachments
(4 files)
We've been loading in-content/common.css in the Storybook preview-head.html file to make it available to all our stories, but the styles from that file are conflicting with Storybook's own styles for various inputs. This impacts the usability of Storybook's controls.
One option for a fix is to create a custom element/shadow DOM wrapper around our stories and only load our in-content CSS there so it doesn't interfere with Storybook's global styles.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::XUL Widgets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•3 years ago
|
||
This fixes the style leakage/conflict issue @tgiles identified by using @mstriemer's WithCommonStyles component as a Storybook decorator.
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
When named-deck is used in the shadow DOM we need to add listeners, check for activeElement, and query for elements on the shadow root rather than document.
| Assignee | ||
Comment 4•3 years ago
|
||
Similar to named-deck listeners and activeElement checks needed to be updated to use getRootNode for cases where panel-list is used in the shadow DOM. parentElement also doesn't account for shadow roots, but swapping out shadowRoot.host seems to work the same. I also pulled in the changes from https://phabricator.services.mozilla.com/D166376.
Depends on D166700
| Assignee | ||
Comment 5•3 years ago
|
||
These addons either no longer work with our custom element wrapper, or never really worked:
- backgrounds - isn't super useful because it doesn't follow theme and now doesn't have any visible effect
- mesaure - this one breaks when you click on it, it seems to be looking for a specific root element
- outline - this stil works on the docs page but isn't really useful on the main story page anymore
Comment 7•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/628664fcb1a5
https://hg.mozilla.org/mozilla-central/rev/5eca10cd82c2
https://hg.mozilla.org/mozilla-central/rev/24528f1f21bd
https://hg.mozilla.org/mozilla-central/rev/12ca538c258c
Comment 9•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Updated•2 years ago
|
Description
•