From 8cca38f5275f3d28926e59339e3e672a5ae4ab95 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 4 Jul 2024 10:10:38 +0200 Subject: [PATCH] chg: [front] Improved CSS --- src/App.vue | 9 +++- src/assets/base.css | 86 ------------------------------------ src/assets/main.css | 17 ------- src/components/TheScores.vue | 8 ++-- tailwind.config.js | 5 ++- 5 files changed, 16 insertions(+), 109 deletions(-) delete mode 100644 src/assets/base.css diff --git a/src/App.vue b/src/App.vue index 1534590..c4c5e51 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,6 @@ import { socketConnected } from "@/socket"; onMounted(() => { document.getElementsByTagName('body')[0].classList.add('dark') - document.getElementById('app').classList.add('w-5/6') }) @@ -37,4 +36,12 @@ body { @apply dark:text-slate-300; } +#app { + @apply 3xl:container mx-auto; + @apply mx-auto; + @apply mt-4; + @apply 3xl:w-11/12; + @apply lg:w-5/6; +} + \ No newline at end of file diff --git a/src/assets/base.css b/src/assets/base.css deleted file mode 100644 index 8816868..0000000 --- a/src/assets/base.css +++ /dev/null @@ -1,86 +0,0 @@ -/* color palette from */ -:root { - --vt-c-white: #ffffff; - --vt-c-white-soft: #f8f8f8; - --vt-c-white-mute: #f2f2f2; - - --vt-c-black: #181818; - --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; - - --vt-c-indigo: #2c3e50; - - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); - --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); - --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); - --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); - - --vt-c-text-light-1: var(--vt-c-indigo); - --vt-c-text-light-2: rgba(60, 60, 60, 0.66); - --vt-c-text-dark-1: var(--vt-c-white); - --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); -} - -/* semantic color variables for this project */ -:root { - --color-background: var(--vt-c-white); - --color-background-soft: var(--vt-c-white-soft); - --color-background-mute: var(--vt-c-white-mute); - - --color-border: var(--vt-c-divider-light-2); - --color-border-hover: var(--vt-c-divider-light-1); - - --color-heading: var(--vt-c-text-light-1); - --color-text: var(--vt-c-text-light-1); - - --section-gap: 160px; -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--vt-c-black); - --color-background-soft: var(--vt-c-black-soft); - --color-background-mute: var(--vt-c-black-mute); - - --color-border: var(--vt-c-divider-dark-2); - --color-border-hover: var(--vt-c-divider-dark-1); - - --color-heading: var(--vt-c-text-dark-1); - --color-text: var(--vt-c-text-dark-2); - } -} - -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - font-weight: normal; -} - -body { - min-height: 100vh; - color: var(--color-text); - background: var(--color-background); - transition: - color 0.5s, - background-color 0.5s; - line-height: 1.6; - font-family: - Inter, - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - Roboto, - Oxygen, - Ubuntu, - Cantarell, - 'Fira Sans', - 'Droid Sans', - 'Helvetica Neue', - sans-serif; - font-size: 15px; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} diff --git a/src/assets/main.css b/src/assets/main.css index dc8790b..b5c61c9 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,20 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - font-weight: normal; -} -/* -@media (min-width: 1024px) { - body { - display: flex; - } - - #app { - display: flex; - } -} */ diff --git a/src/components/TheScores.vue b/src/components/TheScores.vue index 135f9d2..ef790ff 100644 --- a/src/components/TheScores.vue +++ b/src/components/TheScores.vue @@ -85,7 +85,7 @@