zen_rs/
aspects.rs

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
//! Base types of aspects
//!
//! This module defines base aspects and their associated types.

pub mod border;
pub mod color;
pub mod font;
pub mod order;
pub mod spaceing;
pub mod svg;

pub use border::*;
pub use color::*;
pub use font::*;
pub use order::*;
pub use spaceing::*;
pub use svg::*;

/// Indicates whether an element should be displayed.
///
/// This is a helper type that serves as a replacement for `Option` in certain cases.
///
/// **Note**: This type may be removed in future versions.
pub type Show = bool;

/// Represents a path to a destination.
pub type Path = String;

/// Represents a size value.
///
/// By default, size is assumed to be in pixels, but specific layouts may interpret it differently.
pub type Size = u64;

/// Represents a hyperlink.
///
/// **Note**: This is applicable only for HTML/Leptos render attributes and will be ignored for other render types.
///
/// For example, this corresponds to an HTML `href` attribute.
pub type Link = Option<Path>;

// Size-related types
/// Represents the width of an element.
/// Presumably measured in pixels.
pub type Width = Size;

/// Represents the height of an element.
/// Presumably measured in pixels.
pub type Height = Size;