This does not work (fixed element.style seems to be "padding: 1 rem"):
<!-- .storybook/preview-body.html -->
<style>
body {
padding: 0;
background-color: #005cc5;
}
</style>
Any ideas?
try the layout: 'fullscreen'
story parameter
Same issue here, setting isFullscreen: true as per https://storybook.js.org/docs/react/configure/features-and-behavior doesn't fix it.
Must admit I haven't dug far but SB is adding style="margin: 0px; padding: 1rem; display: block; justify-content: initial; align-items: initial; min-height: initial;" to body for some reason.
@coconewty isFullscreen: true
isn't the same thing as layout: 'fullscreen'
. in .storybook/preview.js
:
export const parameters = { layout: 'fullscreen' }
Works great. Thank you.
Thanks @shilman I missed this.
FYI of anyone else hunting for this, it's here... https://storybook.js.org/docs/react/configure/story-layout
Thanks @shilman I missed this.
FYI of anyone else hunting for this, it's here... https://storybook.js.org/docs/react/configure/story-layout
Adding some google search keywords;
How to remove default canvas margin in Storybook v6
Most helpful comment
try the
layout: 'fullscreen'
story parameter