From 19bb6936decdf0559ccc37b48835b34eff0eb107 Mon Sep 17 00:00:00 2001 From: Aung Myat Moe Date: Sun, 29 Oct 2023 23:10:04 +0630 Subject: [PATCH] refactor: move styles to the root level --- apps/myanmar_calendar/next-env.d.ts | 5 - apps/myanmar_calendar/package.json | 1 + .../src/assets/styles/globals.css | 98 ----------------- .../src/assets/styles/index.css | 2 - apps/myanmar_calendar/src/globals.css | 102 ++++++++++++++++++ apps/myanmar_calendar/src/main.tsx | 3 +- .../src/{assets => }/styles/scroll.css | 0 7 files changed, 105 insertions(+), 106 deletions(-) delete mode 100644 apps/myanmar_calendar/next-env.d.ts delete mode 100644 apps/myanmar_calendar/src/assets/styles/globals.css delete mode 100644 apps/myanmar_calendar/src/assets/styles/index.css create mode 100644 apps/myanmar_calendar/src/globals.css rename apps/myanmar_calendar/src/{assets => }/styles/scroll.css (100%) diff --git a/apps/myanmar_calendar/next-env.d.ts b/apps/myanmar_calendar/next-env.d.ts deleted file mode 100644 index 4f11a03..0000000 --- a/apps/myanmar_calendar/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/myanmar_calendar/package.json b/apps/myanmar_calendar/package.json index 743c847..9254132 100644 --- a/apps/myanmar_calendar/package.json +++ b/apps/myanmar_calendar/package.json @@ -13,6 +13,7 @@ "@tauri-apps/cli": "^1.4.0", "@types/node": "20.1.1", "@types/react": "^18.2.6", + "@types/react-dom": "^18.2.14", "autoprefixer": "^10.4.14", "burma-calendar": "workspace:*", "eslint": "8.40.0", diff --git a/apps/myanmar_calendar/src/assets/styles/globals.css b/apps/myanmar_calendar/src/assets/styles/globals.css deleted file mode 100644 index 31a07f5..0000000 --- a/apps/myanmar_calendar/src/assets/styles/globals.css +++ /dev/null @@ -1,98 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; - - --radius: 0.5rem; - } - - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 212.7 26.8% 83.9%; - } -} - -@layer base { - * { - /* outline: 1px solid violet; */ - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - @apply border-border; - } - - html { - font-size: 15.5px; - overflow: hidden; - } - @media (max-width: 639px) { - html { - font-size: 16px; - } - } - - body { - @apply bg-background text-foreground; - overflow: hidden; - } - - button { - outline: none; - } - - li { - list-style: none; - } -} diff --git a/apps/myanmar_calendar/src/assets/styles/index.css b/apps/myanmar_calendar/src/assets/styles/index.css deleted file mode 100644 index 3269159..0000000 --- a/apps/myanmar_calendar/src/assets/styles/index.css +++ /dev/null @@ -1,2 +0,0 @@ -@import url(globals.css); -@import url(scroll.css); diff --git a/apps/myanmar_calendar/src/globals.css b/apps/myanmar_calendar/src/globals.css new file mode 100644 index 0000000..f2b9d75 --- /dev/null +++ b/apps/myanmar_calendar/src/globals.css @@ -0,0 +1,102 @@ +@import url("./styles/scroll.css"); + +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 212.7 26.8% 83.9%; + } +} + +@layer base { + * { + /* outline: 1px solid violet; */ + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + @apply border-border; + } + + html { + font-size: 15.5px; + overflow: hidden; + } + + @media (max-width: 639px) { + html { + font-size: 16px; + } + } + + body { + @apply bg-background text-foreground; + overflow: hidden; + } + + button { + outline: none; + } + + li { + list-style: none; + } +} + diff --git a/apps/myanmar_calendar/src/main.tsx b/apps/myanmar_calendar/src/main.tsx index 3a98e33..e82800f 100644 --- a/apps/myanmar_calendar/src/main.tsx +++ b/apps/myanmar_calendar/src/main.tsx @@ -1,7 +1,8 @@ import React from 'react' import ReactDOM from 'react-dom/client' import App from './pages/App' -import './assets/styles/index.css' +import './globals.css'; + ReactDOM.createRoot(document.getElementById('root')).render( diff --git a/apps/myanmar_calendar/src/assets/styles/scroll.css b/apps/myanmar_calendar/src/styles/scroll.css similarity index 100% rename from apps/myanmar_calendar/src/assets/styles/scroll.css rename to apps/myanmar_calendar/src/styles/scroll.css