Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_feathers/src/tokens.rs
6595 views
1
//! Design tokens used by Feathers themes.
2
//!
3
//! The term "design token" is commonly used in UX design to mean the smallest unit of a theme,
4
//! similar in concept to a CSS variable. Each token represents an assignment of a color or
5
//! value to a specific visual aspect of a widget, such as background or border.
6
7
/// Window background
8
pub const WINDOW_BG: &str = "feathers.window.bg";
9
10
/// Focus ring
11
pub const FOCUS_RING: &str = "feathers.focus";
12
13
/// Regular text
14
pub const TEXT_MAIN: &str = "feathers.text.main";
15
/// Dim text
16
pub const TEXT_DIM: &str = "feathers.text.dim";
17
18
// Normal buttons
19
20
/// Regular button background
21
pub const BUTTON_BG: &str = "feathers.button.bg";
22
/// Regular button background (hovered)
23
pub const BUTTON_BG_HOVER: &str = "feathers.button.bg.hover";
24
/// Regular button background (disabled)
25
pub const BUTTON_BG_DISABLED: &str = "feathers.button.bg.disabled";
26
/// Regular button background (pressed)
27
pub const BUTTON_BG_PRESSED: &str = "feathers.button.bg.pressed";
28
/// Regular button text
29
pub const BUTTON_TEXT: &str = "feathers.button.txt";
30
/// Regular button text (disabled)
31
pub const BUTTON_TEXT_DISABLED: &str = "feathers.button.txt.disabled";
32
33
// Primary ("default") buttons
34
35
/// Primary button background
36
pub const BUTTON_PRIMARY_BG: &str = "feathers.button.primary.bg";
37
/// Primary button background (hovered)
38
pub const BUTTON_PRIMARY_BG_HOVER: &str = "feathers.button.primary.bg.hover";
39
/// Primary button background (disabled)
40
pub const BUTTON_PRIMARY_BG_DISABLED: &str = "feathers.button.primary.bg.disabled";
41
/// Primary button background (pressed)
42
pub const BUTTON_PRIMARY_BG_PRESSED: &str = "feathers.button.primary.bg.pressed";
43
/// Primary button text
44
pub const BUTTON_PRIMARY_TEXT: &str = "feathers.button.primary.txt";
45
/// Primary button text (disabled)
46
pub const BUTTON_PRIMARY_TEXT_DISABLED: &str = "feathers.button.primary.txt.disabled";
47
48
// Slider
49
50
/// Background for slider
51
pub const SLIDER_BG: &str = "feathers.slider.bg";
52
/// Background for slider moving bar
53
pub const SLIDER_BAR: &str = "feathers.slider.bar";
54
/// Background for slider moving bar (disabled)
55
pub const SLIDER_BAR_DISABLED: &str = "feathers.slider.bar.disabled";
56
/// Background for slider text
57
pub const SLIDER_TEXT: &str = "feathers.slider.text";
58
/// Background for slider text (disabled)
59
pub const SLIDER_TEXT_DISABLED: &str = "feathers.slider.text.disabled";
60
61
// Checkbox
62
63
/// Checkbox background around the checkmark
64
pub const CHECKBOX_BG: &str = "feathers.checkbox.bg";
65
/// Checkbox border around the checkmark (disabled)
66
pub const CHECKBOX_BG_DISABLED: &str = "feathers.checkbox.bg.disabled";
67
/// Checkbox background around the checkmark
68
pub const CHECKBOX_BG_CHECKED: &str = "feathers.checkbox.bg.checked";
69
/// Checkbox border around the checkmark (disabled)
70
pub const CHECKBOX_BG_CHECKED_DISABLED: &str = "feathers.checkbox.bg.checked.disabled";
71
/// Checkbox border around the checkmark
72
pub const CHECKBOX_BORDER: &str = "feathers.checkbox.border";
73
/// Checkbox border around the checkmark (hovered)
74
pub const CHECKBOX_BORDER_HOVER: &str = "feathers.checkbox.border.hover";
75
/// Checkbox border around the checkmark (disabled)
76
pub const CHECKBOX_BORDER_DISABLED: &str = "feathers.checkbox.border.disabled";
77
/// Checkbox check mark
78
pub const CHECKBOX_MARK: &str = "feathers.checkbox.mark";
79
/// Checkbox check mark (disabled)
80
pub const CHECKBOX_MARK_DISABLED: &str = "feathers.checkbox.mark.disabled";
81
/// Checkbox label text
82
pub const CHECKBOX_TEXT: &str = "feathers.checkbox.text";
83
/// Checkbox label text (disabled)
84
pub const CHECKBOX_TEXT_DISABLED: &str = "feathers.checkbox.text.disabled";
85
86
// Radio button
87
88
/// Radio border around the checkmark
89
pub const RADIO_BORDER: &str = "feathers.radio.border";
90
/// Radio border around the checkmark (hovered)
91
pub const RADIO_BORDER_HOVER: &str = "feathers.radio.border.hover";
92
/// Radio border around the checkmark (disabled)
93
pub const RADIO_BORDER_DISABLED: &str = "feathers.radio.border.disabled";
94
/// Radio check mark
95
pub const RADIO_MARK: &str = "feathers.radio.mark";
96
/// Radio check mark (disabled)
97
pub const RADIO_MARK_DISABLED: &str = "feathers.radio.mark.disabled";
98
/// Radio label text
99
pub const RADIO_TEXT: &str = "feathers.radio.text";
100
/// Radio label text (disabled)
101
pub const RADIO_TEXT_DISABLED: &str = "feathers.radio.text.disabled";
102
103
// Toggle Switch
104
105
/// Switch background around the checkmark
106
pub const SWITCH_BG: &str = "feathers.switch.bg";
107
/// Switch border around the checkmark (disabled)
108
pub const SWITCH_BG_DISABLED: &str = "feathers.switch.bg.disabled";
109
/// Switch background around the checkmark
110
pub const SWITCH_BG_CHECKED: &str = "feathers.switch.bg.checked";
111
/// Switch border around the checkmark (disabled)
112
pub const SWITCH_BG_CHECKED_DISABLED: &str = "feathers.switch.bg.checked.disabled";
113
/// Switch border around the checkmark
114
pub const SWITCH_BORDER: &str = "feathers.switch.border";
115
/// Switch border around the checkmark (hovered)
116
pub const SWITCH_BORDER_HOVER: &str = "feathers.switch.border.hover";
117
/// Switch border around the checkmark (disabled)
118
pub const SWITCH_BORDER_DISABLED: &str = "feathers.switch.border.disabled";
119
/// Switch slide
120
pub const SWITCH_SLIDE: &str = "feathers.switch.slide";
121
/// Switch slide (disabled)
122
pub const SWITCH_SLIDE_DISABLED: &str = "feathers.switch.slide.disabled";
123
124