How to set <body> classes?
See original GitHub issueHello!
Is there way to set <body> (inside <iframe>) class(es)? (except using finddomnode)
Thank you
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to add a class to body tag? - jquery - Stack Overflow
This should do it: var newClass = window.location.href; newClass = newClass.substring(newClass.lastIndexOf('/')+1, 5); $('body').
Read more >body_class() | Function - WordPress Developer Resources
This function gives the body element different classes and can be added, typically, in the header.php's HTML body tag. ... The following example...
Read more >Adding to the Body Class in WordPress - Web Design TutsPlus
The body class in WordPress is a class or series of classes that are applied to the HTML body element. This is useful...
Read more >HTML body class Attribute - Dofactory
The class attribute assigns one or more classnames to the <body> tag. Classnames are defined in a stylesheet or in a local <style>...
Read more >Add a class to the Body element using JavaScript | bobbyhadz
Add a class to the Body element using JavaScript #. Use the classList.add() method to add a class to the body element, e.g....
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 Free
Top 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

Creating a file named preview-head.html in your config directory containing this seems to have worked out for me.
Check the documentation here : https://storybook.js.org/configurations/add-custom-head-tags/
you can add file config.js to .storybook dir with something likes this: