From c84c2a3be8d8d6b0bce9e5eab6694bd0a91b16da Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 6 Jun 2024 08:51:27 +0200 Subject: [PATCH] Mitigate white flasheq --- .storybook/preview-head.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html index d5903b6..485c66e 100644 --- a/.storybook/preview-head.html +++ b/.storybook/preview-head.html @@ -3,7 +3,23 @@ padding: 0; } - body:not(.kcBodyClass) { - background-color: #393939; + /* Following styles are just meant to avoid white flash when switching from one story to another */ + @keyframes fadeToTransparent { + from { + background-color: #393939; + } + + to { + background-color: transparent; + } + } + html { + animation: fadeToTransparent 500ms forwards ease-in; + } + body>.sb-preparing-docs { + visibility: hidden; + } + body>.sb-preparing-story { + visibility: hidden; } \ No newline at end of file