Skip to content

Commit 0f7ee8f

Browse files
committed
[Bug] Fixing flash of unstyled dashboard content (#25559)
Fixes #25375
1 parent 3dfc23d commit 0f7ee8f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/core_plugins/kibana/public/dashboard/_hacks.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ dashboard-listing {
2424
// Yes, this is a hack because bootstrap will be removed and everything must move to EUI theming
2525
// Can't reliably remove all/any of these because of embeddables
2626

27-
.tab-dashboard.theme-dark {
28-
@import './../../../../../node_modules/@elastic/eui/src/themes/k6/k6_colors_dark';
27+
.theme-dark {
28+
@import '@elastic/eui/src/themes/k6/k6_colors_dark';
2929

3030
// /src/ui/public/styles/bootstrap/scaffolding.less
3131
a {

src/core_plugins/kibana/public/dashboard/_index.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
/**
1717
* 1. Don't duplicate styles in dark mode
1818
*/
19-
.tab-dashboard.theme-light { /* 1 */
19+
.theme-light { /* 1 */
2020
@import 'dashboard_app';
2121
@import 'grid/index';
2222
@import 'panel/index';
2323
@import 'viewport/index';
2424
}
2525

26-
// Imports outside of .tab-dashboard selector don't change between light/dark modes
26+
// Imports outside of theme selector don't change between light/dark modes
2727
@import 'components/index';
2828

2929
// Must be outside of theme selector because it lives in a portal
@@ -33,14 +33,16 @@
3333
// EUI global scope -- dark
3434
@import '@elastic/eui/src/themes/k6/k6_colors_dark';
3535

36-
.tab-dashboard.theme-dark {
36+
.theme-dark {
3737
background-color: $euiColorEmptyShade;
3838

3939
@import 'dashboard_app';
4040
@import 'grid/index';
4141
@import 'panel/index';
4242
@import 'viewport/index';
4343

44-
// Vis imports
44+
// Vis imports -- will have some duplicate styling
45+
// because they will be imported via ui/public as well
46+
// (without .theme-[] prefix)
4547
@import 'src/ui/public/vis/map/index';
4648
}

0 commit comments

Comments
 (0)