mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
@@ -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
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user