pub struct Theme {
pub mode: ThemeMode,
pub colors: ThemeColors,
pub spacing: ThemeSpacing,
pub typography: ThemeTypography,
}Expand description
A fully resolved theme.
Fields§
§mode: ThemeMode§colors: ThemeColors§spacing: ThemeSpacing§typography: ThemeTypographyImplementations§
Source§impl Theme
impl Theme
Sourcepub fn high_contrast(preset: HighContrastPreset) -> Self
pub fn high_contrast(preset: HighContrastPreset) -> Self
Built-in high-contrast theme for a preset.
Every preset keeps text, text_muted, accent, border, warning,
and error at WCAG 2.1 AAA contrast (>= 7:1) against background.
Trait Implementations§
impl StructuralPartialEq for Theme
Auto Trait Implementations§
impl Forget for Theme
impl Freeze for Theme
impl Move for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more