@@ -96,6 +96,11 @@ export function uiRenderMixin(kbnServer, server, config) {
9696 ? await uiSettings . get ( 'theme:darkMode' )
9797 : false ;
9898
99+ const themeVersion =
100+ ! authEnabled || request . auth . isAuthenticated
101+ ? await uiSettings . get ( 'theme:version' )
102+ : 'v7' ;
103+
99104 const buildHash = server . newPlatform . env . packageInfo . buildNum ;
100105 const basePath = config . get ( 'server.basePath' ) ;
101106
@@ -114,12 +119,16 @@ export function uiRenderMixin(kbnServer, server, config) {
114119 `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . baseCssDistFilename } ` ,
115120 ...( darkMode
116121 ? [
117- `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . darkCssDistFilename } ` ,
122+ themeVersion === 'v7'
123+ ? `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . darkCssDistFilename } `
124+ : `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . darkV8CssDistFilename } ` ,
118125 `${ basePath } /node_modules/@kbn/ui-framework/dist/kui_dark.css` ,
119126 `${ regularBundlePath } /dark_theme.style.css` ,
120127 ]
121128 : [
122- `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . lightCssDistFilename } ` ,
129+ themeVersion === 'v7'
130+ ? `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . lightCssDistFilename } `
131+ : `${ regularBundlePath } /kbn-ui-shared-deps/${ UiSharedDeps . lightV8CssDistFilename } ` ,
123132 `${ basePath } /node_modules/@kbn/ui-framework/dist/kui_light.css` ,
124133 `${ regularBundlePath } /light_theme.style.css` ,
125134 ] ) ,
@@ -186,6 +195,7 @@ export function uiRenderMixin(kbnServer, server, config) {
186195 const bootstrap = new AppBootstrap ( {
187196 templateData : {
188197 darkMode,
198+ themeVersion,
189199 jsDependencyPaths,
190200 styleSheetPaths,
191201 publicPathMap,
0 commit comments