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
/// The DOM `id` attribute value for the shared `<style>` element used by euv.
///
/// This ID is used to locate or create the `<style>` element in the document `<head>`
/// where all dynamically generated CSS rules are appended.
pub const EUV_CSS_INJECTED_ID: &str = "euv-css-injected";
/// The HTML `style` tag name used when creating a `<style>` element in the DOM.
pub const STYLE_TAG: &str = "style";
/// The callback event name used as a default for component prop event handlers.
///
/// When a closure is passed as a component prop via `IntoCallbackAttribute`,
/// it is wrapped with this generic event name. The actual DOM event type is
/// later resolved via `EventAdapter::into_attribute`.
pub const CALLBACK_EVENT_NAME: &str = "callback";
/// The CSS pseudo-rule serialization separator between selector and style block.
///
/// Used by `Css::parse_pseudo_rules` and `Css::parse_media_rules` to locate
/// the boundary between the selector and the style declarations in the
/// compact serialization format produced by the `class!` macro.
pub const CSS_RULE_OPEN: &str = " { ";
/// The CSS `@media` rule prefix used in serialized media query strings.
///
/// Used by `Css::parse_media_rules` to identify and extract media query
/// blocks from the compact serialization format produced by the `class!` macro.
pub const CSS_MEDIA_PREFIX: &str = "@media ";
/// The space character used in class/style name merging.
pub const CHAR_SPACE: char = ' ';
/// The CSS property separator string (name: value).
pub const CSS_PROP_SEPARATOR: &str = ": ";
/// The CSS declaration terminator character.
pub const CHAR_CSS_DECL_TERMINATOR: char = ';';
/// The CSS rule closing brace character.
pub const CHAR_CSS_RULE_CLOSE: char = '}';
/// The CSS class selector prefix character.
pub const CHAR_CSS_CLASS_PREFIX: char = '.';
/// The hyphen string used for replacing underscores in kebab-case conversion.
pub const STR_HYPHEN: &str = "-";
/// The underscore character used in CSS property name conversion.
pub const CHAR_UNDERSCORE: char = '_';
/// The signal addresses separator character.
pub const CHAR_SIGNAL_ADDRS_SEPARATOR: char = ',';