NAME

Chandra::Theme - CSS theme system for Chandra apps

SYNOPSIS

use Chandra::App;
use Chandra::Theme;

my $app = Chandra::App->new(title => 'My App');

# Built-in themes
Chandra::Theme->apply($app, 'dark');
Chandra::Theme->apply($app, 'light');

# Auto-detect OS preference
Chandra::Theme->apply($app, 'auto');

# Custom theme (merged with light as base)
Chandra::Theme->apply($app, {
    primary => '#6200ea',
    bg      => '#fafafa',
    surface => '#ffffff',
    radius  => '12px',
});

$app->run;

DESCRIPTION

Chandra::Theme provides a CSS theme system using CSS custom properties. It includes built-in light and dark themes, styles for all Chandra components (Form, Table, ContextMenu), and base typography/reset styles.

CSS CUSTOM PROPERTIES

All tokens are available as --chandra-* CSS variables:

--chandra-primary, --chandra-secondary, --chandra-danger,
--chandra-warning, --chandra-info, --chandra-success,
--chandra-bg, --chandra-surface, --chandra-text,
--chandra-text-muted, --chandra-border,
--chandra-input-bg, --chandra-input-border,
--chandra-hover, --chandra-selected, --chandra-shadow,
--chandra-font, --chandra-font-mono,
--chandra-radius, --chandra-font-size, --chandra-line-height

SEE ALSO

Chandra::App, Chandra::Table, Chandra::Form