pub struct ResolvedTheme {
pub pack_id: String,
pub accent: String,
pub on_accent: String,
pub accent_ink_light: String,
pub accent_ink_dark: String,
pub font_display: Option<String>,
pub font_body: Option<String>,
pub tokens: WsTokens,
}Expand description
A document’s fully resolved presentation: pack tokens with the pack
applied, accent + derived WCAG colors, and font stacks. Computed once;
render_html emits it as CSS variables, render_native ships it across
the FFI as NativeTheme.
Fields§
§pack_id: StringThe resolved pack key (“surf”, “comic”, …).
accent: StringBrand accent hex.
on_accent: StringWCAG-compliant text color for content ON an accent background.
accent_ink_light: StringAccent adjusted to read as TEXT at AA on light surfaces.
accent_ink_dark: StringAccent adjusted to read as TEXT at AA on dark surfaces.
font_display: Option<String>Display/heading font stack (CSS), if a preset resolved.
font_body: Option<String>Body font stack (CSS), if a preset resolved.
tokens: WsTokensThe pack’s --ws-* token values.
Trait Implementations§
Source§impl Clone for ResolvedTheme
impl Clone for ResolvedTheme
Source§fn clone(&self) -> ResolvedTheme
fn clone(&self) -> ResolvedTheme
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedTheme
impl Debug for ResolvedTheme
Source§impl PartialEq for ResolvedTheme
impl PartialEq for ResolvedTheme
impl StructuralPartialEq for ResolvedTheme
Auto Trait Implementations§
impl Freeze for ResolvedTheme
impl RefUnwindSafe for ResolvedTheme
impl Send for ResolvedTheme
impl Sync for ResolvedTheme
impl Unpin for ResolvedTheme
impl UnsafeUnpin for ResolvedTheme
impl UnwindSafe for ResolvedTheme
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