ShtukbaseStandard
страница пакета→ /design/keer-style/tokens.css

pages/design/keer-style/tokens.css

774 строки, 33.7 КБ. Открыть как есть (в проекте рядом лежат другие файлы, здесь их может не быть).

Файл как есть в пакете: код и комментарии в нём не переводятся.

  1. /* @tokens — the values file of the keer-style style: colors, sizes, shadows, fonts and motion are written here and only here.
  2. *
  3. * The style taken from the source app (packages/ui/src/styles/tokens.css, 28.11.2026).
  4. * Include it with <link rel="stylesheet" href="design/keer-style/tokens.css"> or @import in the CSS of the project.
  5. * Components and pages take only var(--ds-…). The norms KS-R01…KS-R03 let no raw colors,
  6. * own radii and own shadows anywhere except in files marked @tokens in the first lines.
  7. * The only source of values.
  8. *
  9. * Colors and sizes are written here and only here. The shadcn variables and the
  10. * Tailwind theme in keer-ui.css (the keer-ui package) only refer to these roles; components take
  11. * Tailwind classes or var(--ds-…). The style norms let no raw color
  12. * (hex, rgb, hsl, oklch) anywhere except this file.
  13. *
  14. * Two accepted themes:
  15. * draft: “Draft, graphite, champagne” (theme 1, the default);
  16. * grain: “Grain, white backing, gray panel” (theme 2).
  17. * The first block is all the tokens with the values of theme 1. The block [data-theme="grain"] below
  18. * overrides only what theme 2 differs in. A theme is turned on by the attribute
  19. * data-theme on <html> (or on any element, then it works inside it).
  20. * The style has no dark look. The block [data-theme="draft-dark"] at the end is the dark
  21. * variant of theme 1 of the source app for the “Draft” skin of the lenses (the kit-style package).
  22. *
  23. * Group markup: the line “@group <id> | <title>” opens a group,
  24. * the comment right above a declaration is its note. src/guards/token-sheet.ts
  25. * parses the file by this markup; a test checks that every token is in a group.
  26. */
  27. [data-theme],
  28. :root {
  29. color-scheme: light;
  30. /* @group colour/ink | Ink */
  31. /* A triple of channels: borders, hover fills and shadows are built from it with different transparency. */
  32. --ds-ink-rgb: 24 24 24;
  33. /* The strength of the hairline: all borders are counted from it. */
  34. --ds-hair-alpha: 0.1;
  35. /* @group colour/surface | Surfaces */
  36. --ds-bg: #fbfbfb;
  37. /* Cards, menus and dialogs lie on the same white paper: they are set apart by a shadow ring, not by another background. */
  38. --ds-bg-raised: #ffffff;
  39. /* The side panel and quiet backings: a warm, almost white. */
  40. --ds-bg-secondary: #f7f7f7;
  41. --ds-bg-tertiary: #efefef;
  42. /* The dark surface: the primary button and tooltips. Equal to the text color. */
  43. --ds-bg-inverse: #1f1f21;
  44. /* The table header. */
  45. --ds-bg-database-header: #ffffff;
  46. /* A table row under the pointer is opaque, so that it does not darken in sticky columns. */
  47. --ds-bg-record-hover: #f8f8f8;
  48. /* The input strip inside an open field. Semi-transparent: it tints the paper it lies on. */
  49. --ds-bg-field: transparent;
  50. /* The side panel: gray, noticeably darker than the backing. */
  51. --ds-bg-sidebar: #f0f0f0;
  52. /* The sheen of the side panel: a bit lighter at the top, darker toward the bottom, as in the mockup. */
  53. --ds-sidebar-sheen: linear-gradient(180deg, #f2f2f2, #eeeeee);
  54. /* The page header. */
  55. --ds-bg-topbar: #fbfbfb;
  56. /* The active item of the side menu: a flat white tile with a hairline edge, no shadow. */
  57. --ds-nav-active-bg: #ffffff;
  58. --ds-nav-active-ring: rgb(var(--ds-ink-rgb) / var(--ds-hair-alpha));
  59. /* The search field and the fields on a gray panel. */
  60. --ds-bg-field-lane: rgb(255 255 255 / 0.6);
  61. /* @group colour/wash | Hover and press */
  62. /* Hover is a warm semi-transparent fill, not a gray: over any background it reads as paper. */
  63. --ds-wash-hover: rgb(var(--ds-ink-rgb) / 0.04);
  64. --ds-wash-pressed: rgb(var(--ds-ink-rgb) / 0.08);
  65. /* The chosen item under the pointer: one and a half steps of the usual hover (0.05 × 1.5). */
  66. --ds-wash-selected-hover: rgb(var(--ds-ink-rgb) / 0.06);
  67. /* The side panel on its own gray background needs a stronger step. */
  68. --ds-wash-hover-lane: rgb(var(--ds-ink-rgb) / 0.05);
  69. /* @group colour/text | Text */
  70. --ds-text-primary: #1a1a1a;
  71. --ds-text-secondary: #606060;
  72. --ds-text-tertiary: #717171;
  73. --ds-text-disabled: #cacaca;
  74. /* The side panel text: its own ladder, on a gray background the main text is too heavy. */
  75. --ds-text-lane: #1a1a1a;
  76. --ds-text-lane-secondary: #606060;
  77. /* Text on a dark surface: not pure white but the same warm tone as the secondary background. */
  78. --ds-text-inverse: #ffffff;
  79. --ds-fg-on-accent: #ffffff;
  80. /* @group colour/mark | Icons */
  81. /* Icons have their own ladder, separate from text: these are the icon colors of a note-taking app. */
  82. --ds-mark-primary: #1a1a1a;
  83. --ds-mark-secondary: #606060;
  84. --ds-mark-tertiary: #9e9e9e;
  85. --ds-mark-disabled: #cacaca;
  86. /* @group colour/border | Borders */
  87. --ds-border-primary: rgb(var(--ds-ink-rgb) / var(--ds-hair-alpha));
  88. /* A divider inside a surface: one step quieter than the main border. */
  89. --ds-border-secondary: rgb(
  90. var(--ds-ink-rgb) /
  91. calc(var(--ds-hair-alpha) * 0.75)
  92. );
  93. /* The border of an input and of the “outline” button: one step more visible than the main one. */
  94. --ds-border-strong: rgb(
  95. var(--ds-ink-rgb) /
  96. calc(var(--ds-hair-alpha) * 1.73)
  97. );
  98. /* The focus ring: neutral, like ring in the shadcn theme. */
  99. --ds-ring: #9e9e9e;
  100. /* @group colour/accent | Accent */
  101. /* The accent is the same graphite as the primary button: the accepted themes have no colored accent. */
  102. --ds-accent: #1f1f21;
  103. --ds-accent-hover: #2e2e2e;
  104. --ds-accent-pressed: #101011;
  105. --ds-accent-soft: #efefef;
  106. /* @group colour/status | States */
  107. --ds-danger: #b5443d;
  108. /* Error text on a light red backing: the red --ds-danger is not readable on it. */
  109. --ds-danger-fg: #8a2a26;
  110. --ds-danger-bg: #f8eae8;
  111. --ds-warning: #8a5c0e;
  112. --ds-warning-bg: #f6eedb;
  113. --ds-success: #2f8f68;
  114. /* Waiting for a person's answer: yellow, so that the request to act looks neither like an alarm nor like a link. */
  115. --ds-needs-you: #bda27c;
  116. --ds-info: #606060;
  117. --ds-info-bg: #efefef;
  118. /* Text on a state color fill (success, warning, info). */
  119. --ds-fg-on-status: #ffffff;
  120. /* @group colour/tone | State badges */
  121. /* “Text on backing” pairs for short badges (the status of a lead, of a task). */
  122. --ds-tone-blue-fg: #3f5878;
  123. --ds-tone-blue-bg: #ecf0f5;
  124. --ds-tone-green-fg: #1d5c41;
  125. --ds-tone-green-bg: #e8f3ed;
  126. --ds-tone-amber-fg: #6a583d;
  127. --ds-tone-amber-bg: #f6f0e4;
  128. --ds-tone-red-fg: #8a2a26;
  129. --ds-tone-red-bg: #f8eae8;
  130. /* A calm badge with no tone: “running”, “queued”. */
  131. --ds-tone-neutral-fg: #606060;
  132. --ds-tone-neutral-bg: #efefef;
  133. /* @group colour/metal | Champagne and white gold */
  134. /* The crosshair of the frame and thin accents. */
  135. --ds-champagne: #b9b4a2;
  136. /* The hairline light rim of the primary button. */
  137. --ds-button-rim: rgb(255 255 255 / 0.1);
  138. /* The shine along the top edge of the primary button. */
  139. --ds-button-highlight: rgb(255 255 255 / 0.16);
  140. /* A light edge along the inner rim of the card: the paper is slightly raised. */
  141. --ds-card-highlight: rgb(255 255 255 / 0.9);
  142. /* The dark button: a light tone transition from top to bottom, lighter at the top edge, deeper toward the bottom. */
  143. --ds-button-gradient: linear-gradient(
  144. 180deg,
  145. #3e3e40,
  146. var(--ds-bg-inverse) 58%,
  147. #1b1b1d
  148. );
  149. /* The same button under the pointer: the whole transition is one step lighter. */
  150. --ds-button-gradient-hover: linear-gradient(
  151. 180deg,
  152. #505052,
  153. #2c2c2e 58%,
  154. var(--ds-bg-inverse)
  155. );
  156. /* The edge of the assistant output block: a calm white gold. */
  157. --ds-copilot-edge-1: #f1efe8;
  158. --ds-copilot-edge-2: #d3cfc1;
  159. --ds-copilot-edge-3: #fbfaf6;
  160. --ds-copilot-edge-4: #c4bfae;
  161. --ds-copilot-edge: linear-gradient(
  162. 135deg,
  163. var(--ds-copilot-edge-1),
  164. var(--ds-copilot-edge-2),
  165. var(--ds-copilot-edge-3),
  166. var(--ds-copilot-edge-4),
  167. var(--ds-copilot-edge-1)
  168. );
  169. /* The edge of the request line while a task runs: the “White gold” shine (the owner's choice of 26.11.2026). */
  170. --ds-rim-1: #e6dec6;
  171. --ds-rim-2: #a99b70;
  172. --ds-rim-3: #f6f1e0;
  173. --ds-rim-4: #8f8259;
  174. /* The rim width: 1.5 px × 0.6 (“Narrow”). */
  175. --ds-rim-width: 0.9px;
  176. /* One pass of the shine from corner to corner and back (“Faster”: the source time). */
  177. --ds-rim-duration: 14s;
  178. /* The rim goes beyond the card border by its thickness. */
  179. --ds-rim-inset: -1px;
  180. /* The shine field is three times the card: the shine travels along it. */
  181. --ds-rim-field-size: 300% 300%;
  182. --ds-rim-field-start: 0% 0%;
  183. --ds-rim-field-end: 100% 100%;
  184. /* The rim mask: only a strip of the width `--ds-rim-width` is visible. The mask color is opacity, not a theme color; common to all themes. */
  185. --ds-rim-mask-webkit:
  186. linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  187. --ds-rim-mask:
  188. linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  189. --ds-rim-opacity-off: 0;
  190. --ds-rim-opacity-on: 1;
  191. --ds-rim-fade: opacity 0.6s ease;
  192. /* The edge of the assistant output: a transparent border under which the shimmer is visible. */
  193. --ds-copilot-edge-border: 1px solid transparent;
  194. /* @group colour/option | Option colors */
  195. /* Option colors in the “choice” fields of a table. The backings are semi-transparent: they lie on a white row and on a highlighted one. */
  196. --ds-option-gray-bg: rgba(28, 19, 1, 0.11);
  197. --ds-option-gray-fg: #494846;
  198. --ds-option-gray-dot: #8e8b87;
  199. --ds-option-brown-bg: rgba(127, 51, 0, 0.157);
  200. --ds-option-brown-fg: #584437;
  201. --ds-option-brown-dot: #9f6b53;
  202. --ds-option-orange-bg: rgba(196, 88, 0, 0.204);
  203. --ds-option-orange-fg: #6a4222;
  204. --ds-option-orange-dot: #d9730d;
  205. --ds-option-yellow-bg: rgba(209, 156, 0, 0.282);
  206. --ds-option-yellow-fg: #655121;
  207. --ds-option-yellow-dot: #cb912f;
  208. --ds-option-green-bg: rgba(0, 96, 38, 0.157);
  209. --ds-option-green-fg: #2a533c;
  210. --ds-option-green-dot: #448361;
  211. --ds-option-blue-bg: rgba(0, 118, 217, 0.204);
  212. --ds-option-blue-fg: #264a72;
  213. --ds-option-blue-dot: #337ea9;
  214. --ds-option-purple-bg: rgba(92, 0, 163, 0.14);
  215. --ds-option-purple-fg: #553b69;
  216. --ds-option-purple-dot: #9065b0;
  217. --ds-option-pink-bg: rgba(183, 0, 78, 0.153);
  218. --ds-option-pink-fg: #68354e;
  219. --ds-option-pink-dot: #c14c8a;
  220. --ds-option-red-bg: rgba(206, 24, 0, 0.165);
  221. --ds-option-red-fg: #6d3531;
  222. --ds-option-red-dot: #d44c47;
  223. /* @group colour/chat | Chat */
  224. /* A person's message is ivory, opaque and independent of hover. */
  225. --ds-chat-bubble-bg: #f7f7f7;
  226. /* @group colour/overlay | Backings over the page */
  227. /* The dimming under a dialog. */
  228. --ds-backdrop: rgb(var(--ds-ink-rgb) / 0.36);
  229. /* A light dimming under a side panel or a search. */
  230. --ds-backdrop-light: rgb(var(--ds-ink-rgb) / 0.16);
  231. /* Semi-transparent paper over the content while it loads. */
  232. --ds-veil: rgb(255 255 255 / 0.78);
  233. /* The scroll thumb: shown only under the pointer. */
  234. --ds-scrollbar-thumb: rgb(var(--ds-ink-rgb) / 0.24);
  235. /* @group colour/shadow-ink | Shadow ink */
  236. /* The ring is a hairline; the shadow drops are barely visible: the accepted themes have no volume. */
  237. --ds-elevation-ring: rgb(var(--ds-ink-rgb) / var(--ds-hair-alpha));
  238. --ds-shadow-control-ink-1: rgb(28 30 33 / 0.035);
  239. --ds-shadow-soft-ink-1: rgb(28 30 33 / 0.025);
  240. --ds-shadow-soft-ink-2: rgb(28 30 33 / 0.05);
  241. --ds-shadow-popover-ink-1: rgb(28 30 33 / 0.05);
  242. --ds-shadow-popover-ink-2: rgb(28 30 33 / 0.16);
  243. --ds-shadow-overlay-ink-1: rgb(28 30 33 / 0.05);
  244. --ds-shadow-overlay-ink-2: rgb(28 30 33 / 0.26);
  245. --ds-shadow-overlay-ink-3: rgb(28 30 33 / 0.08);
  246. --ds-shadow-primary-ink-1: rgb(var(--ds-ink-rgb) / 0.24);
  247. --ds-shadow-primary-ink-2: rgb(var(--ds-ink-rgb) / 0.32);
  248. /* The dark edge around the primary button. */
  249. --ds-shadow-primary-edge: #161617;
  250. /* @group colour/role | Roles (references to the values above) */
  251. --ds-fg: var(--ds-text-primary);
  252. --ds-fg-muted: var(--ds-text-secondary);
  253. --ds-icon: var(--ds-mark-tertiary);
  254. --ds-bg-hover: var(--ds-wash-hover);
  255. --ds-menu-colour: var(--ds-bg-raised);
  256. --ds-chat-bubble-fg: var(--ds-fg);
  257. /* A tile button on a row: a 5% step toward the ink from the hover background. */
  258. --ds-bg-control-hover: color-mix(
  259. in srgb,
  260. var(--ds-bg-hover) 95%,
  261. var(--ds-fg) 5%
  262. );
  263. --ds-link-underline: var(--ds-border-strong);
  264. /* Chart series are taken from the option dots: a chart and a badge in a table speak in one color. */
  265. --ds-chart-series-1: var(--ds-accent);
  266. --ds-chart-series-2: var(--ds-option-orange-dot);
  267. --ds-chart-series-3: var(--ds-option-purple-dot);
  268. --ds-chart-series-4: var(--ds-option-green-dot);
  269. --ds-chart-series-5: var(--ds-option-pink-dot);
  270. /* @group type/family | Fonts */
  271. /* Geist is the interface font of the accepted themes; next is the system set for when the font is not loaded. */
  272. --ds-font-sans:
  273. "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif,
  274. "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  275. --ds-font-mono:
  276. "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
  277. "Liberation Mono", "Courier New", monospace;
  278. /* The assistant voice: the conclusion and the outcome are set in a serif. */
  279. --ds-font-serif:
  280. "Source Serif 4", "Iowan Old Style", "Charter", Georgia, serif;
  281. /* @group type/weight | Weight */
  282. --ds-font-weight-regular: 400;
  283. /* Book: items of the side menu. */
  284. --ds-font-weight-book: 450;
  285. --ds-font-weight-medium: 500;
  286. /* Dense: the active menu item, the name in the panel footer. */
  287. --ds-font-weight-strong: 550;
  288. --ds-font-weight-semibold: 600;
  289. --ds-font-weight-bold: 700;
  290. /* @group type/scale | Font size and line height */
  291. /* “Font size / line” pairs in pixels: the line is measured on the grid, not with a multiplier. */
  292. --ds-font-ui-small-size: 12px;
  293. --ds-line-ui-small: 16px;
  294. /* The main interface text. */
  295. --ds-font-ui-size: 14px;
  296. --ds-line-ui: 20px;
  297. /* The field caption: the line equals the font size. */
  298. --ds-line-ui-label: 14px;
  299. /* Codes and numbers: a tax id, an article number, a purchase number. */
  300. --ds-font-code-size: 13px;
  301. --ds-line-code: 20px;
  302. /* Chat and the input field: their own reading size, not the page one. */
  303. --ds-font-editor-size: 14px;
  304. --ds-line-editor: 21px;
  305. /* Page reading: 16px with a line of 1.5, measured from a note-taking app page. */
  306. --ds-font-page-reading-size: 16px;
  307. --ds-line-page-reading: 24px;
  308. --ds-font-heading-6-size: 14px;
  309. --ds-line-heading-6: 22px;
  310. --ds-font-heading-5-size: 16px;
  311. --ds-line-heading-5: 24px;
  312. --ds-font-heading-4-size: 18px;
  313. --ds-line-heading-4: 28px;
  314. --ds-font-heading-3-size: 20px;
  315. --ds-line-heading-3: 28px;
  316. --ds-font-heading-2-size: 24px;
  317. --ds-line-heading-2: 32px;
  318. --ds-font-heading-1-size: 31px;
  319. --ds-line-heading-1: 36px;
  320. --ds-font-page-title-size: 40px;
  321. --ds-line-page-title: 48px;
  322. /* The document font size is not the reading size: unstyled text inherits it, and 1rem is counted from it. */
  323. --ds-font-root-size: 16px;
  324. --ds-line-root: 24px;
  325. /* A field under a finger is no smaller than 16px: otherwise iOS zooms the page on focus. This is a platform number, not a choice. */
  326. --ds-font-field-touch-size: 16px;
  327. /* The font size that the field would inherit from its parent. */
  328. --ds-font-size-inherited: 1em;
  329. /* A state badge and the function choice under the request line: between the caption and the main text. */
  330. --ds-font-chip-size: 12.5px;
  331. --ds-line-chip: 18px;
  332. /* A list row: the title and the description in cards, a task example, a choice option. */
  333. --ds-font-row-size: 13.5px;
  334. --ds-line-row: 20px;
  335. /* A side menu item. */
  336. --ds-font-nav-size: 14.5px;
  337. --ds-line-nav: 21px;
  338. /* The product name in the header of the side panel. */
  339. --ds-font-brand-size: 15.5px;
  340. --ds-line-brand: 18px;
  341. /* The name in the footer of the side panel is smaller than a menu item. */
  342. --ds-font-account-size: 13px;
  343. --ds-line-account: 16px;
  344. /* The request line field: larger than the main text, it is the main input of the screen. */
  345. --ds-font-composer-size: 17px;
  346. --ds-line-composer: 24px;
  347. /* The assistant voice: a conclusion and an outcome in a serif, denser than the heading. */
  348. --ds-font-voice-size: 19.5px;
  349. --ds-line-voice: 28px;
  350. /* @group type/line | Special lines */
  351. /* A line exactly the height of the text: for an icon or a single glyph that needs no line height. */
  352. --ds-line-none: 1;
  353. --ds-line-ui-compact: 18px;
  354. --ds-line-ui-relaxed: 1.4;
  355. /* @group type/tracking | Letter spacing */
  356. --ds-letter-spacing-title: -0.01em;
  357. /* The product name: denser than the heading. */
  358. --ds-letter-spacing-brand: -0.02em;
  359. /* The page heading: the large font size is set tighter. */
  360. --ds-letter-spacing-page-title: -0.035em;
  361. /* The main interface text: barely noticeably tighter. */
  362. --ds-letter-spacing-ui: -0.008em;
  363. /* Uppercase captions: spaced out a little. */
  364. --ds-letter-spacing-label: 0.06em;
  365. /* @group type/overline | Uppercase captions */
  366. /* A caption above a value, a menu group heading and a table header: in theme 1 they are monospaced uppercase. */
  367. --ds-overline-font: var(--ds-font-mono);
  368. --ds-overline-size: 11px;
  369. --ds-overline-tracking: 0.05em;
  370. --ds-overline-transform: uppercase;
  371. /* Counters in menus and tabs. */
  372. --ds-count-font: var(--ds-font-mono);
  373. /* @group space | Spacing */
  374. /* The step is 4px; quarter steps are for measured dense geometry. Tailwind counts its --spacing from --ds-space-1, so p-2.5 is --ds-space-2-5. */
  375. --ds-space-0-25: 1px;
  376. --ds-space-0-5: 2px;
  377. --ds-space-0-75: 3px;
  378. --ds-space-1: 4px;
  379. --ds-space-1-25: 5px;
  380. --ds-space-1-5: 6px;
  381. --ds-space-1-75: 7px;
  382. --ds-space-2: 8px;
  383. --ds-space-2-5: 10px;
  384. --ds-space-3: 12px;
  385. --ds-space-3-5: 14px;
  386. --ds-space-4: 16px;
  387. --ds-space-4-5: 18px;
  388. --ds-space-5: 20px;
  389. --ds-space-6: 24px;
  390. --ds-space-7: 28px;
  391. --ds-space-7-5: 30px;
  392. --ds-space-8: 32px;
  393. --ds-space-9: 36px;
  394. --ds-space-10: 40px;
  395. --ds-space-12: 48px;
  396. --ds-space-14: 56px;
  397. --ds-space-20: 80px;
  398. --ds-space-24: 96px;
  399. /* @group radius | Radii */
  400. --ds-radius-xs: 4px;
  401. /* Buttons and fields. */
  402. --ds-radius-sm: 5px;
  403. /* Menus, cards, the usual shadcn --radius. */
  404. --ds-radius-md: 6px;
  405. /* Large surfaces: a panel, a dialog. There is nothing larger than 12px in the design code. */
  406. --ds-radius-lg: 8px;
  407. /* Cards. */
  408. --ds-radius-xl: 8px;
  409. --ds-radius-round: 9999px;
  410. /* @group shadow | Shadows */
  411. /* A shadow only for what floats: menus, dialogs, floating buttons. The drops are lighter in strength than in a note-taking app, because the edges are drawn by a ring and our geometry is denser. */
  412. --ds-shadow-control: 0 1px 2px 0 var(--ds-shadow-control-ink-1);
  413. /* The card: the edge is drawn by a hairline border, the drop is barely visible. */
  414. --ds-shadow-soft:
  415. 0 1px 1px 0 var(--ds-shadow-soft-ink-1),
  416. 0 4px 10px -4px var(--ds-shadow-soft-ink-2);
  417. /* One 1px ring ends the shadow of a popup surface: we do not draw a border over it, otherwise the edge doubles. */
  418. --ds-shadow-popover:
  419. 0 2px 6px 0 var(--ds-shadow-popover-ink-1),
  420. 0 12px 28px -12px var(--ds-shadow-popover-ink-2);
  421. /* A panel or a dialog over the page, a floating action bar. */
  422. --ds-shadow-overlay:
  423. 0 0 0 1px var(--ds-shadow-overlay-ink-3),
  424. 0 2px 6px 0 var(--ds-shadow-overlay-ink-1),
  425. 0 28px 56px -18px var(--ds-shadow-overlay-ink-2);
  426. /* The primary button: one thin light edge on top, a hairline rim inside and a soft shadow below. There is no dark edge outside: no double rim is visible. */
  427. --ds-shadow-primary:
  428. inset 0 1px 0 0 var(--ds-button-highlight),
  429. inset 0 0 0 1px var(--ds-button-rim),
  430. 0 1px 2px 0 var(--ds-shadow-primary-ink-1),
  431. 0 4px 10px -6px var(--ds-shadow-primary-ink-2);
  432. /* A hairline edge inside: a segmented panel, a quiet backing. */
  433. --ds-shadow-hair: inset 0 0 0 1px var(--ds-border-primary);
  434. /* An edge one step more visible: the choice button under the request line. */
  435. --ds-shadow-hair-strong: inset 0 0 0 1px var(--ds-border-strong);
  436. /* The chosen choice button: the edge is darker, so that the choice reads without color. */
  437. --ds-shadow-hair-pressed: inset 0 0 0 1px rgb(var(--ds-ink-rgb) / 0.28);
  438. /* The primary button at the moment of pressing: pushed in, the shadow goes inside. */
  439. --ds-shadow-primary-pressed: inset 0 1px 2px 0 var(--ds-shadow-primary-ink-2);
  440. /* A card on the page backing: a light edge inside, a hairline rim and a soft shadow below instead of a border. */
  441. --ds-shadow-card:
  442. inset 0 0 0 1px var(--ds-card-highlight),
  443. 0 0 0 1px var(--ds-border-primary),
  444. 0 2px 3px 0 rgb(var(--ds-ink-rgb) / 0.03),
  445. 0 14px 28px -18px rgb(var(--ds-ink-rgb) / 0.14);
  446. /* The active tab and a tile on a gray strip. */
  447. --ds-shadow-tile:
  448. 0 0 0 1px var(--ds-elevation-ring),
  449. 0 1px 2px 0 var(--ds-shadow-control-ink-1);
  450. /* @group border | Border thickness */
  451. --ds-border-width: 1px;
  452. /* The insertion line while dragging. */
  453. --ds-drop-line-thickness: 3px;
  454. /* @group focus | Focus ring */
  455. /* One thickness and one color for everything the keyboard reaches. Outside if there is room around; inward (inset) if the element is pressed to an edge where an outer ring would fall off. */
  456. --ds-focus-ring-width: var(--ds-space-0-5);
  457. --ds-focus-ring-colour: var(--ds-ring);
  458. --ds-focus-ring: var(--ds-focus-ring-width) solid var(--ds-focus-ring-colour);
  459. --ds-focus-ring-offset: var(--ds-space-0-5);
  460. --ds-focus-ring-inset: inset 0 0 0 var(--ds-focus-ring-width)
  461. var(--ds-focus-ring-colour);
  462. /* @group control | Control sizes */
  463. /* A button and a field are 32px. */
  464. --ds-control-height: var(--ds-space-9);
  465. /* An icon button and the table toolbar buttons are 28px. */
  466. --ds-control-height-sm: var(--ds-space-8);
  467. /* A menu item. */
  468. --ds-menu-item-height: var(--ds-space-7-5);
  469. --ds-menu-padding: var(--ds-space-1-5);
  470. --ds-menu-item-radius: var(--ds-space-1-75);
  471. /* An option badge (a status) in a row. */
  472. --ds-chip-height: var(--ds-space-5);
  473. /* A finger cannot hit anything smaller than 44px. */
  474. --ds-touch-target: 44px;
  475. --ds-tooltip-max-width: 220px;
  476. /* The line measure of the main text: ~80 characters, the reading norm is up to 90. */
  477. --ds-reading-measure: 75ch;
  478. /* A disabled element. */
  479. --ds-disabled-opacity: 0.42;
  480. /* @group table | Table density */
  481. --ds-database-header-height: var(--ds-space-9);
  482. --ds-database-row-height: 52px;
  483. --ds-database-cell-padding-inline: var(--ds-space-2);
  484. --ds-database-cell-padding-block: var(--ds-space-1-5);
  485. --ds-database-toolbar-height: var(--ds-space-10);
  486. --ds-database-header-ink: var(--ds-text-tertiary);
  487. --ds-database-header-weight: var(--ds-font-weight-medium);
  488. --ds-database-header-font: var(--ds-overline-font);
  489. --ds-database-header-size: var(--ds-overline-size);
  490. --ds-database-header-tracking: var(--ds-overline-tracking);
  491. --ds-database-header-transform: var(--ds-overline-transform);
  492. --ds-database-grid-line: var(--ds-border-primary);
  493. --ds-database-grid-line-width: var(--ds-border-width);
  494. /* The row-select checkbox. */
  495. --ds-database-checkbox-size: var(--ds-space-4);
  496. /* An opened row of a wide table: no wider than the visible area of the scroll container. */
  497. --ds-table-view-width: 100cqw;
  498. /* A “caption: value” row: a caption column up to 12rem and a field. */
  499. --ds-grid-label-field: minmax(0, 12rem) minmax(0, 1fr);
  500. /* A list row: a stretching text and an action on the right at its own width. */
  501. --ds-grid-main-aside: minmax(0, 1fr) auto;
  502. /* A “badge: text” row: a short badge (time, date) at its own width and a stretching text. */
  503. --ds-grid-aside-main: auto minmax(0, 1fr);
  504. /* A list table with two numbers: a title, a short number, a long number. */
  505. --ds-grid-figures: minmax(0, 1fr) 3rem 6rem;
  506. /* The same on a wide screen plus a column of a link or an address. */
  507. --ds-grid-figures-wide: minmax(0, 1fr) 3rem 7rem minmax(0, 9rem);
  508. /* A list table with two equal columns of values (for example, two search engines). */
  509. --ds-grid-pair-values: minmax(0, 1fr) 6rem 6rem;
  510. /* A “value: change” cell: a number on the right and a change badge of constant width. */
  511. --ds-grid-value-delta: minmax(0, 1fr) 2.25rem;
  512. /* @group frame | Page frame */
  513. --ds-sidebar-width: 240px;
  514. /* A collapsed panel is a strip of icons: the sign and the icons stand on one axis in the middle. */
  515. --ds-sidebar-width-icon: 60px;
  516. --ds-topbar-height: 58px;
  517. /* Page content padding. */
  518. --ds-page-gutter: var(--ds-space-7);
  519. /* The sign-in form column (scr-login): 360px, the same for all themes. */
  520. --ds-login-form-width: calc(var(--ds-space-24) * 3.75);
  521. /* Frame lines: the panel edge, the bottom of the header, the rule under the page heading. */
  522. --ds-frame-line: var(--ds-border-strong);
  523. /* The line under the product name in the side panel: it continues the line under the header. */
  524. --ds-frame-brand-line: var(--ds-frame-line);
  525. /* A crosshair where the frame lines meet. Zero in a theme without a frame. */
  526. --ds-frame-cross-size: 17px;
  527. --ds-frame-cross-colour: var(--ds-champagne);
  528. --ds-frame-cross:
  529. linear-gradient(var(--ds-frame-cross-colour), var(--ds-frame-cross-colour))
  530. center / 1px 100% no-repeat,
  531. linear-gradient(var(--ds-frame-cross-colour), var(--ds-frame-cross-colour))
  532. center / 100% 1px no-repeat;
  533. /* Blurring of the content under the semi-transparent header. */
  534. --ds-topbar-blur: none;
  535. /* @group canvas | Backing */
  536. /* The backing is flat, with no gradient. The pattern (dots) and the grain are only in theme 2. */
  537. --ds-canvas-pattern: none;
  538. --ds-canvas-dot: rgb(22 22 24 / 0.115);
  539. --ds-canvas-step: 20px;
  540. --ds-canvas-offset: 10px;
  541. /* A fine noise: it lies on the backing, the panel and the header; cards stay clean. */
  542. --ds-grain-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.6 0 0 0 -1.05'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  543. --ds-grain-size: 128px;
  544. --ds-grain-opacity: 0;
  545. /* @group chat | Chat */
  546. /* A person's message is no wider than 80% of the feed. */
  547. --ds-chat-user-max-width: 80%;
  548. --ds-composer-radius: 8px;
  549. /* The input field grows to this height, then it scrolls. */
  550. --ds-composer-body-max-height: 184px;
  551. --ds-composer-control-height: var(--ds-space-7-5);
  552. --ds-chat-context-chip-max-width: 160px;
  553. /* @group motion | Motion */
  554. /* The delay before showing the wait: a quick answer does not flash an indicator. */
  555. --ds-wait-appear-delay: 300ms;
  556. --ds-motion-instant: 100ms;
  557. --ds-motion-quick: 150ms;
  558. --ds-motion-lane: 200ms;
  559. --ds-motion-enter: cubic-bezier(0, 0, 0.58, 1);
  560. --ds-motion-exit: cubic-bezier(0.42, 0, 1, 1);
  561. --ds-motion-move: cubic-bezier(0.45, 0, 0.55, 1);
  562. --ds-transition: var(--ds-motion-instant) var(--ds-motion-move);
  563. /* Collapsing the side panel and sliding out the message panel: calm, slowing toward the end, with no bounce. */
  564. --ds-motion-panel: 280ms;
  565. --ds-motion-panel-ease: cubic-bezier(0.32, 0.72, 0.24, 1);
  566. /* Captions in a collapsing panel fade faster than the panel narrows: the text does not get squeezed. */
  567. --ds-motion-fade: 140ms;
  568. /* Starting a task (View Transitions): the request line moves into the task screen, the screen changes by cross-fade. */
  569. --ds-motion-request-move: 300ms;
  570. --ds-motion-request-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  571. --ds-motion-request-out: 120ms;
  572. --ds-motion-request-in: 160ms;
  573. --ds-motion-request-in-delay: 60ms;
  574. --ds-motion-page-swap: 200ms;
  575. --ds-motion-page-ease: cubic-bezier(0.3, 0, 0.3, 1);
  576. /* Opacity at the start and end of the screen cross-fade. */
  577. --ds-motion-page-opacity-gone: 0;
  578. /* The snapshot of the request line during the move takes the whole height of the shared element. */
  579. --ds-motion-request-snapshot-height: 100%;
  580. /* The step of the appearance of the sign-in screen parts: each next one starts this much later. */
  581. --ds-login-stagger: 40ms;
  582. /* @group scrollbar | Scrolling */
  583. --ds-scrollbar-width: thin;
  584. --ds-scrollbar-track: transparent;
  585. /* At rest the thumb is not visible; it is shown under the pointer. */
  586. --ds-scrollbar-thumb-rest: transparent;
  587. }
  588. /*
  589. * Theme 2: “Grain, white backing, gray panel”.
  590. * Only the differences from theme 1; everything else is inherited from the block above.
  591. */
  592. [data-theme="grain"] {
  593. --ds-ink-rgb: 22 22 24;
  594. --ds-hair-alpha: 0.075;
  595. --ds-bg: #ffffff;
  596. --ds-bg-sidebar: #f9f9fa;
  597. --ds-sidebar-sheen: none;
  598. --ds-bg-topbar: rgb(255 255 255 / 0.8);
  599. --ds-topbar-blur: blur(18px) saturate(1.4);
  600. /* The active menu item is a gray fill without an edge. */
  601. --ds-nav-active-bg: rgb(var(--ds-ink-rgb) / 0.07);
  602. --ds-nav-active-ring: transparent;
  603. --ds-bg-field-lane: #ffffff;
  604. --ds-text-primary: #18181a;
  605. --ds-text-secondary: #55565b;
  606. --ds-text-tertiary: #737479;
  607. --ds-text-disabled: #bfc0c4;
  608. --ds-text-lane: #18181a;
  609. --ds-text-lane-secondary: #55565b;
  610. --ds-mark-primary: #18181a;
  611. --ds-mark-secondary: #55565b;
  612. --ds-mark-tertiary: #8b8c91;
  613. --ds-mark-disabled: #bfc0c4;
  614. --ds-ring: #8b8c91;
  615. --ds-info: #55565b;
  616. --ds-tone-neutral-fg: #55565b;
  617. /* “Clarify” is amber instead of champagne. */
  618. --ds-needs-you: #c98d33;
  619. --ds-tone-amber-fg: #7c5612;
  620. --ds-tone-amber-bg: #f7efdf;
  621. /* The rim of the primary button is a neutral light. */
  622. --ds-button-rim: rgb(255 255 255 / 0.1);
  623. --ds-button-highlight: rgb(255 255 255 / 0.16);
  624. /* Uppercase captions and the table header are in the regular font. */
  625. --ds-overline-font: var(--ds-font-sans);
  626. --ds-overline-size: 11px;
  627. --ds-overline-tracking: 0.07em;
  628. --ds-database-header-size: 11.5px;
  629. --ds-database-header-tracking: 0;
  630. --ds-database-header-transform: none;
  631. --ds-count-font: var(--ds-font-sans);
  632. --ds-sidebar-width: 224px;
  633. --ds-topbar-height: 50px;
  634. /* There is no frame of lines: the panel and the header are separated by a hairline, there are no crosshairs. */
  635. --ds-frame-line: var(--ds-border-primary);
  636. --ds-frame-brand-line: transparent;
  637. --ds-frame-cross-size: 0px;
  638. --ds-frame-cross-colour: transparent;
  639. --ds-canvas-pattern: radial-gradient(
  640. circle,
  641. var(--ds-canvas-dot) 1px,
  642. transparent 1.3px
  643. );
  644. --ds-grain-opacity: 0.023;
  645. }
  646. /*
  647. * The dark variant of theme 1 is draft-dark, as in the source app
  648. * (packages/ui/src/styles/themes.css, 28.11.2026). The style pages do not turn it on themselves:
  649. * the “Draft” skin of the kit-style package takes it for the dark theme of the lenses. Only the differences from theme 1.
  650. */
  651. [data-theme="draft-dark"] {
  652. color-scheme: dark;
  653. --ds-ink-rgb: 240 234 220;
  654. --ds-hair-alpha: 0.12;
  655. --ds-bg: #222221;
  656. --ds-bg-raised: #2f2e2c;
  657. --ds-bg-secondary: #292826;
  658. --ds-bg-tertiary: #3a3937;
  659. --ds-bg-sidebar: #1c1c1b;
  660. --ds-text-primary: #f4f1e9;
  661. --ds-text-secondary: #cdc9be;
  662. --ds-text-tertiary: #a09c90;
  663. --ds-text-disabled: #68655c;
  664. --ds-text-inverse: #1f1e1b;
  665. --ds-mark-primary: var(--ds-text-primary);
  666. --ds-mark-secondary: var(--ds-text-secondary);
  667. --ds-mark-tertiary: var(--ds-text-tertiary);
  668. --ds-mark-disabled: var(--ds-text-disabled);
  669. --ds-champagne: #a8925f;
  670. --ds-accent: #d0c19c;
  671. --ds-accent-soft: color-mix(in srgb, var(--ds-accent) 14%, transparent);
  672. --ds-card-highlight: rgb(255 255 255 / 0.03);
  673. /* Options: the dot is the same, the text and the fill are derived from it. */
  674. --ds-option-gray-fg: color-mix(in srgb, var(--ds-option-gray-dot) 45%, #ffffff);
  675. --ds-option-gray-bg: color-mix(in srgb, var(--ds-option-gray-dot) 24%, transparent);
  676. --ds-option-brown-fg: color-mix(in srgb, var(--ds-option-brown-dot) 45%, #ffffff);
  677. --ds-option-brown-bg: color-mix(in srgb, var(--ds-option-brown-dot) 24%, transparent);
  678. --ds-option-orange-fg: color-mix(in srgb, var(--ds-option-orange-dot) 45%, #ffffff);
  679. --ds-option-orange-bg: color-mix(in srgb, var(--ds-option-orange-dot) 24%, transparent);
  680. --ds-option-yellow-fg: color-mix(in srgb, var(--ds-option-yellow-dot) 45%, #ffffff);
  681. --ds-option-yellow-bg: color-mix(in srgb, var(--ds-option-yellow-dot) 24%, transparent);
  682. --ds-option-green-fg: color-mix(in srgb, var(--ds-option-green-dot) 45%, #ffffff);
  683. --ds-option-green-bg: color-mix(in srgb, var(--ds-option-green-dot) 24%, transparent);
  684. --ds-option-blue-fg: color-mix(in srgb, var(--ds-option-blue-dot) 45%, #ffffff);
  685. --ds-option-blue-bg: color-mix(in srgb, var(--ds-option-blue-dot) 24%, transparent);
  686. --ds-option-purple-fg: color-mix(in srgb, var(--ds-option-purple-dot) 45%, #ffffff);
  687. --ds-option-purple-bg: color-mix(in srgb, var(--ds-option-purple-dot) 24%, transparent);
  688. --ds-option-pink-fg: color-mix(in srgb, var(--ds-option-pink-dot) 45%, #ffffff);
  689. --ds-option-pink-bg: color-mix(in srgb, var(--ds-option-pink-dot) 24%, transparent);
  690. --ds-option-red-fg: color-mix(in srgb, var(--ds-option-red-dot) 45%, #ffffff);
  691. --ds-option-red-bg: color-mix(in srgb, var(--ds-option-red-dot) 24%, transparent);
  692. /* Shadows on dark are black and denser. */
  693. --ds-shadow-control-ink-1: rgb(0 0 0 / 0.25);
  694. --ds-shadow-soft-ink-1: rgb(0 0 0 / 0.2);
  695. --ds-shadow-soft-ink-2: rgb(0 0 0 / 0.3);
  696. --ds-shadow-popover-ink-1: rgb(0 0 0 / 0.3);
  697. --ds-shadow-popover-ink-2: rgb(0 0 0 / 0.55);
  698. --ds-shadow-overlay-ink-1: rgb(0 0 0 / 0.3);
  699. --ds-shadow-overlay-ink-2: rgb(0 0 0 / 0.65);
  700. --ds-shadow-overlay-ink-3: rgb(0 0 0 / 0.3);
  701. --ds-backdrop: rgb(0 0 0 / 0.55);
  702. --ds-backdrop-light: rgb(0 0 0 / 0.3);
  703. /* The backing dots are the light ink of the theme. */
  704. --ds-canvas-dot: rgb(var(--ds-ink-rgb) / 0.14);
  705. }
  706. /* On a touch screen a menu item is sized for a finger. */
  707. @media (hover: none) and (pointer: coarse) {
  708. [data-theme],
  709. :root {
  710. --ds-menu-item-height: var(--ds-touch-target);
  711. }
  712. }
  713. /*
  714. * The layout breakpoints. A media query does not read var(), so the value
  715. * stands right here, in the Tailwind theme, not as a role in :root.
  716. * split: from 820 px the list of sections and the card stand side by side, narrower they stack
  717. * (settings, a function page): `split:grid-cols-…`.
  718. * phone is the phone width: the value is repeated in hooks/use-mobile.ts.
  719. */
  720. @theme {
  721. --breakpoint-split: 820px;
  722. /* phone: below 560 px the panel turns into a sliding sheet, above it stays a strip of icons. */
  723. --breakpoint-phone: 560px;
  724. }