insert managerHead styles after emotion styles #33423
Replies: 2 comments 27 replies
-
|
Storybook doesn't provide a built-in way to guarantee that managerHead styles are inserted after Emotion styles. This is because managerHead content is processed during the initial HTML generation, while Emotion injects its styles dynamically at runtime, usually after the static head content is in place (docs). If you need your styles to override Emotion, you can try a workaround: inject a script via managerHead that waits for Emotion's styles to appear, then moves your style tag after them using JavaScript (for example, with a MutationObserver). If you want a code snippet for this, let me know your Storybook version and I can help tailor it. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
-
|
@dosu, in manager.ts, i can change preview color, import { addons } from 'storybook/manager-api';
import { create } from 'storybook/theming';
const theme = create({
base: 'dark',
fontBase: "'Noto Sans Variable', sans-serif",
appPreviewBg: '#555555',
});
addons.setConfig({
theme,
});how can i change loader bg in iframe preview |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@dosu, managerHead <style>....</style> styles inserted before emotion styles, but i want my styles to
Beta Was this translation helpful? Give feedback.
All reactions