From 3d0183f12c797637b82849cf46918e2016dbb157 Mon Sep 17 00:00:00 2001 From: fitse-yotor Date: Fri, 21 Aug 2026 11:51:14 +0300 Subject: [PATCH] build: remove Tailwind, which was never actually running MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tailwind was configured but had no effect. There is no postcss config anywhere in the repo, so the three `@tailwind` directives in the backoffice stylesheet were never expanded — they passed through verbatim into the production CSS bundle as invalid at-rules for browsers to discard. The portal's copy could not even do that: nothing imports `apps/portal/src/styles.css`. The utility classes visible in the built CSS come from the vendored @tria-plc/iamui package, which ships its own pre-compiled stylesheet and declares only React as a peer dependency. Removing Tailwind here does not affect it. `tailwind-merge` goes too — no file in apps/ or libs/ imports it. postcss and autoprefixer stay; Vite uses them independently. Also fixes a bug this uncovered. The orphaned portal stylesheet was not dead code — it contained scrollbar theming the portal never received, so it has been rendering raw OS scrollbars while the backoffice got themed ones. Those rules move to portal.css, which actually loads. Deleting the file without reading it would have silently kept that gap. No visual change: all 8 baselines pass unmodified. Co-Authored-By: Claude Opus 5 --- apps/backoffice/src/styles.css | 3 -- apps/portal/src/app/theme/portal.css | 42 ++++++++++++++++++++++++++++ apps/portal/src/styles.css | 42 ---------------------------- package.json | 2 -- tailwind.config.js | 42 ---------------------------- 5 files changed, 42 insertions(+), 89 deletions(-) delete mode 100644 apps/portal/src/styles.css delete mode 100644 tailwind.config.js diff --git a/apps/backoffice/src/styles.css b/apps/backoffice/src/styles.css index 4b107d549..3d99d51ae 100644 --- a/apps/backoffice/src/styles.css +++ b/apps/backoffice/src/styles.css @@ -1,7 +1,4 @@ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); -@tailwind base; -@tailwind components; -@tailwind utilities; *, *::before, *::after { box-sizing: border-box; } diff --git a/apps/portal/src/app/theme/portal.css b/apps/portal/src/app/theme/portal.css index 8299ca21a..6b5fec975 100644 --- a/apps/portal/src/app/theme/portal.css +++ b/apps/portal/src/app/theme/portal.css @@ -7,6 +7,48 @@ --ema-surface-dark: #0e1521; } +/* --------------------------------------------------------------------------- + Scrollbars — themed instead of the raw OS default, so a dark page doesn't + carry a stark white scrollbar (or vice versa). Firefox via scrollbar-color, + Chrome/Safari/Edge via the ::-webkit-scrollbar-* pseudo-elements. Colors + come from Mantine's dark palette so they track the active color scheme + instead of a fixed gray. + + These lived in `apps/portal/src/styles.css`, which nothing ever imported — + so the portal has been running with unthemed scrollbars while the backoffice + had these. Moved here, where they load. + --------------------------------------------------------------------------- */ +* { + scrollbar-width: thin; + scrollbar-color: var(--mantine-color-gray-5) transparent; +} +[data-mantine-color-scheme='dark'] * { + scrollbar-color: var(--mantine-color-dark-3) transparent; +} + +::-webkit-scrollbar { + width: 10px; + height: 10px; +} +::-webkit-scrollbar-track { + background: transparent; +} +::-webkit-scrollbar-thumb { + background-color: var(--mantine-color-gray-5); + border-radius: 8px; + border: 2px solid transparent; + background-clip: content-box; +} +::-webkit-scrollbar-thumb:hover { + background-color: var(--mantine-color-gray-6); +} +[data-mantine-color-scheme='dark'] ::-webkit-scrollbar-thumb { + background-color: var(--mantine-color-dark-3); +} +[data-mantine-color-scheme='dark'] ::-webkit-scrollbar-thumb:hover { + background-color: var(--mantine-color-dark-2); +} + body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; diff --git a/apps/portal/src/styles.css b/apps/portal/src/styles.css deleted file mode 100644 index a5b3a8408..000000000 --- a/apps/portal/src/styles.css +++ /dev/null @@ -1,42 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* --------------------------------------------------------------------------- - Scrollbars — themed instead of the raw OS default, so a dark page doesn't - carry a stark white scrollbar (or vice versa). Firefox via scrollbar-color, - Chrome/Safari/Edge via the ::-webkit-scrollbar-* pseudo-elements. Colors - come from Mantine's dark palette so they track the active color scheme - instead of a fixed gray. - --------------------------------------------------------------------------- */ -* { - scrollbar-width: thin; - scrollbar-color: var(--mantine-color-gray-5) transparent; -} -[data-mantine-color-scheme='dark'] * { - scrollbar-color: var(--mantine-color-dark-3) transparent; -} - -::-webkit-scrollbar { - width: 10px; - height: 10px; -} -::-webkit-scrollbar-track { - background: transparent; -} -::-webkit-scrollbar-thumb { - background-color: var(--mantine-color-gray-5); - border-radius: 8px; - border: 2px solid transparent; - background-clip: content-box; -} -::-webkit-scrollbar-thumb:hover { - background-color: var(--mantine-color-gray-6); -} -[data-mantine-color-scheme='dark'] ::-webkit-scrollbar-thumb { - background-color: var(--mantine-color-dark-3); -} -[data-mantine-color-scheme='dark'] ::-webkit-scrollbar-thumb:hover { - background-color: var(--mantine-color-dark-2); -} diff --git a/package.json b/package.json index 131f9741c..de6d7a558 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "react-router": "^7.12.0", "react-router-dom": "^7.13.1", "recharts": "^3.8.0", - "tailwind-merge": "^3.5.0", "zod": "^4.3.6" }, "devDependencies": { @@ -71,7 +70,6 @@ "nx": "^22.5.4", "postcss": "^8.5.1", "prettier": "^3.6.2", - "tailwindcss": "^3.4.3", "typescript": "~5.9.2", "vite": "^7.0.0", "vitest": "^4.0.0" diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index 3531d4ba8..000000000 --- a/tailwind.config.js +++ /dev/null @@ -1,42 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - darkMode: 'class', - content: [ - './apps/**/*.{js,ts,jsx,tsx}', - './libs/**/*.{js,ts,jsx,tsx}', - ], - theme: { - extend: { - colors: { - primary: { - 50: '#eff6ff', - 100: '#dbeafe', - 200: '#bfdbfe', - 300: '#93c5fd', - 400: '#60a5fa', - 500: '#3b82f6', - 600: '#2563eb', - 700: '#1d4ed8', - 800: '#1e40af', - 900: '#1e3a8a', - }, - secondary: { - 50: '#fdf8f6', - 100: '#f2e8e5', - 200: '#eaddd7', - 300: '#e0cec7', - 400: '#d2bab0', - 500: '#bfa094', - 600: '#a18072', - 700: '#977669', - 800: '#65524d', - 900: '#2c1f1a', - }, - }, - boxShadow: { - card: '0 4px 20px rgba(15, 23, 42, 0.08)', - }, - }, - }, - plugins: [], -};