ShtukbaseStandard
файл пакета→ .shtukbase/packages/keer-ui/library/styles/typography.css

library/styles/typography.css

191 строка, 6.7 КБ.

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

  1. /*
  2. * Text styles of the design code (section 4.2 of the “Design” standard).
  3. *
  4. * Size, weight, line height and letter spacing are set here once; in blocks and screens
  5. * text is styled only with these classes. The values come from tokens.css (the type/scale scale).
  6. * Each @utility is a separate block: the comment “Where to use: …” right above it, in one line;
  7. * the styles are read by machine from this markup.
  8. */
  9. /* Where to use: the page heading: PageHeader (h1) only. */
  10. @utility text-page-title {
  11. font-size: var(--ds-font-heading-1-size);
  12. line-height: var(--ds-line-heading-1);
  13. font-weight: var(--ds-font-weight-semibold);
  14. letter-spacing: var(--ds-letter-spacing-page-title);
  15. }
  16. /* Where to use: the heading of a page section outside a card: SectionHeader (h2). */
  17. @utility text-section-title {
  18. font-size: var(--ds-font-heading-4-size);
  19. line-height: var(--ds-line-heading-4);
  20. font-weight: var(--ds-font-weight-semibold);
  21. }
  22. /* Where to use: the heading of a card and a dialog: CardTitle, DialogTitle. */
  23. @utility text-card-title {
  24. font-size: var(--ds-font-heading-5-size);
  25. line-height: var(--ds-line-heading-5);
  26. font-weight: var(--ds-font-weight-semibold);
  27. }
  28. /* Where to use: a large number: an amount, a count, an indicator. */
  29. @utility text-metric {
  30. font-size: var(--ds-font-heading-1-size);
  31. line-height: var(--ds-line-heading-1);
  32. font-weight: var(--ds-font-weight-semibold);
  33. font-variant-numeric: tabular-nums;
  34. }
  35. /* Where to use: the main text: paragraphs, table cells, inputs. */
  36. @utility text-body {
  37. font-size: var(--ds-font-ui-size);
  38. line-height: var(--ds-line-ui);
  39. font-weight: var(--ds-font-weight-regular);
  40. }
  41. /* Where to use: emphasis in text: a title in a row, a menu item, a button. */
  42. @utility text-body-strong {
  43. font-size: var(--ds-font-ui-size);
  44. line-height: var(--ds-line-ui);
  45. font-weight: var(--ds-font-weight-medium);
  46. }
  47. /* Where to use: the caption of a form field: Label, FieldLabel. */
  48. @utility text-label {
  49. font-size: var(--ds-font-ui-size);
  50. line-height: var(--ds-line-ui-label);
  51. font-weight: var(--ds-font-weight-medium);
  52. }
  53. /* Where to use: a short muted caption above a field in a dense form: FieldLabel and FieldTitle with the muted variant. */
  54. @utility text-field-label {
  55. font-size: calc(var(--ds-font-ui-small-size) + 0.5px);
  56. line-height: var(--ds-line-ui-small);
  57. font-weight: var(--ds-font-weight-regular);
  58. color: var(--muted-foreground);
  59. }
  60. /* Where to use: metadata and notes: time, source, a hint under a field. */
  61. @utility text-caption {
  62. font-size: var(--ds-font-ui-small-size);
  63. line-height: var(--ds-line-ui-small);
  64. font-weight: var(--ds-font-weight-regular);
  65. color: var(--muted-foreground);
  66. }
  67. /* Where to use: the title of a list row in a card: a task, an entry for confirmation, a regular task. */
  68. @utility text-row-title {
  69. font-size: var(--ds-font-row-size);
  70. line-height: var(--ds-line-row);
  71. font-weight: var(--ds-font-weight-semibold);
  72. letter-spacing: var(--ds-letter-spacing-title);
  73. }
  74. /* Where to use: the text of a list row: a description under the title, a task example, a choice option. */
  75. @utility text-row {
  76. font-size: var(--ds-font-row-size);
  77. line-height: var(--ds-line-row);
  78. font-weight: var(--ds-font-weight-regular);
  79. }
  80. /* Where to use: a short badge and a choice of several: Badge, StatusBadge, the choice of a function under the request line. */
  81. @utility text-chip {
  82. font-size: var(--ds-font-chip-size);
  83. line-height: var(--ds-line-chip);
  84. font-weight: var(--ds-font-weight-medium);
  85. }
  86. /* Where to use: a side menu item: SidebarMenuButton. */
  87. @utility text-nav {
  88. font-size: var(--ds-font-nav-size);
  89. line-height: var(--ds-line-nav);
  90. font-weight: var(--ds-font-weight-book);
  91. }
  92. /* Where to use: the chosen item of the side menu: the same font size, denser (SidebarMenuButton). */
  93. @utility text-nav-strong {
  94. font-size: var(--ds-font-nav-size);
  95. line-height: var(--ds-line-nav);
  96. font-weight: var(--ds-font-weight-strong);
  97. }
  98. /* Where to use: the product name in the header of the side panel: AppShell. */
  99. @utility text-brand {
  100. font-size: var(--ds-font-brand-size);
  101. line-height: var(--ds-line-brand);
  102. font-weight: var(--ds-font-weight-semibold);
  103. letter-spacing: var(--ds-letter-spacing-brand);
  104. }
  105. /* Where to use: the user name in the footer of the side panel: AppShell. */
  106. @utility text-account {
  107. font-size: var(--ds-font-account-size);
  108. line-height: var(--ds-line-account);
  109. font-weight: var(--ds-font-weight-strong);
  110. }
  111. /* Where to use: the field of the request line: the main input of the screen. */
  112. @utility text-composer {
  113. font-size: var(--ds-font-composer-size);
  114. line-height: var(--ds-line-composer);
  115. font-weight: var(--ds-font-weight-regular);
  116. letter-spacing: var(--ds-letter-spacing-title);
  117. }
  118. /* Where to use: a caption above a value and a group heading in a menu. */
  119. @utility text-overline {
  120. font-family: var(--ds-overline-font);
  121. font-size: var(--ds-overline-size);
  122. line-height: var(--ds-line-ui-small);
  123. font-weight: var(--ds-font-weight-medium);
  124. letter-spacing: var(--ds-overline-tracking);
  125. text-transform: uppercase;
  126. color: var(--ds-text-tertiary);
  127. }
  128. /* Where to use: codes and numbers: a tax id, an article number, a purchase number. */
  129. @utility text-code {
  130. font-family: var(--ds-font-mono);
  131. font-size: var(--ds-font-code-size);
  132. line-height: var(--ds-line-code);
  133. font-weight: var(--ds-font-weight-regular);
  134. }
  135. /* Where to use: a table header: TableHead. */
  136. @utility text-table-head {
  137. font-family: var(--ds-database-header-font);
  138. font-size: var(--ds-database-header-size);
  139. line-height: var(--ds-line-ui-small);
  140. font-weight: var(--ds-database-header-weight);
  141. letter-spacing: var(--ds-database-header-tracking);
  142. text-transform: var(--ds-database-header-transform);
  143. color: var(--ds-database-header-ink);
  144. }
  145. /* Where to use: the assistant voice: a conclusion, a summary, an outcome. */
  146. @utility text-voice {
  147. font-family: var(--ds-font-serif);
  148. font-size: var(--ds-font-voice-size);
  149. line-height: var(--ds-line-voice);
  150. font-weight: var(--ds-font-weight-regular);
  151. letter-spacing: var(--ds-letter-spacing-title);
  152. }
  153. /* Where to use: a heading in the assistant voice on the screen: the story about the assistant at sign-in (from md:). */
  154. @utility text-voice-title {
  155. font-family: var(--ds-font-serif);
  156. font-size: var(--ds-font-page-title-size);
  157. line-height: var(--ds-line-page-title);
  158. font-weight: var(--ds-font-weight-regular);
  159. letter-spacing: var(--ds-letter-spacing-title);
  160. }
  161. /* Where to use: the same heading in the assistant voice in a narrow window. */
  162. @utility text-voice-heading {
  163. font-family: var(--ds-font-serif);
  164. font-size: var(--ds-font-heading-2-size);
  165. line-height: var(--ds-line-heading-2);
  166. font-weight: var(--ds-font-weight-regular);
  167. letter-spacing: var(--ds-letter-spacing-title);
  168. }