mod color;
pub(crate) mod compiled;
pub(crate) mod css;
pub(crate) mod font_style;
pub(crate) mod raw;
pub(crate) mod selector;
use serde::{Deserialize, Serialize};
pub use color::Color;
pub use compiled::{CompiledTheme, Style, SummarizedTheme};
pub(crate) use css::scope_to_css_classes;
pub use font_style::FontStyle;
pub use raw::RawTheme;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ThemeVariant<T> {
Single(T),
Dual {
light: T,
dark: T,
},
}
impl ThemeVariant<Style> {
pub(crate) fn has_decoration(&self) -> bool {
match self {
Self::Single(style) => style.has_decorations(),
Self::Dual { light, dark } => light.has_decorations() || dark.has_decorations(),
}
}
}