|
1 | 1 | { |
| 2 | + "$description": "DTCG 2025.10 compliant example. This file uses strict DTCG format without Variable Design Standard (VDS) extensions like modes in $value.", |
2 | 3 | "color": { |
3 | 4 | "base": { |
4 | 5 | "gray": { |
5 | 6 | "100": { |
6 | 7 | "$type": "color", |
7 | | - "$value": "#f5f5f5" |
| 8 | + "$value": { |
| 9 | + "colorSpace": "srgb", |
| 10 | + "components": [0.96, 0.96, 0.96], |
| 11 | + "hex": "#f5f5f5" |
| 12 | + } |
8 | 13 | }, |
9 | 14 | "900": { |
10 | 15 | "$type": "color", |
11 | | - "$value": "#1a1a1a" |
| 16 | + "$value": { |
| 17 | + "colorSpace": "srgb", |
| 18 | + "components": [0.1, 0.1, 0.1], |
| 19 | + "hex": "#1a1a1a" |
| 20 | + } |
12 | 21 | } |
13 | 22 | }, |
14 | 23 | "primary": { |
15 | 24 | "$type": "color", |
16 | | - "$value": "#0066cc" |
| 25 | + "$value": { |
| 26 | + "colorSpace": "srgb", |
| 27 | + "components": [0.278431, 0.388235, 0.74902], |
| 28 | + "hex": "#4763BF" |
| 29 | + }, |
| 30 | + "$extensions": { |
| 31 | + "com.variables-contract.version": "0.4.0" |
| 32 | + } |
| 33 | + }, |
| 34 | + "secondary": { |
| 35 | + "$type": "color", |
| 36 | + "$value": { |
| 37 | + "colorSpace": "srgb", |
| 38 | + "components": [0.4, 0.4, 0.4], |
| 39 | + "hex": "#666666" |
| 40 | + } |
17 | 41 | } |
18 | 42 | }, |
19 | 43 | "semantic": { |
20 | | - "$ref": "#/color/base", |
| 44 | + "$extends": "{color.base}", |
21 | 45 | "text": { |
22 | 46 | "primary": { |
23 | 47 | "$type": "color", |
24 | | - "$value": { |
25 | | - "light": "{color.base.gray.900}", |
26 | | - "dark": "{color.base.gray.100}" |
27 | | - } |
| 48 | + "$value": "{color.base.gray.900}" |
28 | 49 | }, |
29 | 50 | "secondary": { |
30 | 51 | "$type": "color", |
31 | | - "$value": { |
32 | | - "light": "#666666", |
33 | | - "dark": "#999999" |
34 | | - } |
| 52 | + "$value": "{color.base.secondary}" |
35 | 53 | } |
36 | 54 | }, |
37 | 55 | "surface": { |
38 | 56 | "default": { |
39 | 57 | "$type": "color", |
40 | 58 | "$value": { |
41 | | - "light": "#ffffff", |
42 | | - "dark": "#000000" |
| 59 | + "colorSpace": "srgb", |
| 60 | + "components": [1, 1, 1], |
| 61 | + "hex": "#ffffff" |
43 | 62 | } |
44 | 63 | } |
45 | 64 | } |
|
49 | 68 | "base": { |
50 | 69 | "small": { |
51 | 70 | "$type": "dimension", |
52 | | - "$value": "8px" |
| 71 | + "$value": { |
| 72 | + "value": 8, |
| 73 | + "unit": "px" |
| 74 | + } |
53 | 75 | }, |
54 | 76 | "medium": { |
55 | 77 | "$type": "dimension", |
56 | | - "$value": "16px" |
| 78 | + "$value": { |
| 79 | + "value": 16, |
| 80 | + "unit": "px" |
| 81 | + } |
57 | 82 | }, |
58 | 83 | "large": { |
59 | 84 | "$type": "dimension", |
60 | | - "$value": "24px" |
| 85 | + "$value": { |
| 86 | + "value": 24, |
| 87 | + "unit": "px" |
| 88 | + } |
61 | 89 | } |
62 | 90 | }, |
63 | 91 | "semantic": { |
|
80 | 108 | "primary": { |
81 | 109 | "$type": "fontFamily", |
82 | 110 | "$value": "Roboto" |
83 | | - }, |
84 | | - "secondary": { |
85 | | - "$type": "fontFamily", |
86 | | - "$value": ["Roboto", "Helvetica", "Arial", "sans-serif"] |
87 | 111 | } |
88 | 112 | }, |
89 | 113 | "weight": { |
|
99 | 123 | "size": { |
100 | 124 | "base": { |
101 | 125 | "$type": "dimension", |
102 | | - "$value": "16px" |
| 126 | + "$value": { |
| 127 | + "value": 16, |
| 128 | + "unit": "px" |
| 129 | + } |
103 | 130 | }, |
104 | 131 | "lg": { |
105 | 132 | "$type": "dimension", |
106 | | - "$value": "24px" |
| 133 | + "$value": { |
| 134 | + "value": 24, |
| 135 | + "unit": "px" |
| 136 | + } |
107 | 137 | } |
108 | 138 | } |
109 | 139 | }, |
110 | 140 | "duration": { |
111 | 141 | "fast": { |
112 | 142 | "$type": "duration", |
113 | | - "$value": "200ms" |
| 143 | + "$value": { |
| 144 | + "value": 200, |
| 145 | + "unit": "ms" |
| 146 | + } |
114 | 147 | }, |
115 | 148 | "slow": { |
116 | 149 | "$type": "duration", |
117 | | - "$value": "500ms" |
| 150 | + "$value": { |
| 151 | + "value": 500, |
| 152 | + "unit": "ms" |
| 153 | + } |
118 | 154 | } |
119 | 155 | }, |
120 | 156 | "easing": { |
|
131 | 167 | "default": { |
132 | 168 | "$type": "border", |
133 | 169 | "$value": { |
134 | | - "width": { "value": 1, "unit": "px" }, |
135 | | - "color": "#e0e0e0", |
| 170 | + "width": { |
| 171 | + "value": 1, |
| 172 | + "unit": "px" |
| 173 | + }, |
| 174 | + "color": { |
| 175 | + "colorSpace": "srgb", |
| 176 | + "components": [0.88, 0.88, 0.88], |
| 177 | + "hex": "#e0e0e0" |
| 178 | + }, |
136 | 179 | "style": "solid" |
137 | 180 | } |
138 | 181 | }, |
139 | 182 | "thick": { |
140 | 183 | "$type": "border", |
141 | 184 | "$value": { |
142 | | - "width": { "value": 2, "unit": "px" }, |
| 185 | + "width": { |
| 186 | + "value": 2, |
| 187 | + "unit": "px" |
| 188 | + }, |
143 | 189 | "color": "{color.semantic.text.secondary}", |
144 | 190 | "style": "solid" |
145 | 191 | } |
|
150 | 196 | "$type": "transition", |
151 | 197 | "$value": { |
152 | 198 | "duration": "{duration.fast}", |
153 | | - "delay": "0ms", |
| 199 | + "delay": { |
| 200 | + "value": 0, |
| 201 | + "unit": "ms" |
| 202 | + }, |
154 | 203 | "timingFunction": "{easing.default}" |
155 | 204 | } |
156 | 205 | } |
|
159 | 208 | "small": { |
160 | 209 | "$type": "shadow", |
161 | 210 | "$value": { |
162 | | - "color": "rgba(0, 0, 0, 0.1)", |
163 | | - "offsetX": { "value": 0, "unit": "px" }, |
164 | | - "offsetY": { "value": 2, "unit": "px" }, |
165 | | - "blur": { "value": 4, "unit": "px" }, |
166 | | - "spread": { "value": 0, "unit": "px" } |
| 211 | + "color": { |
| 212 | + "colorSpace": "srgb", |
| 213 | + "components": [0, 0, 0], |
| 214 | + "alpha": 0.1 |
| 215 | + }, |
| 216 | + "offsetX": { |
| 217 | + "value": 0, |
| 218 | + "unit": "px" |
| 219 | + }, |
| 220 | + "offsetY": { |
| 221 | + "value": 2, |
| 222 | + "unit": "px" |
| 223 | + }, |
| 224 | + "blur": { |
| 225 | + "value": 4, |
| 226 | + "unit": "px" |
| 227 | + }, |
| 228 | + "spread": { |
| 229 | + "value": 0, |
| 230 | + "unit": "px" |
| 231 | + } |
167 | 232 | } |
168 | 233 | }, |
169 | 234 | "large": { |
170 | 235 | "$type": "shadow", |
171 | 236 | "$value": { |
172 | | - "color": "rgba(0, 0, 0, 0.2)", |
173 | | - "offsetX": { "value": 0, "unit": "px" }, |
174 | | - "offsetY": { "value": 8, "unit": "px" }, |
175 | | - "blur": { "value": 16, "unit": "px" }, |
176 | | - "spread": { "value": 0, "unit": "px" } |
| 237 | + "color": { |
| 238 | + "colorSpace": "srgb", |
| 239 | + "components": [0, 0, 0], |
| 240 | + "alpha": 0.2 |
| 241 | + }, |
| 242 | + "offsetX": { |
| 243 | + "value": 0, |
| 244 | + "unit": "px" |
| 245 | + }, |
| 246 | + "offsetY": { |
| 247 | + "value": 8, |
| 248 | + "unit": "px" |
| 249 | + }, |
| 250 | + "blur": { |
| 251 | + "value": 16, |
| 252 | + "unit": "px" |
| 253 | + }, |
| 254 | + "spread": { |
| 255 | + "value": 0, |
| 256 | + "unit": "px" |
| 257 | + } |
177 | 258 | } |
178 | 259 | } |
179 | 260 | }, |
|
186 | 267 | "position": 0 |
187 | 268 | }, |
188 | 269 | { |
189 | | - "color": "#004499", |
| 270 | + "color": { |
| 271 | + "colorSpace": "srgb", |
| 272 | + "components": [0, 0.27, 0.6], |
| 273 | + "hex": "#004499" |
| 274 | + }, |
190 | 275 | "position": 1 |
191 | 276 | } |
192 | 277 | ] |
|
199 | 284 | "fontFamily": "{font.family.primary}", |
200 | 285 | "fontSize": "{font.size.lg}", |
201 | 286 | "fontWeight": "{font.weight.bold}", |
202 | | - "letterSpacing": { "value": 0, "unit": "px" }, |
| 287 | + "letterSpacing": { |
| 288 | + "value": 0, |
| 289 | + "unit": "px" |
| 290 | + }, |
203 | 291 | "lineHeight": 1.5 |
204 | 292 | } |
205 | 293 | }, |
|
209 | 297 | "fontFamily": "{font.family.primary}", |
210 | 298 | "fontSize": "{font.size.base}", |
211 | 299 | "fontWeight": "{font.weight.normal}", |
212 | | - "letterSpacing": { "value": 0, "unit": "px" }, |
| 300 | + "letterSpacing": { |
| 301 | + "value": 0, |
| 302 | + "unit": "px" |
| 303 | + }, |
213 | 304 | "lineHeight": 1.2 |
214 | 305 | } |
215 | 306 | } |
|
220 | 311 | "background": { |
221 | 312 | "default": { |
222 | 313 | "$type": "color", |
223 | | - "$value": { |
224 | | - "light": "{color.semantic.surface.default}", |
225 | | - "dark": "{color.semantic.surface.default}" |
226 | | - } |
| 314 | + "$value": "{color.semantic.surface.default}" |
227 | 315 | } |
228 | 316 | }, |
229 | 317 | "text": { |
230 | 318 | "default": { |
231 | 319 | "$type": "color", |
232 | | - "$value": { |
233 | | - "light": "{color.semantic.text.primary}", |
234 | | - "dark": "{color.semantic.text.primary}" |
235 | | - } |
| 320 | + "$value": "{color.semantic.text.primary}" |
236 | 321 | } |
237 | 322 | } |
238 | 323 | }, |
|
257 | 342 | } |
258 | 343 | } |
259 | 344 | } |
260 | | - |
|
0 commit comments