From 6936d0950b919c94aef13f2854ec5b054ce93ca5 Mon Sep 17 00:00:00 2001 From: Petri Saarinen Date: Wed, 25 Nov 2026 06:01:50 +0200 Subject: [PATCH] Keep the header dark and give the light theme a grey content background The header and its menu popovers always use the dark theme colours, the light theme body is zinc-100 and Kanban columns zinc-200 so they still stand out. The theme toggle icon follows the page theme through a new page-dark variant, and TallStackUI hint and selection group description texts are one shade darker to keep 4.5:1 contrast on the grey background. Co-Authored-By: Claude Opus 5.5 --- .../Jobs/Presentation/Livewire/⚡board.blade.php | 2 +- app/Providers/AppServiceProvider.php | 14 ++++++++++++++ resources/css/app.css | 6 ++++++ resources/views/components/nav-group.blade.php | 14 +++++++------- resources/views/layouts/app.blade.php | 8 ++++---- resources/views/partials/theme-toggle.blade.php | 4 ++-- 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/app/Modules/Jobs/Presentation/Livewire/⚡board.blade.php b/app/Modules/Jobs/Presentation/Livewire/⚡board.blade.php index a0e71f6..c3d356d 100644 --- a/app/Modules/Jobs/Presentation/Livewire/⚡board.blade.php +++ b/app/Modules/Jobs/Presentation/Livewire/⚡board.blade.php @@ -205,7 +205,7 @@ new class extends Component id="column-{{ $status }}" wire:key="column-{{ $status }}" aria-labelledby="column-{{ $status }}-heading" - class="flex min-w-0 flex-col rounded-lg border border-zinc-200 bg-zinc-100 p-3 dark:border-zinc-700 dark:bg-zinc-950" + class="flex min-w-0 flex-col rounded-lg border border-zinc-300 bg-zinc-200 p-3 dark:border-zinc-700 dark:bg-zinc-950" >

{{ __('jobs.statuses.'.$status) }} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 5b712d4..9a4f262 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -51,6 +51,20 @@ class AppServiceProvider extends ServiceProvider ->block('error') ->replace('text-red-600!', 'text-red-700! dark:!text-red-400'); + TallStackUi::customize() + ->form('hint') + ->block('text') + ->replace('text-gray-500', 'text-gray-600'); + + foreach (['radio.group', 'checkbox.group'] as $selectionGroup) { + foreach (['content.description', 'content.aside'] as $block) { + TallStackUi::customize() + ->form($selectionGroup) + ->block($block) + ->replace('text-gray-500', 'text-gray-600'); + } + } + TallStackUi::customize() ->select('native') ->block('error') diff --git a/resources/css/app.css b/resources/css/app.css index cf1dbe4..8104cb1 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -13,6 +13,12 @@ @custom-variant dark (&:where(.dark, .dark *)); +/* + * The header always carries the .dark class, so anything that must follow the + * page theme itself (the theme toggle icon) uses page-dark: instead of dark:. + */ +@custom-variant page-dark (&:where(html.dark, html.dark *)); + @theme { --font-sans: Inter, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; diff --git a/resources/views/components/nav-group.blade.php b/resources/views/components/nav-group.blade.php index 8b1bb24..f1de952 100644 --- a/resources/views/components/nav-group.blade.php +++ b/resources/views/components/nav-group.blade.php @@ -21,9 +21,9 @@ aria-expanded="false" aria-controls="nav-group-{{ $group['key'] }}" @class([ - 'flex items-center gap-1 rounded-md px-3 py-2 text-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700', - 'text-zinc-900 underline decoration-2 underline-offset-8 dark:text-white' => $group['current'], - 'text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white' => ! $group['current'], + 'flex items-center gap-1 rounded-md px-3 py-2 text-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-400', + 'text-white underline decoration-2 underline-offset-8' => $group['current'], + 'text-zinc-300 hover:bg-zinc-700 hover:text-white' => ! $group['current'], ]) > {{ $group['label'] }} @@ -37,7 +37,7 @@ id="nav-group-{{ $group['key'] }}" x-show="open" x-cloak - class="z-40 mt-1 min-w-56 rounded-md border border-zinc-200 bg-white p-1 shadow-lg sm:absolute sm:start-0 dark:border-zinc-600 dark:bg-zinc-800" + class="z-40 mt-1 min-w-56 rounded-md border border-zinc-600 bg-zinc-800 p-1 shadow-lg sm:absolute sm:start-0" > @foreach ($group['items'] as $item)
  • @@ -46,9 +46,9 @@ wire:navigate @if ($item['current']) aria-current="page" @endif @class([ - 'block rounded-md px-3 py-2 text-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700', - 'bg-zinc-100 text-zinc-900 underline decoration-2 underline-offset-4 dark:bg-zinc-700 dark:text-white' => $item['current'], - 'text-zinc-700 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-200 dark:hover:bg-zinc-700 dark:hover:text-white' => ! $item['current'], + 'block rounded-md px-3 py-2 text-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-400', + 'bg-zinc-700 text-white underline decoration-2 underline-offset-4' => $item['current'], + 'text-zinc-200 hover:bg-zinc-700 hover:text-white' => ! $item['current'], ]) > {{ $item['label'] }} diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 11b0167..4157c8c 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -39,7 +39,7 @@ @livewireStyles @vite(['resources/css/app.css', 'resources/js/app.js']) - + @auth -
    +
    - + {{ app(\App\Modules\Shared\Application\UseCases\CompanyDetailsStore::class)->menuName() }} @@ -61,7 +61,7 @@
    - {{ __('layout.signed_in_as', ['name' => auth()->user()->name]) }} + {{ __('layout.signed_in_as', ['name' => auth()->user()->name]) }} @include('partials.theme-toggle') diff --git a/resources/views/partials/theme-toggle.blade.php b/resources/views/partials/theme-toggle.blade.php index 7910f95..0ff657d 100644 --- a/resources/views/partials/theme-toggle.blade.php +++ b/resources/views/partials/theme-toggle.blade.php @@ -16,6 +16,6 @@ sm data-theme-toggle > -