diff --git a/desktop/app/src/init.tsx b/desktop/app/src/init.tsx index e0da6e1da..853a45b33 100644 --- a/desktop/app/src/init.tsx +++ b/desktop/app/src/init.tsx @@ -105,14 +105,19 @@ function init() { sideEffect( store, {name: 'loadTheme', fireImmediately: true, throttleMs: 500}, - (state) => - state.settingsState.enableSandy && state.settingsState.darkMode - ? 'themes/dark' - : 'themes/light', + (state) => ({ + sandy: state.settingsState.enableSandy, + dark: state.settingsState.darkMode, + }), (theme) => { (document.getElementById( 'flipper-theme-import', - ) as HTMLLinkElement).href = `${theme}.css`; + ) as HTMLLinkElement).href = `themes/${ + theme.sandy && theme.dark ? 'dark' : 'light' + }.css`; + document + .getElementById('root') + ?.classList.toggle('flipperlegacy_design', !theme.sandy); }, ); } diff --git a/desktop/themes/typography.less b/desktop/themes/typography.less index 76911801f..90d671ace 100644 --- a/desktop/themes/typography.less +++ b/desktop/themes/typography.less @@ -72,3 +72,8 @@ @link-color: @primary-color; @link-hover: @primary-color; @link-hover-decoration: underline; + +.flipperlegacy_design { + // Prevents ANT breaking global styles implicitly used by old Flipper design + line-height: 1; +}