Macro fungui::eval

source ·
macro_rules! eval {
    ($styles:expr, $n:expr, $rule:ident.$key:expr => $ret:ident => $ok:block) => { ... };
}
Expand description

Tries to find and evalulate a given style property in a rule.

This will skip properties that have already been set previously in the update. Should only be used during an update_(child_)data call.

eval!(styles, nc, rule.MY_PROP => val => {
    // This will only run if MY_PROP was set in the rule
    // val will be a `Value` containing what the property
    // was set too
});