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
47
48
49
50
51
52
53
54
55
56
use *;
/// Injects application-level global CSS into the DOM.
///
/// Registers the global reset styles and built-in animation keyframes.
/// Responsive media queries are now handled directly within `class!` macro
/// definitions via the `media()` block syntax.
/// Must be called once during application initialisation before any
/// rendering occurs.
///
/// Each stylesheet chunk is a separate `const.rs` constant and is injected
/// on its own: `concat!` only accepts string *literals*, so a named
/// constant cannot be spliced into a `concat!` call at compile time.
///
/// Degrades to a no-op when no window or document is reachable:
/// `Css::inject_css` returns early off wasm, and again when `window()` or
/// `document()` yields nothing, so calling this from a non-browser host is
/// safe rather than fatal.
/// Injects the markdown stylesheet content. Callers pass the result to
/// [`Css::inject_css`] once at startup.
///
/// # Returns
///
/// The markdown stylesheet as a static string slice.