Match TallStackUI's theme fallback before first paint

The inline theme script treated an unknown stored "dark-theme" value as
light, while tallstackui_darkTheme() treats it as "system", so a dark OS
could flash the light theme. Also move an inline comment in
AppServiceProvider into the method's PHPDoc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-22 12:27:02 +02:00
co-authored by Claude Opus 5.5
parent 90d6f5bd66
commit 4b42fd4009
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -26,7 +26,8 @@ class AppServiceProvider extends ServiceProvider
/**
* TallStackUI uses red-500 for error text, which is 3.8:1 on white and
* below the 4.5:1 WCAG 2.2 AA requires. Darker red in light mode, lighter
* red in dark mode.
* red in dark mode. The typed value of a field in error is red-600, which is
* 3.8:1 on the dark input background, so inputs and selects change too.
*/
private function meetContrastRequirements(): void
{
@@ -45,7 +46,6 @@ class AppServiceProvider extends ServiceProvider
->block('asterisk')
->replace('text-red-500', 'text-red-700 dark:text-red-400');
// The typed value of a field in error is red-600: 3.8:1 on the dark input background.
TallStackUi::customize()
->form('input')
->block('error')