3VTU"QQSPBDIFT
w $MBTTJEFOUJpFSHFOFSBUJPO
w DTTNBDSPJO1FSDZ
IUUQTHJUIVCDPNDIJOFEVGOQFSDZUSFF
NBTUFSFYBNQMFTDTTJOSVTU
w $44JO3VTU
IUUQTHJUIVCDPNMVLJEPFTDPEFDTTJOSVTU
w 5ZQFTBGF$44HFOFSBUJPO
w 3644
IUUQTHJUIVCDPNTJLVSVTT
12 impl Component for App {
16 fn create(_: Self::Properties, _: ComponentLink) -> Self {
17 let style = match Style::create("App", include_str!("app.scss")) {
18 Ok(style) => style,
19 Err(error) => {
20 panic!("An error occured while creating the style: {}", error);
21 }
22 };
23 App { style }
24 }
34 fn view(&self) -> Html {
35 html! {
38
}
39 }
40 }
17 assert_eq!(
18 render(Calc::bin_div(Calc::bin_div(Length::px(100), 2), 2)),
19 "calc((100px / 2) / 2)"
20 );
21 assert_eq!(
22 render(Color::rgba(Calc::bin_sub(255, 5), 0, 153, 1)),
23 "rgb(calc(255 - 5),0,153,1)"
24 );