Skip to main content

dark

Function dark 

Source
pub fn dark() -> Style
Expand description

The dark values of the tokens for one element and those inside it.

Use it with El::css_when to let a signal pick the theme rather than the system setting.

use hypersig::html::div;
use hypersig::Signals;
use serde::{Deserialize, Serialize};

#[derive(Signals, Serialize, Deserialize)]
struct App {
    dark: bool,
}

let app = div::<App>().css_when(hypersig_ui::dark(), App::dark());