Skip to content

Commit

Permalink
remove chakra defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Nov 29, 2023
1 parent 13bb19d commit c2fce08
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 109 deletions.
22 changes: 20 additions & 2 deletions web/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ChakraProvider } from "@chakra-ui/react";
import { PropsWithChildren } from "react";

import { AuthProvider } from "src/auth/AuthProvider";
import { extended } from "src/theme";

// Force chakra to always be light mode - because we're removing it eventually.
type ColourMode = "light" | "dark";
Expand All @@ -24,7 +23,26 @@ export function Providers({ children }: PropsWithChildren) {
return (
<CacheProvider>
<ChakraProvider
theme={extended}
theme={{
// Remove the Chakra defaults - we don't need them with Panda.
// https://chakra-ui.com/docs/styled-system/global-styles#default-styles
global: {
body: {
fontFamily: "unset",
color: "unset",
bg: "unset",
lineHeight: "unset",
},

"*::placeholder": {
color: "unset",
},
"*, *::before, &::after": {
borderColor: "unset",
wordWrap: "unset",
},
},
}}
// We're not using Chakra's reset, instead we're using Panda CSS.
resetCSS={false}
colorModeManager={noopColourModeManager}
Expand Down
107 changes: 0 additions & 107 deletions web/src/theme/index.ts

This file was deleted.

0 comments on commit c2fce08

Please sign in to comment.