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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user