Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Storybook): fixes white flashes between loading #414

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/apps/lightning-ui-docs/.storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@
SPDX-License-Identifier: Apache-2.0
-->

<!-- use for style elements in Storybook's UI -->
<style>
/* overrides Storybook style to allow controls to scroll completely */
#panel-tab-content > div:first-child {
position: relative !important;
}

/* temporary solution for background issue not being recognized by appContentBG */
#storybook-preview-iframe {
background-color: transparent !important;
}

.grid-overlay-panel-wrapper,
.component-styles-panel-wrapper,
.theme-panel-wrapper {
Expand Down Expand Up @@ -67,9 +73,4 @@
border: 1px solid rgb(74, 74, 74);
padding: 10px 20px;
}

/* temporary solution for background issue not being recognized by appContentBG */
#storybook-preview-iframe {
background-color: transparent !important;
}
</style>
22 changes: 20 additions & 2 deletions packages/apps/lightning-ui-docs/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,26 @@
SPDX-License-Identifier: Apache-2.0
-->

<!-- use to style elements in Storybook Docs -->
<style>
.sbdocs.sbdocs-li {
color: white !important;
/* transition background Docs to Story */
/* transition background from Story to Doc */
.sb-preparing-docs,
.sb-preparing-story {
background-color: #1b1c1d;
}
/* NOTE: this class is set to background and not background-color */
.sb-previewBlock {
background: #1b1c1d;
}

/* hides the args table that shows briefly during transition from Story to Docs */
.sb-argstableBlock {
display: none;
}

/* loading icons only seen during load/transition from Story to Docs */
.sb-previewBlock_icon {
background-color: #1b1c1d;
}
</style>