Skip to content

Commit

Permalink
fix: default app styles
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Oct 3, 2024
1 parent b61edd3 commit 2cc813f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 24 deletions.
38 changes: 38 additions & 0 deletions src/components/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@font-face {
font-family: "SpaceGrotesk";
src:
local("SpaceGrotesk"),
url("../fonts/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
}

@font-face {
font-family: "Inter";
src:
local("Inter"),
url("../fonts/Inter-VariableFont_slnt,wght.ttf") format("truetype");
}

html,
body {
box-sizing: border-box;
height: 100%;
padding: 0;
margin: 0;
}

#root {
box-sizing: border-box;
min-height: 100%;
display: flex;
flex-direction: column;
}

#header,
#footer {
flex-grow: 0;
flex-shrink: 0;
}

#body {
flex-grow: 1;
}
25 changes: 1 addition & 24 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Provider, type ProviderProps } from "react-redux"
import { BrowserRouter, Routes as RouterRoutes } from "react-router-dom"
import { type Action } from "redux"

import "./App.css"
import { InactiveDialog, ScreenTimeDialog } from "../features"
import { useCountdown, useEventListener, useLocation } from "../hooks"
// import "../scripts"
Expand Down Expand Up @@ -84,30 +85,6 @@ const App = <A extends Action = Action, S = unknown>({
return (
<ThemeProvider theme={theme}>
<CssBaseline />
<style>{`
html, body {
box-sizing: border-box;
height: 100%;
padding: 0;
margin: 0;
}
#root {
box-sizing: border-box;
min-height: 100%;
display: flex;
flex-direction: column;
}
#header, #footer {
flex-grow: 0;
flex-shrink: 0;
}
#body {
flex-grow: 1;
}
`}</style>
<Provider store={store}>
<InactiveDialog open={isIdle} onClose={resetIdleSeconds} />
<ScreenTimeDialog
Expand Down
Binary file added src/fonts/Inter-VariableFont_slnt,wght.ttf
Binary file not shown.
Binary file added src/fonts/SpaceGrotesk-VariableFont_wght.ttf
Binary file not shown.

0 comments on commit 2cc813f

Please sign in to comment.