From 968d0e8576ef356bcbf1f213ae76d2a4810e25fd Mon Sep 17 00:00:00 2001 From: Ian Murray Date: Thu, 30 Oct 2025 09:16:08 +0100 Subject: [PATCH] fix checkbox contrast in dark mode Fixes #320. The contrast for the "check" and the background in dark mode was not enough, making it seem like the checkbox was uncheckable. --- lib/ruby_ui/checkbox/checkbox.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_ui/checkbox/checkbox.rb b/lib/ruby_ui/checkbox/checkbox.rb index 3cf579d3..3a985a19 100644 --- a/lib/ruby_ui/checkbox/checkbox.rb +++ b/lib/ruby_ui/checkbox/checkbox.rb @@ -19,7 +19,7 @@ def default_attrs class: [ "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background accent-primary", "disabled:cursor-not-allowed disabled:opacity-50", - "checked:bg-primary checked:text-primary-foreground", + "checked:bg-primary checked:text-primary-foreground dark:checked:bg-secondary", "aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" ]