1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
extern crate azul_css;
extern crate azul_css_parser;
use azul_css::Css;
pub const WINDOWS_CSS: &str = concat!(
include_str!("styles/native_windows.css"),
include_str!("styles/shared/table.css"),
);
pub const LINUX_CSS: &str = concat!(
include_str!("styles/native_linux.css"),
include_str!("styles/shared/table.css"),
);
pub const MACOS_CSS: &str = concat!(
include_str!("styles/native_macos.css"),
include_str!("styles/shared/table.css"),
);
pub const WASM_CSS: &str = concat!(
include_str!("styles/native_web.css"),
include_str!("styles/shared/table.css"),
);
#[cfg(target_os="windows")]
pub const NATIVE_CSS: &str = WINDOWS_CSS;
#[cfg(target_os="macos")]
pub const NATIVE_CSS: &str = MACOS_CSS;
#[cfg(target_os="linux")]
pub const NATIVE_CSS: &str = LINUX_CSS;
#[cfg(target_arch="wasm32")]
pub const NATIVE_CSS: &str = WASM_CSS;
pub fn native() -> Css {
azul_css_parser::new_from_str(NATIVE_CSS).unwrap()
}