Add ability to specify a class for the preview iframe <html>
See original GitHub issuePlease add the ability to specify a class (dark
for example) that gets added to the <html>
of the preview iframe. This is similar to what https://github.com/tonai/storybook-addon-themes does.
Setting a class on the <html>
is enough for me to add CSS that changes the CSS variables so my web components are also in dark mode.
See https://github.com/tonai/storybook-addon-themes/blob/master/src/manager/ThemeStory.tsx#L17 for the code that does this.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (7 by maintainers)
Top Results From Across the Web
HTML iframe tag
The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document.
Read more >Building HTML, CSS, and JS code preview using iframe's ...
This proves the feasibility to build code previews using iframes. You can stop here and experiment with the idea yourself, or you might...
Read more >The ultimate guide to iframes
Developers mainly use the iframe tag to embed another HTML document within the ... I needed to list them to let him preview...
Read more >How to apply CSS to iframe? - html
Edit: This does not work cross domain unless the appropriate CORS header is set. There are two different things here: the style of...
Read more >How to Inject Custom HTML and CSS into an iFrame - YouTube
Ever been to a site like JSBin, where you can write HTML, CSS, and JavaScript, and then see the results in a panel...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe try clearing localStorage for your storybook
Odd. If you make a PR I’ll merge and release promptly! don’t have the time right now to look at this