cosmic_theme/model/
spacing.rs

1use serde::{Deserialize, Serialize};
2
3/// Spacing variables for the Cosmic theme
4#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
5pub struct Spacing {
6    /// No spacing
7    pub space_none: u16,
8    /// smallest spacing that can be non-zero
9    pub space_xxxs: u16,
10    /// extra extra small spacing
11    pub space_xxs: u16,
12    /// extra small spacing
13    pub space_xs: u16,
14    /// small spacing
15    pub space_s: u16,
16    /// medium spacing
17    pub space_m: u16,
18    /// large spacing
19    pub space_l: u16,
20    /// extra large spacing
21    pub space_xl: u16,
22    /// extra extra large spacing
23    pub space_xxl: u16,
24    /// largest possible spacing
25    pub space_xxxl: u16,
26}
27
28impl Default for Spacing {
29    fn default() -> Self {
30        Self {
31            space_none: 0,
32            space_xxxs: 4,
33            space_xxs: 8,
34            space_xs: 12,
35            space_s: 16,
36            space_m: 24,
37            space_l: 32,
38            space_xl: 48,
39            space_xxl: 64,
40            space_xxxl: 128,
41        }
42    }
43}