Skip to content

Commit

Permalink
Revert "chore: switch to theme typography configuration" (janus-idp#637)
Browse files Browse the repository at this point in the history
This reverts commit 5a9961d.

Signed-off-by: Stan Lewis <gashcrumb@gmail.com>
  • Loading branch information
gashcrumb committed Oct 23, 2023
1 parent e01aac5 commit dc1580d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 68 deletions.
2 changes: 0 additions & 2 deletions .changeset/cuddly-cameras-fetch.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/proud-spiders-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'app': patch
---

Revert typography changes
31 changes: 12 additions & 19 deletions packages/app/src/themes/componentOverrides.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import { UnifiedThemeOptions } from '@backstage/theme';
import { headerFontFamily } from './consts';

const redhatFont = `@font-face {
font-family: 'Red Hat Font';
font-style: normal;
font-display: swap;
font-weight: 400;
src: url(/fonts/RedHatText-Regular.woff2) format('woff2'),
url(/fonts/RedHatText-Regular.otf) format('opentype'),
url(/fonts/RedHatText-Regular.ttf) format('truetype');
}`;

export const components: UnifiedThemeOptions['components'] = {
MuiTypography: {
styleOverrides: {
h1: {
fontFamily: headerFontFamily,
},
h2: {
fontFamily: headerFontFamily,
},
h3: {
fontFamily: headerFontFamily,
},
h4: {
fontFamily: headerFontFamily,
},
h5: {
fontFamily: headerFontFamily,
},
},
MuiCssBaseline: {
styleOverrides: redhatFont,
},
};
41 changes: 0 additions & 41 deletions packages/app/src/themes/consts.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/app/src/themes/darkTheme.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { createUnifiedTheme, themes } from '@backstage/theme';
import { components } from './componentOverrides';
import { pageFontFamily, typography } from './consts';
import { pageTheme } from './pageTheme';
import { ThemeColors } from '../types/types';

export const customDarkTheme = (themeColors: ThemeColors) =>
createUnifiedTheme({
fontFamily: pageFontFamily,
palette: {
...themes.dark.getTheme('v5')?.palette,
...(themeColors.primaryColor && {
Expand All @@ -28,5 +26,4 @@ export const customDarkTheme = (themeColors: ThemeColors) =>
defaultPageTheme: 'home',
pageTheme: pageTheme(themeColors),
components,
typography,
});
3 changes: 0 additions & 3 deletions packages/app/src/themes/lightTheme.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { createUnifiedTheme, themes } from '@backstage/theme';
import { components } from './componentOverrides';
import { pageFontFamily, typography } from './consts';
import { pageTheme } from './pageTheme';
import { ThemeColors } from '../types/types';

export const customLightTheme = (themeColors: ThemeColors) =>
createUnifiedTheme({
fontFamily: pageFontFamily,
palette: {
...themes.light.getTheme('v5')?.palette,
...(themeColors.primaryColor && {
Expand All @@ -28,5 +26,4 @@ export const customLightTheme = (themeColors: ThemeColors) =>
defaultPageTheme: 'home',
pageTheme: pageTheme(themeColors),
components,
typography,
});

0 comments on commit dc1580d

Please sign in to comment.