mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 17:24:10 +00:00
Add dark mode with CSS custom property theme system
Define 13 semantic color tokens (surface, text, border, hover) with light/dark values in themes.css. Register with Tailwind via @theme inline. Migrate all 335 Vue files from hardcoded gray/white classes to semantic tokens. Add theme toggle (sun/moon/system) in user avatar dropdown. Replace @tailwindcss/forms with custom form reset using theme vars. Add status badge and alert tokens for dark mode. Theme-aware chart grid/labels, skeleton placeholders, and editor. Inline script in <head> prevents flash of wrong theme on load. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
v-if="label"
|
||||
:for="id"
|
||||
:class="`font-medium ${
|
||||
disabled ? 'text-gray-400 cursor-not-allowed' : 'text-gray-600'
|
||||
disabled ? 'text-subtle cursor-not-allowed' : 'text-body'
|
||||
} cursor-pointer `"
|
||||
>
|
||||
{{ label }}
|
||||
</label>
|
||||
<p v-if="description" class="text-gray-500">{{ description }}</p>
|
||||
<p v-if="description" class="text-muted">{{ description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -51,7 +51,7 @@ const props = defineProps({
|
||||
},
|
||||
checkboxClass: {
|
||||
type: String,
|
||||
default: 'w-4 h-4 border-gray-300 rounded cursor-pointer',
|
||||
default: 'w-4 h-4 border-line-strong rounded cursor-pointer',
|
||||
},
|
||||
setInitialValue: {
|
||||
type: Boolean,
|
||||
@@ -75,7 +75,7 @@ const checked = computed({
|
||||
|
||||
const disabledClass = computed(() => {
|
||||
if (props.disabled) {
|
||||
return 'text-gray-300 cursor-not-allowed'
|
||||
return 'text-subtle cursor-not-allowed'
|
||||
}
|
||||
|
||||
return 'text-primary-600 focus:ring-primary-500'
|
||||
|
||||
Reference in New Issue
Block a user