fix: move baseline css from mui to index.css (#22238)

This pull-request moves our baseline CSS styles from the MUI theme
(`site/src/theme/mui.ts`) definition to `index.css`. As these are global
styles they should live in one dedicated place not two.
This commit is contained in:
Jake Howell
2026-02-26 02:42:16 +11:00
committed by GitHub
parent b0b9ea6fbf
commit 1c4d8fafc7
2 changed files with 28 additions and 34 deletions
+27
View File
@@ -108,6 +108,33 @@
@apply border-border;
}
html,
body,
#root,
#storybook-root {
@apply h-full;
}
button,
input {
@apply font-sans;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 100px hsl(var(--surface-primary)) inset !important;
}
::placeholder {
@apply text-content-secondary;
}
fieldset {
@apply border-none p-0 m-0 w-full;
}
/*
By default, Radix adds a margin to the `body` element when a dropdown is displayed,
causing some shifting when the dropdown has a full-width size, as is the case with the mobile menu.
+1 -34
View File
@@ -5,46 +5,13 @@
/** @deprecated MUI ThemeOptions is deprecated. Migrate to Tailwind CSS theme system. */
import type { ThemeOptions } from "@mui/material/styles";
import {
BODY_FONT_FAMILY,
BUTTON_LG_HEIGHT,
BUTTON_MD_HEIGHT,
} from "./constants";
import { BUTTON_LG_HEIGHT, BUTTON_MD_HEIGHT } from "./constants";
import tw from "./tailwindColors";
// biome-ignore lint/suspicious/noExplicitAny: needed for MUI overrides
type MuiStyle = any;
export const components = {
MuiCssBaseline: {
styleOverrides: (theme) => `
html, body, #root, #storybook-root {
height: 100%;
}
button, input {
font-family: ${BODY_FONT_FAMILY};
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 100px ${theme.palette.background.default} inset !important;
}
::placeholder {
color: ${theme.palette.text.disabled};
}
fieldset {
border: unset;
padding: 0;
margin: 0;
width: 100%;
}
`,
},
MuiAvatar: {
styleOverrides: {
root: {