feat: apply white background theme and improve UI styling

- Add Material-UI theme with white background configuration
- Update CSS with white background and light color scheme
- Integrate ThemeProvider and CssBaseline for consistent styling
- Remove dark theme elements and apply clean white design
- Improve typography and color contrast for better readability
This commit is contained in:
Nicolas Cantu 2025-09-10 17:55:39 +02:00
parent 0bb4ea6678
commit bb133d5448
6 changed files with 104 additions and 37 deletions

View File

@ -1,11 +1,11 @@
:root { :root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5; line-height: 1.5;
font-weight: 400; font-weight: 400;
color-scheme: light dark; color-scheme: light;
color: rgba(255, 255, 255, 0.87); color: #213547;
background-color: #242424; background-color: #ffffff;
font-synthesis: none; font-synthesis: none;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
@ -13,21 +13,29 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
min-height: 100vh;
background-color: #ffffff;
}
#root {
min-height: 100vh;
background-color: #ffffff;
}
a { a {
font-weight: 500; font-weight: 500;
color: #646cff; color: #1976d2;
text-decoration: inherit; text-decoration: inherit;
} }
a:hover { a:hover {
color: #535bf2; color: #1565c0;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
} }
h1 { h1 {
@ -42,27 +50,15 @@ button {
font-size: 1em; font-size: 1em;
font-weight: 500; font-weight: 500;
font-family: inherit; font-family: inherit;
background-color: #1a1a1a; background-color: #f9f9f9;
color: #213547;
cursor: pointer; cursor: pointer;
transition: border-color 0.25s; transition: border-color 0.25s;
} }
button:hover { button:hover {
border-color: #646cff; border-color: #1976d2;
} }
button:focus, button:focus,
button:focus-visible { button:focus-visible {
outline: 4px auto -webkit-focus-ring-color; outline: 4px auto -webkit-focus-ring-color;
} }
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

View File

@ -1,14 +1,20 @@
import { StrictMode } from 'react' import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client'
import { Provider } from 'react-redux' import { Provider } from 'react-redux'
import { ThemeProvider } from '@mui/material/styles'
import { CssBaseline } from '@mui/material'
import './index.css' import './index.css'
import App from './App.tsx' import App from './App.tsx'
import { store } from './store' import { store } from './store'
import { theme } from './theme'
createRoot(document.getElementById('root')!).render( createRoot(document.getElementById('root')!).render(
<StrictMode> <StrictMode>
<Provider store={store}> <Provider store={store}>
<ThemeProvider theme={theme}>
<CssBaseline />
<App /> <App />
</ThemeProvider>
</Provider> </Provider>
</StrictMode>, </StrictMode>,
) )

65
src/theme/index.ts Normal file
View File

@ -0,0 +1,65 @@
import { createTheme } from '@mui/material/styles'
export const theme = createTheme({
palette: {
mode: 'light',
background: {
default: '#ffffff',
paper: '#ffffff',
},
primary: {
main: '#1976d2',
light: '#42a5f5',
dark: '#1565c0',
},
secondary: {
main: '#dc004e',
light: '#ff5983',
dark: '#9a0036',
},
error: {
main: '#f44336',
},
warning: {
main: '#ff9800',
},
info: {
main: '#2196f3',
},
success: {
main: '#4caf50',
},
},
typography: {
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
h4: {
fontWeight: 600,
},
h6: {
fontWeight: 500,
},
},
components: {
MuiCssBaseline: {
styleOverrides: {
body: {
backgroundColor: '#ffffff',
},
},
},
MuiAppBar: {
styleOverrides: {
root: {
backgroundColor: '#1976d2',
},
},
},
MuiPaper: {
styleOverrides: {
root: {
backgroundColor: '#ffffff',
},
},
},
},
})