@canonical/design-system 0.44.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/data/apps/component/file_tree.ttl +1 -1
  2. package/data/apps/component/inline_panel.ttl +17 -0
  3. package/data/apps/{subcomponent → component}/log.ttl +1 -1
  4. package/data/apps/component/navigation.ttl +1 -1
  5. package/data/apps/component/notification.ttl +1 -1
  6. package/data/apps/component/side_navigation.ttl +50 -6
  7. package/data/apps/group/notifications.ttl +1 -1
  8. package/data/apps/layout/application_layout.ttl +1 -1
  9. package/data/apps/layout/content_layout.ttl +2 -3
  10. package/data/apps/layout/empty_layout.ttl +1 -1
  11. package/data/apps/layout/empty_state.ttl +1 -1
  12. package/data/apps/layout/login_layout.ttl +12 -0
  13. package/data/apps/layout/side_panel_form_layout.ttl +13 -0
  14. package/data/apps/pattern/action_bar.ttl +2 -2
  15. package/data/apps/pattern/code_diff.ttl +1 -1
  16. package/data/apps/pattern/data_views.ttl +85 -0
  17. package/data/apps/pattern/datatable.ttl +20 -91
  18. package/data/apps/pattern/destructive_modal.ttl +1 -1
  19. package/data/apps/pattern/drawer.ttl +1 -1
  20. package/data/apps/pattern/notification_center.ttl +2 -2
  21. package/data/apps/pattern/page_header.ttl +58 -0
  22. package/data/apps/pattern/side_panel.ttl +258 -10
  23. package/data/apps/subcomponent/data_table-action_bar.ttl +8 -8
  24. package/data/apps/subcomponent/data_table-body_cell.ttl +26 -26
  25. package/data/apps/subcomponent/data_table-group_header_row.ttl +8 -8
  26. package/data/apps/subcomponent/data_table-header_cell.ttl +13 -13
  27. package/data/apps/subcomponent/data_table-pagination_bar.ttl +11 -11
  28. package/data/apps/subcomponent/data_table-persistent_selection.ttl +10 -10
  29. package/data/apps/subcomponent/data_table-settings_menu.ttl +15 -15
  30. package/data/apps/subcomponent/data_views-filters.ttl +13 -0
  31. package/data/apps/subcomponent/data_views-saved_views.ttl +13 -0
  32. package/data/apps/subcomponent/data_views-sort_panel.ttl +13 -0
  33. package/data/apps/subcomponent/drawer-content.ttl +1 -1
  34. package/data/apps/subcomponent/drawer-footer.ttl +1 -1
  35. package/data/apps/subcomponent/drawer-header.ttl +1 -1
  36. package/data/apps/subcomponent/side_navigation-content.ttl +13 -0
  37. package/data/apps/subcomponent/side_navigation-context_switcher.ttl +53 -0
  38. package/data/apps/subcomponent/side_navigation-item.ttl +80 -0
  39. package/data/apps/subcomponent/side_navigation-item_group.ttl +13 -0
  40. package/data/apps/subcomponent/side_panel-content.ttl +2 -2
  41. package/data/apps/subcomponent/side_panel-footer.ttl +196 -3
  42. package/data/apps/subcomponent/side_panel-header.ttl +212 -3
  43. package/data/apps_anbox/component/theme_switcher.ttl +1 -1
  44. package/data/apps_anbox/pattern/side_menu.ttl +0 -1
  45. package/data/{tagcategory/lpupstream.ttl → apps_identity.ttl} +2 -2
  46. package/data/apps_landscape/component/checkbox_group.ttl +24 -24
  47. package/data/apps_landscape/component/code_editor.ttl +35 -35
  48. package/data/apps_landscape/component/cron_schedule.ttl +4 -4
  49. package/data/apps_landscape/component/expandable_radio_group.ttl +47 -47
  50. package/data/apps_landscape/component/expandable_truncation.ttl +20 -20
  51. package/data/apps_landscape/component/form_section.ttl +4 -4
  52. package/data/apps_landscape/component/gpg_key_field.ttl +27 -27
  53. package/data/apps_landscape/component/grouped_select.ttl +25 -25
  54. package/data/apps_landscape/component/loading_state.ttl +8 -8
  55. package/data/apps_landscape/component/managed_file_input.ttl +18 -18
  56. package/data/apps_landscape/component/multi_select_field.ttl +50 -50
  57. package/data/apps_landscape/component/password_constraints.ttl +1 -1
  58. package/data/apps_landscape/component/progress_bar.ttl +20 -20
  59. package/data/apps_landscape/component/read_only_field.ttl +15 -15
  60. package/data/apps_landscape/component/search_help_popup.ttl +10 -10
  61. package/data/apps_landscape/component/search_query_editor.ttl +33 -33
  62. package/data/apps_landscape/component/tag_multi_select.ttl +9 -9
  63. package/data/apps_landscape/pattern/content_blocks.ttl +20 -20
  64. package/data/apps_landscape/pattern/dashboard_page_composition.ttl +37 -37
  65. package/data/apps_landscape/pattern/delivery_scheduling.ttl +6 -6
  66. package/data/apps_landscape/pattern/form_field_help.ttl +28 -28
  67. package/data/apps_landscape/pattern/header_search_controls.ttl +41 -41
  68. package/data/apps_landscape/pattern/ignorable_notification.ttl +16 -16
  69. package/data/apps_landscape/pattern/information_grid.ttl +14 -14
  70. package/data/apps_landscape/pattern/instance_association.ttl +5 -5
  71. package/data/apps_landscape/pattern/process_flow.ttl +11 -11
  72. package/data/apps_landscape/pattern/progressively_expandable_table.ttl +32 -32
  73. package/data/apps_landscape/pattern/recurring_schedule.ttl +3 -3
  74. package/data/apps_landscape/pattern/responsive_action_group.ttl +12 -12
  75. package/data/apps_landscape/pattern/responsive_header_actions.ttl +14 -14
  76. package/data/apps_landscape/pattern/responsive_table_filters.ttl +11 -11
  77. package/data/apps_landscape/pattern/side_panel_form_actions.ttl +40 -40
  78. package/data/apps_landscape/pattern/sortable_list.ttl +14 -14
  79. package/data/apps_landscape/pattern/table_filter.ttl +57 -57
  80. package/data/apps_landscape/pattern/table_filter_chips.ttl +67 -67
  81. package/data/apps_landscape/pattern/table_pagination.ttl +63 -63
  82. package/data/apps_landscape/pattern/typed_confirmation_modal.ttl +22 -22
  83. package/data/apps_landscape/subcomponent/bold_substring.ttl +4 -4
  84. package/data/apps_landscape/subcomponent/inline_cell_input.ttl +8 -8
  85. package/data/apps_landscape/subcomponent/label_with_description.ttl +14 -14
  86. package/data/apps_landscape/subcomponent/nested_dropdown_item.ttl +8 -8
  87. package/data/apps_landscape/subcomponent/pluralized_bold_count.ttl +7 -7
  88. package/data/apps_landscape/subcomponent/select_all_results_prompt.ttl +12 -12
  89. package/data/apps_launchpad/component/avatar.ttl +2 -2
  90. package/data/apps_launchpad/component/badge.ttl +2 -2
  91. package/data/apps_launchpad/component/breadcrumbs.ttl +1 -1
  92. package/data/apps_launchpad/component/button.ttl +2 -2
  93. package/data/apps_launchpad/component/checkbox_input.ttl +4 -4
  94. package/data/apps_launchpad/component/combobox.ttl +2 -2
  95. package/data/apps_launchpad/component/drawer.ttl +4 -4
  96. package/data/apps_launchpad/component/modal.ttl +4 -12
  97. package/data/apps_launchpad/component/radio_input.ttl +5 -5
  98. package/data/apps_launchpad/component/select_input.ttl +1 -1
  99. package/data/apps_launchpad/component/switch.ttl +5 -5
  100. package/data/apps_launchpad/component/text_input.ttl +8 -8
  101. package/data/apps_launchpad/component/textarea_input.ttl +10 -10
  102. package/data/apps_launchpad/component/tooltip.ttl +3 -3
  103. package/data/apps_launchpad/subcomponent/combobox-loading.ttl +2 -2
  104. package/data/apps_launchpad/subcomponent/combobox-search.ttl +4 -4
  105. package/data/apps_launchpad/subcomponent/description_list-item.ttl +1 -1
  106. package/data/apps_launchpad/subcomponent/modal-content.ttl +2 -2
  107. package/data/apps_lxd/component/back_link.ttl +1 -1
  108. package/data/apps_lxd/component/code_snippet_with_copy_button.ttl +1 -1
  109. package/data/apps_lxd/component/doc_link.ttl +2 -2
  110. package/data/apps_lxd/component/meter.ttl +5 -5
  111. package/data/apps_lxd/component/output_field.ttl +2 -3
  112. package/data/apps_lxd/component/rename_header.ttl +15 -15
  113. package/data/apps_lxd/component/tab_links.ttl +4 -4
  114. package/data/apps_lxd/subcomponent/copy_to_clipboard.ttl +2 -2
  115. package/data/apps_lxd/view/network_topology.ttl +3 -4
  116. package/data/apps_portal/layout/details_view.ttl +0 -1
  117. package/data/{apps_workplaceengineering → apps_workplace}/component/complex_multi_select.ttl +3 -3
  118. package/data/{apps_workplaceengineering → apps_workplace}/component/label-highlight.ttl +5 -6
  119. package/data/apps_workplace/component/org_chart.ttl +12 -0
  120. package/data/{apps_workplaceengineering → apps_workplace}/component/rule.ttl +2 -2
  121. package/data/{apps_workplaceengineering → apps_workplace}/component/skip_link.ttl +2 -2
  122. package/data/{apps_workplaceengineering → apps_workplace}/component/theme_switcher.ttl +3 -3
  123. package/data/{apps_workplaceengineering → apps_workplace}/pattern/callout_numbers_card.ttl +4 -4
  124. package/data/{apps_workplaceengineering → apps_workplace}/pattern/confirmation_modal.ttl +2 -2
  125. package/data/apps_workplace/pattern/org_event_card.ttl +12 -0
  126. package/data/apps_workplace/subcomponent/multi_select_input.ttl +12 -0
  127. package/data/{apps_workplaceengineering.ttl → apps_workplace.ttl} +2 -2
  128. package/data/concept/Accessibility.ttl +9 -0
  129. package/data/concept/Breakpoints.ttl +9 -0
  130. package/data/concept/Design-tokens-Overview.ttl +10 -0
  131. package/data/concept/Filtering-patterns.ttl +10 -0
  132. package/data/concept/Foundations-Baseline.ttl +0 -1
  133. package/data/concept/Foundations-Color.ttl +10 -0
  134. package/data/concept/Foundations-Density--the-form-channel.ttl +0 -1
  135. package/data/concept/Foundations-Grid--Layout.ttl +2 -3
  136. package/data/concept/Foundations-Spacing/-Element-vs-container-owned.ttl +0 -1
  137. package/data/concept/Foundations-Spacing.ttl +0 -1
  138. package/data/concept/Foundations-Surfaces.ttl +1 -2
  139. package/data/concept/Foundations-Typography.ttl +1 -2
  140. package/data/concept/How-to-choose-between-question-mark-and-information-icon.ttl +10 -0
  141. package/data/concept/How-to-differentiate-types-of-UI-blocks-.ttl +3 -4
  142. package/data/concept/How-to-indicate-required-fields-in-forms.ttl +1 -2
  143. package/data/concept/How-to-support-modifiers-in-a-component.ttl +0 -1
  144. package/data/concept/Intentional-friction.ttl +0 -1
  145. package/data/concept/Overflow.ttl +10 -0
  146. package/data/concept/Understanding-the-modifier-contract.ttl +0 -1
  147. package/data/documentation/layout/content_page_layout.ttl +13 -0
  148. package/data/documentation/layout/documentation_layout.ttl +2 -1
  149. package/data/documentation/layout/library_layout.ttl +13 -0
  150. package/data/documentation/layout/search_page_layout.ttl +13 -0
  151. package/data/documentation/pattern/library_side_navigation.ttl +4 -4
  152. package/data/global/component/accordion.ttl +5 -184
  153. package/data/global/component/announcement.ttl +4 -4
  154. package/data/global/component/avatar.ttl +1 -1
  155. package/data/global/component/badge.ttl +7 -9
  156. package/data/global/component/breadcrumbs.ttl +8 -7
  157. package/data/global/component/button.ttl +7 -25
  158. package/data/global/component/button_link.ttl +1 -1
  159. package/data/global/component/card.ttl +3 -12
  160. package/data/global/component/checkbox_field.ttl +1 -1
  161. package/data/global/component/chip.ttl +5 -6
  162. package/data/global/component/choices_field.ttl +11 -3
  163. package/data/global/component/code_snippet.ttl +1 -2
  164. package/data/global/component/color_field.ttl +1 -1
  165. package/data/global/component/combobox_field.ttl +2 -18
  166. package/data/global/component/contextual_menu.ttl +4 -6
  167. package/data/global/component/date_field.ttl +1 -1
  168. package/data/global/component/date_time_field.ttl +1 -1
  169. package/data/global/component/drag_and_drop_list.ttl +3 -3
  170. package/data/global/component/dropdown_button.ttl +2 -3
  171. package/data/global/component/file_upload_field.ttl +509 -60
  172. package/data/global/component/heading.ttl +4 -4
  173. package/data/global/component/hidden_field.ttl +1 -1
  174. package/data/global/component/icon.ttl +3 -3
  175. package/data/global/component/icon_button.ttl +35 -0
  176. package/data/global/component/icon_in_container.ttl +7 -2
  177. package/data/global/component/inline_code.ttl +1 -1
  178. package/data/{apps → global}/component/key_value_pair.ttl +3 -3
  179. package/data/global/component/keyboard_key.ttl +1 -1
  180. package/data/global/{pattern/navigation.ttl → component/link.ttl} +3 -3
  181. package/data/global/component/links.ttl +12 -0
  182. package/data/global/component/markdown_editor_field.ttl +13 -0
  183. package/data/global/component/mode_switcher.ttl +2 -2
  184. package/data/global/component/notification_toast.ttl +1 -1
  185. package/data/global/component/number_field.ttl +1 -1
  186. package/data/global/component/pagination.ttl +2 -2
  187. package/data/global/component/password_field.ttl +1 -1
  188. package/data/global/component/phone_field.ttl +1 -1
  189. package/data/global/component/popover.ttl +1 -1
  190. package/data/global/component/query_builder.ttl +12 -0
  191. package/data/global/component/range_field.ttl +1 -81
  192. package/data/global/component/rating_field.ttl +1 -1
  193. package/data/global/component/relative_timestamp.ttl +2 -1
  194. package/data/global/component/rich_choices_field.ttl +1 -1
  195. package/data/global/component/rich_text_editor.ttl +12 -0
  196. package/data/global/component/rich_text_field.ttl +1 -1
  197. package/data/global/component/search_field.ttl +1 -1
  198. package/data/global/{subcomponent/markdown_input.ttl → component/segmented_control.ttl} +3 -3
  199. package/data/global/component/segmented_control_field.ttl +1 -1
  200. package/data/global/component/select_field.ttl +1 -1
  201. package/data/global/component/switch_field.ttl +1 -1
  202. package/data/global/component/table.ttl +4 -4
  203. package/data/global/component/tabs.ttl +1 -1
  204. package/data/global/component/tag.ttl +2 -2
  205. package/data/global/component/text_field.ttl +1 -1
  206. package/data/global/component/textarea_field.ttl +1 -1
  207. package/data/global/component/tile.ttl +2 -5
  208. package/data/global/component/time_field.ttl +1 -1
  209. package/data/global/component/timestamp.ttl +2 -1
  210. package/data/global/component/tooltip.ttl +78 -120
  211. package/data/global/component/{data_tooltip.ttl → tooltip_data.ttl} +31 -23
  212. package/data/global/component/tooltip_wrapper.ttl +71 -15
  213. package/data/global/group/buttons.ttl +1 -8
  214. package/data/global/group/cards.ttl +2 -6
  215. package/data/global/group/code_snippets.ttl +1 -1
  216. package/data/{apps → global}/group/key_value_pairs.ttl +3 -3
  217. package/data/global/group/keyboard_keys.ttl +1 -1
  218. package/data/global/group/tiles.ttl +1 -1
  219. package/data/global/modifier/constructive.ttl +1 -1
  220. package/data/global/modifier/elevated.ttl +1 -1
  221. package/data/global/modifier/information.ttl +1 -1
  222. package/data/global/modifier_family/_emphasis.ttl +1 -2
  223. package/data/global/modifier_family/_other.ttl +1 -2
  224. package/data/global/modifier_family/surface.ttl +1 -1
  225. package/data/global/pattern/description_list.ttl +1 -1
  226. package/data/global/pattern/field.ttl +1 -1
  227. package/data/global/{component/markdown_field.ttl → pattern/filter.ttl} +3 -3
  228. package/data/global/pattern/form_login.ttl +1 -1
  229. package/data/global/pattern/modal.ttl +5 -21
  230. package/data/global/pattern/stepper.ttl +1 -1
  231. package/data/global/pattern/table_of_contents.ttl +1 -1
  232. package/data/global/pattern/timeline.ttl +14 -19
  233. package/data/global/pattern/top_navigation.ttl +13 -0
  234. package/data/global/subcomponent/accordion-item.ttl +3 -156
  235. package/data/global/subcomponent/card-content.ttl +1 -1
  236. package/data/global/subcomponent/card-footer.ttl +1 -1
  237. package/data/global/subcomponent/card-header.ttl +1 -1
  238. package/data/global/subcomponent/card-image.ttl +2 -2
  239. package/data/global/subcomponent/card-thumbnail.ttl +1 -1
  240. package/data/global/subcomponent/chart_legend.ttl +1 -1
  241. package/data/global/subcomponent/chart_legend_item.ttl +1 -1
  242. package/data/global/subcomponent/checkbox_input.ttl +1 -1
  243. package/data/global/subcomponent/color_input.ttl +1 -1
  244. package/data/global/subcomponent/combobox_input.ttl +2 -18
  245. package/data/global/subcomponent/date_input.ttl +1 -1
  246. package/data/global/subcomponent/date_time_input.ttl +1 -1
  247. package/data/global/subcomponent/field-description.ttl +1 -1
  248. package/data/global/subcomponent/field-label.ttl +1 -1
  249. package/data/global/subcomponent/file_upload_input.ttl +503 -50
  250. package/data/global/subcomponent/hidden_input.ttl +1 -1
  251. package/data/global/subcomponent/markdown_editor_input.ttl +13 -0
  252. package/data/global/subcomponent/modal-content.ttl +1 -1
  253. package/data/global/subcomponent/modal-footer.ttl +3 -19
  254. package/data/global/subcomponent/modal-header.ttl +5 -21
  255. package/data/global/subcomponent/number_input.ttl +1 -1
  256. package/data/global/subcomponent/password_input.ttl +1 -1
  257. package/data/global/subcomponent/phone_input.ttl +1 -1
  258. package/data/global/subcomponent/radio_input.ttl +1 -1
  259. package/data/global/subcomponent/range_input.ttl +3 -84
  260. package/data/global/subcomponent/rating_input.ttl +1 -1
  261. package/data/global/subcomponent/rich_text_input.ttl +1 -1
  262. package/data/global/subcomponent/search_input.ttl +3 -4
  263. package/data/global/subcomponent/segmented_control_input.ttl +1 -1
  264. package/data/global/subcomponent/select_input.ttl +1 -1
  265. package/data/global/subcomponent/spinner.ttl +2 -2
  266. package/data/global/subcomponent/switch_input.ttl +1 -1
  267. package/data/global/{layout/form_layout.ttl → subcomponent/text_editor_input.ttl} +2 -2
  268. package/data/global/subcomponent/text_input.ttl +1 -1
  269. package/data/global/subcomponent/textarea_input.ttl +1 -1
  270. package/data/global/subcomponent/tile-content.ttl +1 -1
  271. package/data/global/subcomponent/time_input.ttl +1 -1
  272. package/data/global/subcomponent/timeline-content.ttl +2 -2
  273. package/data/global/subcomponent/timeline-event.ttl +5 -5
  274. package/data/global/subcomponent/timeline-expansion_indicator.ttl +1 -1
  275. package/data/global/subcomponent/timeline-header.ttl +1 -1
  276. package/data/global/variant/tooltip_dense.ttl +87 -6
  277. package/data/global_dataviews/component/filter_button.ttl +487 -0
  278. package/data/global_dataviews/component/query_bar.ttl +1639 -0
  279. package/data/global_dataviews/component/query_chip.ttl +605 -0
  280. package/data/global_dataviews/group/query_chips.ttl +565 -0
  281. package/data/global_dataviews/modifier/exclusion.ttl +8 -0
  282. package/data/global_dataviews/modifier/inclusion.ttl +8 -0
  283. package/data/global_dataviews/modifier/match.ttl +8 -0
  284. package/data/global_dataviews/modifier/presence.ttl +8 -0
  285. package/data/global_dataviews/modifier/range.ttl +8 -0
  286. package/data/global_dataviews/modifier_family/condition.ttl +9 -0
  287. package/data/global_dataviews/subcomponent/query_chip-entry.ttl +186 -0
  288. package/data/global_dataviews/subcomponent/query_chip-segment.ttl +241 -0
  289. package/data/global_dataviews/subcomponent/query_input.ttl +1287 -0
  290. package/data/{tagcategory/documentation-stage.ttl → global_dataviews.ttl} +2 -2
  291. package/data/sites/component/store_card.ttl +92 -0
  292. package/data/sites/pattern/hero.ttl +295 -4
  293. package/data/{stores.ttl → sites_stores.ttl} +2 -2
  294. package/data/tag/designin-progress.ttl +9 -0
  295. package/data/tag/devbatch1.ttl +1 -1
  296. package/data/tag/devbatch2.ttl +1 -1
  297. package/data/tag/devbatch3.ttl +1 -1
  298. package/data/tag/{wpetriageupstream-and-deprecate.ttl → devdone.ttl} +3 -2
  299. package/data/tag/devin-progress.ttl +9 -0
  300. package/data/tag/{stylesready.ttl → devin-review.ttl} +3 -3
  301. package/data/tag/devpre-approved.ttl +9 -0
  302. package/data/tag/{devreactapproved.ttl → devreactdone.ttl} +3 -3
  303. package/data/tag/devreactpreapproved.ttl +1 -1
  304. package/data/tag/{wpeinital-implementation.ttl → devsveltepreapproved.ttl} +3 -3
  305. package/data/tag/divergent.ttl +1 -1
  306. package/data/tag/docscomplete.ttl +1 -1
  307. package/data/tag/global-docs-missing.ttl +1 -1
  308. package/data/tag/has-no-global-entry.ttl +1 -1
  309. package/data/tag/implementationcomplete.ttl +9 -0
  310. package/data/tag/lpto-be-upstreamed.ttl +1 -1
  311. package/data/tag/lptriageblocked-reqs-design.ttl +1 -1
  312. package/data/tag/lptriageno-upstream.ttl +1 -1
  313. package/data/tag/lptriagereimplement-and-deprecate.ttl +1 -1
  314. package/data/tag/lptriagereimplement-and-keep.ttl +1 -1
  315. package/data/tag/lptriageupstream-and-deprecate.ttl +1 -1
  316. package/data/tag/{needsdefinition.ttl → needscoredocumentation.ttl} +3 -3
  317. package/data/tag/needsdesign.ttl +9 -0
  318. package/data/tag/{needsdocumentation.ttl → needsfulldocumentation.ttl} +3 -3
  319. package/data/tag/needsimplementation.ttl +9 -0
  320. package/data/tag/needstriage.ttl +1 -1
  321. package/data/tag/specialadoption-docs.ttl +1 -1
  322. package/data/tag/triagedbacklog.ttl +2 -2
  323. package/data/tag/triagedrejected.ttl +2 -2
  324. package/data/tag/upstream-candidate.ttl +1 -1
  325. package/data/tag/upstream-compliant.ttl +1 -1
  326. package/data/tag/waiting-for-delta-review.ttl +1 -1
  327. package/data/tag/workplaceinitial-implementation.ttl +9 -0
  328. package/data/tag/workplacetriageupstream-and-deprecate.ttl +9 -0
  329. package/data/tagcategory/design--documentation-status.ttl +6 -0
  330. package/data/tagcategory/implementationnotes.ttl +6 -0
  331. package/data/tagcategory/implementationstatus.ttl +6 -0
  332. package/data/tagcategory/implementationworkflow.ttl +6 -0
  333. package/definitions/ontology.ttl +8 -2
  334. package/package.json +6 -6
  335. package/skills/adoption-a1-styles/SKILL.md +48 -7
  336. package/skills/adoption-a2-components/SKILL.md +125 -5
  337. package/skills/anatomy-author/SKILL.md +302 -95
  338. package/skills/anatomy-author/clarification-guidelines.md +150 -0
  339. package/skills/anatomy-author/completeness-checklist.md +224 -0
  340. package/skills/implement-component/SKILL.md +2 -2
  341. package/skills/map-journeys/SKILL.md +395 -0
  342. package/skills/map-journeys/journey-graph.example.html +298 -0
  343. package/skills/model-domains/SKILL.md +502 -0
  344. package/data/apps_workplaceengineering/pattern/event_timeline.ttl +0 -13
  345. package/data/apps_workplaceengineering/pattern/group_card.ttl +0 -13
  346. package/data/apps_workplaceengineering/pattern/travel_provider_card.ttl +0 -14
  347. package/data/apps_workplaceengineering/subcomponent/multi_select_input.ttl +0 -12
  348. package/data/concept/Question-mark-vs-information-icon.ttl +0 -11
  349. package/data/global/modifier/editable.ttl +0 -8
  350. package/data/global/modifier/focused.ttl +0 -8
  351. package/data/global/modifier/highlighted.ttl +0 -8
  352. package/data/global/modifier/loading.ttl +0 -8
  353. package/data/global/modifier/muted.ttl +0 -8
  354. package/data/global/modifier/wireframe.ttl +0 -8
@@ -4,7 +4,7 @@
4
4
 
5
5
  ds:apps_lxd.view.network_topology a ds:View;
6
6
  ds:name "NetworkTopology";
7
- ds:summary "Visualize entities as chips in a network topology with connecting lines between them. Creates a view like in an actual physical network for virtual network resources.\n\nEntities can be network interfaces, virtual network definitions, computers, virtual machines, and instances.\n\nIdeally used in combination with entities shown as rich chips that clearly show entities with their respective icon. On hovering an entity, standardized tooltips display more information about the entity.\n\n";
7
+ ds:summary "Visualize entities as chips in a network topology with connecting lines between them. Creates a view like in an actual physical network for virtual network resources.\n\nEntities can be network interfaces, virtual network definitions, computers, virtual machines, and instances.\n\nIdeally used in combination with entities shown as rich chips that clearly show entities with their respective icon. On hovering an entity, standardized tooltips display more information about the entity.";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "";
10
10
  ds:usage "**When to use**\n\nTo display entities connected to a virtual or physical network\n\n**When not to use**\n\nTo visualize non-networking-related entity connections.";
@@ -17,7 +17,6 @@ ds:apps_lxd.view.network_topology a ds:View;
17
17
  ds:changeLog [
18
18
  a ds:ChangeLogEntry;
19
19
  ds:timestamp "2026-02-11T00:00:00.000+01:00";
20
- ds:change "Adding description";
21
- ds:changeType "change";
22
- ds:githubLink "https://github.com/canonical/lxd-ui/blob/main/src/pages/networks/NetworkTopology.tsx"
20
+ ds:githubLink "https://github.com/canonical/lxd-ui/blob/main/src/pages/networks/NetworkTopology.tsx";
21
+ ds:changeType "change"
23
22
  ].
@@ -13,6 +13,5 @@ ds:apps_portal.layout.details_view a ds:Layout;
13
13
  ds:changeLog [
14
14
  a ds:ChangeLogEntry;
15
15
  ds:timestamp "2026-08-20T00:00:00.000+02:00";
16
- ds:change "initial documentation of a found template for a layout";
17
16
  ds:changeType "decision"
18
17
  ].
@@ -2,12 +2,12 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.component.complex_multi_select a ds:Component;
5
+ ds:apps_workplace.component.complex_multi_select a ds:Component;
6
6
  ds:name "Complex multi select";
7
7
  ds:summary "";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "";
10
10
  ds:usage "";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering;
13
- ds:parentComponent ds:apps_workplaceengineering.component.label-highlight.
12
+ ds:tier ds:apps_workplace;
13
+ ds:parentComponent ds:apps_workplace.component.label-highlight.
@@ -2,19 +2,18 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.component.label-highlight a ds:Component;
5
+ ds:apps_workplace.component.label-highlight a ds:Component;
6
6
  ds:name "Label.Highlight";
7
- ds:summary "This component is a variant (?) of the [Tag](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-osLY8UcQUp) component. It is a read-only label, meant to stand out when multiple labels are used. \nPossible names: High contrast label chips, highlighted label chip. \n";
7
+ ds:summary "This component is a variant (?) of the [Tag](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-osLY8UcQUp) component. It is a read-only label, meant to stand out when multiple labels are used. \nPossible names: High contrast label chips, highlighted label chip.";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "Anatomy is WIP, current look: \n\n \nFigma file reference (WIP as of 19 feb 2026): [link](https://www.figma.com/design/PWvbBHNoPeCIyhWWvJ6uvN/26.04-Promotion-tool---Historical-applications?node-id=12738-8830&t=SUMGjIyfz79K6FOQ-1)";
10
10
  ds:usage "Usage example (WIP UI as per 19 feb 2026): \n\n\n\n\n\n";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering;
13
- ds:hasSubcomponent ds:apps_workplaceengineering.component.label-highlight, ds:apps_workplaceengineering.component.complex_multi_select;
12
+ ds:tier ds:apps_workplace;
13
+ ds:hasSubcomponent ds:apps_workplace.component.label-highlight, ds:apps_workplace.component.complex_multi_select;
14
14
  ds:changeLog [
15
15
  a ds:ChangeLogEntry;
16
16
  ds:timestamp "2026-02-19T00:00:00.000+01:00";
17
- ds:change "initial entry in the database";
18
17
  ds:changeType "change"
19
18
  ];
20
- ds:parentComponent ds:apps_workplaceengineering.component.label-highlight.
19
+ ds:parentComponent ds:apps_workplace.component.label-highlight.
@@ -0,0 +1,12 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:apps_workplace.component.org_chart a ds:Component;
6
+ ds:name "OrgChart";
7
+ ds:summary "";
8
+ ds:anatomyDsl "";
9
+ ds:anatomyClassic "";
10
+ ds:usage "";
11
+ ds:guidelines "";
12
+ ds:tier ds:apps_workplace.
@@ -2,12 +2,12 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.component.rule a ds:Component;
5
+ ds:apps_workplace.component.rule a ds:Component;
6
6
  ds:name "Rule";
7
7
  ds:summary "";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "";
10
10
  ds:usage "";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering;
12
+ ds:tier ds:apps_workplace;
13
13
  ds:documentationStage ds:tag.needstriage.
@@ -2,11 +2,11 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.component.skip_link a ds:Component;
5
+ ds:apps_workplace.component.skip_link a ds:Component;
6
6
  ds:name "SkipLink";
7
7
  ds:summary "";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "";
10
10
  ds:usage "";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering.
12
+ ds:tier ds:apps_workplace.
@@ -2,12 +2,12 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.component.theme_switcher a ds:Component;
5
+ ds:apps_workplace.component.theme_switcher a ds:Component;
6
6
  ds:name "ThemeSwitcher";
7
7
  ds:summary "";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "";
10
10
  ds:usage "";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering;
13
- ds:documentationStage ds:tag.needsdefinition.
12
+ ds:tier ds:apps_workplace;
13
+ ds:documentationStage ds:tag.needscoredocumentation.
@@ -2,12 +2,12 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.pattern.callout_numbers_card a ds:Pattern;
5
+ ds:apps_workplace.pattern.callout_numbers_card a ds:Pattern;
6
6
  ds:name "Callout numbers card";
7
- ds:summary "A high-level dashboard widget designed to display crucial **Key Performance Indicators (KPIs)** at a glance. This component groups individual metric cards in a horizontal grid, combining primary callout numbers, contextual comparison badges, and minimalist trend sparklines to give users immediate, actionable insights.\n\n";
7
+ ds:summary "A high-level dashboard widget designed to display crucial **Key Performance Indicators (KPIs)** at a glance. This component groups individual metric cards in a horizontal grid, combining primary callout numbers, contextual comparison badges, and minimalist trend sparklines to give users immediate, actionable insights.";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "- **Header:** Includes a clean, uppercase section title (`KEY METRICS`) accompanied by an info tooltip icon for quick metric definitions.\n- **Hero Callout:** Large, bold typography emphasizing the primary metric value (e.g., `89 days`, `5 hires`).\n- **Metric Label & Tooltip:** Explanatory text directly below the value (e.g., `Median time to hire`) paired with an inline information icon.\n- **Comparison Badges (Pragma Tags):** \n - **Green tag:** Indicates a positive trend (e.g., *decreasing* time to hire).\n - **Red tag:** Indicates a negative trend (e.g., *decreasing* total hires or *increasing* overdue actions).\n- **Trend Sparkline:** A compact, gradient-filled area chart plotted over a quarterly timeline (Q1'26 to Q3'26). It features a distinct end-point node (orange dot) to highlight the most recent data point.";
10
10
  ds:usage "## \n\n- Tracking time-to-hire, seats filled, and pending onboarding actions.\n- Reviewing quarterly targets, open leads, or overdue tasks.\n- Monitoring completed milestones, or backlog items.";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering;
13
- ds:documentationStage ds:tag.needsdefinition.
12
+ ds:tier ds:apps_workplace;
13
+ ds:documentationStage ds:tag.needscoredocumentation.
@@ -2,11 +2,11 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering.pattern.confirmation_modal a ds:Pattern;
5
+ ds:apps_workplace.pattern.confirmation_modal a ds:Pattern;
6
6
  ds:name "ConfirmationModal";
7
7
  ds:summary "";
8
8
  ds:anatomyDsl "";
9
9
  ds:anatomyClassic "";
10
10
  ds:usage "";
11
11
  ds:guidelines "";
12
- ds:tier ds:apps_workplaceengineering.
12
+ ds:tier ds:apps_workplace.
@@ -0,0 +1,12 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:apps_workplace.pattern.org_event_card a ds:Pattern;
6
+ ds:name "OrgEventCard";
7
+ ds:summary "";
8
+ ds:anatomyDsl "";
9
+ ds:anatomyClassic "";
10
+ ds:usage "";
11
+ ds:guidelines "";
12
+ ds:tier ds:apps_workplace.
@@ -0,0 +1,12 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:apps_workplace.subcomponent.multi_select_input a ds:Subcomponent;
6
+ ds:name "MultiSelectInput";
7
+ ds:summary "A MultiSelect input that allows selection (and selection clearing) over a group of options.\n\n\n\nThis is proposed within Workplace tier first as none of the current React form components support the combobox behavior shown in the design mock above.\n\nWe could adapt the [Launchpad Combobox component](https://ds-svelte-global.canonical.com/?path=/story/components-combobox--in-a-popover).";
8
+ ds:anatomyDsl "";
9
+ ds:anatomyClassic "";
10
+ ds:usage "";
11
+ ds:guidelines "";
12
+ ds:tier ds:apps_workplace.
@@ -2,5 +2,5 @@
2
2
  @prefix anatomy: <https://anatomy.canonical.com/>.
3
3
  @prefix dt: <https://dt.canonical.com/>.
4
4
 
5
- ds:apps_workplaceengineering a ds:Tier;
6
- ds:name "Apps/WorkplaceEngineering".
5
+ ds:apps_workplace a ds:Tier;
6
+ ds:name "Apps/Workplace".
@@ -0,0 +1,9 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:concept.Accessibility a ds:Concept;
6
+ ds:name "Accessibility";
7
+ ds:summary "";
8
+ ds:tier ds:global;
9
+ ds:content "Focus states: \n\n- decision 1 - read only inputs should get focus. open conversation: should the focus ring have a “muted” version for read only items?\n\nA focus ring/border is for focusable elements, not exclusively interactive ones. There is a distinction:\n\nInteractive – an element users can interact with (button, link, input, etc.).\n\nFocusable – an element that can receive keyboard focus, including read-only inputs and in some cases non-interactive content.\n\nEditable – an element whose value/content users can change.\n\nMost focusable elements are interactive, but being editable is not a requirement for receiving focus. A read-only input is still focusable and allows some interaction, like selecting and copying text. It just can't be edited.\n\n[WCAG](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible) also explains the purpose of a focus indicator: “The purpose of this success criterion is to help a person know which element has the keyboard focus.” There is no requirement for the focused element to be editable.\n\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/readonly), for instance, says the following about the HTML read-only attribute: \"Read-only controls can still function and are still focusable.\"".
@@ -0,0 +1,9 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:concept.Breakpoints a ds:Concept;
6
+ ds:name "Breakpoints";
7
+ ds:summary "";
8
+ ds:tier ds:global;
9
+ ds:content "Thoughts on breakpoints - on sites, medium has 2 options right now, and we need onely one - the medikum breakpoint maybe should start at a higher point and span more. \n\n\n\nbetweel large and extralarge the column width jumps too much, it makes items that consume 4 columns to stretch too mutch".
@@ -0,0 +1,10 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:concept.Design-tokens-Overview a ds:Concept;
6
+ ds:name "Design tokens: Overview";
7
+ ds:summary "Design tokens are reusable, stable constants that store the smallest visual properties in our Design system, such as color, typography, and spacing. They facilitate consistency across different platforms and technologies, making it easier to update and scale the visual appearance of a Design system.\n\nThe w3c [Design Tokens Community Group](https://www.designtokens.org/) announced in October 2025 the first stable version of the [Design Tokens Specification](https://www.designtokens.org/technical-reports/). This specification provides the first industry standard, production-ready, vendor-neutral format for sharing design decisions across tools and platforms - and the Pragma design system is basing its tokens on this spec. \n\nStoring Design tokens centrally in a platform-agnostic way (as JSON in a git repository) makes it easier to implement the same Design system on different platforms, from CSS to Flutter or Figma. The mature processes of git for contributions are a perfect fit for maintaining a stable set of tokens.\n\nFor the Canonical theme of the PRagma design system, design tokens are stored in github, at [https://github.com/canonical/pragma-core/tree/main/packages/tokens](https://github.com/canonical/pragma-core/tree/main/packages/tokens)\n\n \n\nThis document outlines how we set up, manage, structure and update our Design tokens. The actual values of the tokens are defined separately, in:\n\n- Typography tokens\n- Color tokens\n- Dimension tokens";
8
+ ds:tier ds:global;
9
+ ds:content "# **Design token taxonomy**\n\nAs Design tokens are intended to be used across different platforms, they must be defined in a platform-agnostic way. In order to be able to re-implement a Design system on different platforms, each visual design decision must be tokenized. This means that a considerable number of tokens must be created.\n\nTherefore, it is important to create a well-crafted Design token taxonomy that can be used on any platform and is scalable for 10s, 100s, or 1000s of tokens.\n\n## **Token categories**\n\nAt the highest level, tokens are categorized into one of the following three categories:\n\nToken categories\n\nPrimitive Design tokens reduce the decision space by restricting possible choices to available primitive tokens. For example, when deciding on which color to use for a new component, only colors that exist as primitive tokens are available. This restriction alone is a major advantage of Design tokens, helping to scale visual designers' decisions to a larger team and making the Design system more consistent. A full semantic token system makes it easy to apply the right token for the right use case.\n\nThe 3 types increase in order of specificity, but decrease in versatility of use.\n\nThere is a tension between specificity and scope. If you are not specific enough in certain areas, people will end up choosing the wrong tokens. If you create too many specific tokens, you end up with a lot of tokens with very narrow use cases that will overwhelm and confuse people. \n\nOne way to address this problem is to only go down to component tokens in some cases, such as overwriting default values or for the most-used components. For instance, a bordered code snippet (1px) does not use the default (1.5px). In other cases, components can just use semantic tokens instead, which would still cover theming and responsiveness out of the box. \n\nHowever, if using a semantic token seems too ambiguous and people might be confused about which token to use for a component, then it's better to create a specific component token (and reference the appropriate semantic or primitive token).\n\nUsing **primitive tokens directly** in components or designs **is strongly discouraged** as it makes it harder for new designers and developers to understand how and why a token was applied.\n\n## **Token name parts**\n\nToken name parts are, as the name suggests, the different parts that make up a token name. Those are often called Design token levels or dynamics. There are different approaches/frameworks that are used. For our Design tokens we agreed to use CTI - Category, Type, Item.\n\nIn CTI there are the following potential name parts:\n\n- Domain (optional)\n - An optional 2–4 letter prefix that identifies the system the token belongs to. This name part is only required if there are multiple systems that have tokens and we want to make it easy to differentiate to which system this token belongs to.\n- **Category**\n - What the token is. (eg. color, dimension, opacity)\n- Mode (optional)\n - If the same token exists in different modes (eg. light, dark etc.) this name part indicates for which of those modes this token is intended for. This is only used if there is a mode for the category.\n- **Type**\n - How the token is used. (eg. background, text, icon, border)\n- Item\n - The component it’s used on. (eg. Button, Modal, Card)\n- Variant\n - Variants of the component (eg. default, primary, secondary, warning)\n- State\n - For example interactive states (eg. default, hover, active etc.) or sizes (eg. small, medium, large)\n- Context\n - Color behavior relative to a background or the intrinsic size of the item. (onDark, onLight, 8ColumnsWide)\n\n\n\nAll tokens have to have at least a category name part plus a type, item or variant name part. A token name can have more than one state and more than one variant.\n\nIt is also possible to repeat name parts. For example if you need to further define where in a component a token is applied you can repeat the item name part for example: `color-background-slider-track` which would be `category-type-item-item`. This name part repeating pattern can also be used to create multidimensional themes: `color-background-canonical-light-default` which would be `category-type-mode-mode-variant`.\n\n## **Token name part order**\n\nCTI can be ordered in different ways: CTI and ITC (Item, Type, Category). The order impacts both the token's final name and its definition's nesting structure. For instance, with CTI, all colors are grouped together. Conversely, using ITC (Item, Type, Category) results in all tokens for a specific component being grouped.\n\n​\n\nWe have agreed to use the CTI order. It makes more sense to group the tokens by category than by element/component. For example, it makes more sense to compare the background color of a button to the background of the page it is on rather than the text size of the button's label.\n\n# **Token value standardization**\n\nFor all of the categories we want to stay consistent in how we save the value of a token. The way in which the values of a category are saved are to be defined in the specification of the tokens of a category.\n\n## **Token scales**\n\nThere are two different naming schemes we have for scales in design tokens: a scale based on **magic numbers** and a naming scheme based on **t-shirt** sizes.\n\nWe think that it is necessary to have at least two scale naming schemes, as we will have scales both in primitive tokens and semantic tokens. Using the same scale naming scheme for both would be confusing, as they would not necessarily be related to each other.\n\nIn the following paragraph we are going to explain what these scales look like, the advantages of each, and in which use cases they should be used.\n\n### Magic numbers\n\nA magic number scale usually looks something like this: 100, 200, 300, 400 etc. It can be based on 10s, 100s, 1000s or any other base. The base is defined by its use cases and the personal choice of the person creating the scale\n\nOne of the main advantages of a magic number based scale is that there is no fixed number of tokens in the scale. For example if your initial token set is 100, 200, 300, 400, 500 and at a later point you realize that you desperately need a value between 200 and 300 you can introduce a 250 token without having to rename any other tokens to accommodate this new token.\n\nAnother advantage is that it makes it easy to make calculations based on the magic number of the token. You can create a function which takes a magic number step as an input and from that derives the value of that step. \n\nFor example, our dimension tokens could be:\n\n`dimension-100` is 0.5rem and `dimension-200` is 1rem. So, in this case, it's as simple as dividing the magic number step by 200 to get the rem value of the dimension token. And this relationship between magic number steps is quite easy to understand and, therefore, an advantage of the magic number scale.\n\nThese functions can become more complex, as will be the case for our color palette. We will calculate the color based on the magic number step, which makes generating the palette easier. What exactly the calculation is will not be as obvious as for the dimensions.\n\nThis relation between tokens is quite easy to understand with magic number-based tokens, making magic number-based scales usually quite intuitive.\n\n### **T-shirt sizes**\n\nT-shirt size based scales usually look like this: xxs, xs, s, m, l, xl, xxl.\n\nBoth an advantage and disadvantage of t-shirt sizes is that it's a pretty fixed scale. Theoretically you can extend the edges by adding more x’s, but the middle of the scale is fixed. For example, no new values can be introduced between M and L. \n\nThis means that t-shirt size scales are best used for a scale in which the number of values should be restricted. For example, usually you don’t want to allow infinitely many radii in a design system but keep it at most to something like 5. And usually there is also no pressing need to introduce a new radius between radius-m and radius-l.\n\nWhile magic number based scales almost necessitate a defined relationship between each value, that is not necessarily the case for t-shirt sizes. There is more leeway to not have a hard computational relationship between for example s and xxl.\n\nWhile the relation between tokens is therefore maybe not as clear as with magic numbers, t-shirt sizes are slightly more semantic. It is easier to understand what to apply a “large” token to compared to a “800” token.\n\n### **When to use each?**\n\n**Magic numbers** should only be used for primitive tokens to define the base scale of that category. So for example in the color category for the base color palette or in dimensions for the base dimensions scale. Here the advantage of being able to add new tokens after the fact is important, as the needs for new base values in a category might come up as the design system scales.\n\n**T-shirt** sizes *can* be used for primitive tokens, but only if it is necessary to differentiate from an already existing magic number scale in the same category, and if few values are expected (generally 5 or less). For example in the dimension category we would have a set of base dimension values based on a magic number scale. But radii will not be based on this scale so we also need to introduce a primitive scale for radii. This scale can and should be based on t-shirt sizes to differentiate it from the main primitive dimension scale and to already introduce a constraint on the amount of primitive radii token that can be created.\n\n**T-shirt** sizes *must* be used in semantic tokens. For example to create a font scale based on the primitive dimension tokens.\n\n \n\n\n\n\n# References: \n\n[Canonical Internal]: [Spec DE015 - Design Tokens](https://docs.google.com/document/d/1G45-Q3hUDhD6X7B6tSZiiME4euANxsyVdfS4pt9899w/edit?usp=sharing)\n\n[External]: [Design Tokens Community Group](https://www.designtokens.org/)";
10
+ ds:conceptType ds:concepttype.Explanation.
@@ -0,0 +1,10 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:concept.Filtering-patterns a ds:Concept;
6
+ ds:name "Filtering patterns";
7
+ ds:summary "This documentation outlines the various search and filter patterns that can be used on sites, apps and docs to help users narrow down datasets into relevant results. It ranges from simple search functions to complex query builders. The designer should select a search and filtering mechanism that considers screen real estate, dataset size, and user intent, as outlined in the document.";
8
+ ds:tier ds:global;
9
+ ds:content "# **Specification**\n\n## Search \n\nSearch facilitates information retrieval from a dataset based on a user’s written search query. Types:\n\nTable 74\n\n​\n\nIf including search in your design, use this decision tree as a starting point. Additional considerations are in the comparison table below. \n\n\n\n## Filtering pattern\n\nFilters help users refine a dataset based on parameters set by the user. Types: \n\nTable 75\n\n​\n\nUse this decision tree as a starting point for your design. Additional considerations are in the comparison table below. \n\n## \n\n## Filter option component types\n\nThese filter option components can be triggered by a button in a filter bar or by a singular filter button. These options will likely be expanded on in the coming cycles, as we may also add other input types such as date pickers and numerical inputs. \n\nTable 76\n\n​ \n\n\n## Comparison table\n\nTable 77\n\n\n\n## Layout options\n\nTable 78\n\n\n\n## System behaviour\n\n### **Data fetching**\n\nIn deciding whether to update data dynamically or to apply batch filtering, the following considerations should be made:​\n\n- **Live filtering**: Updates dataset immediately upon selection of filters. Appropriate for simple, short lists of filters and when performance would not be an issue. Not appropriate for multi-select filters where additional friction may be required - use per-filter fetching instead in this case.\n - Note: Dynamic filters can be disorienting for users, please read the [accessibility guidelines](https://docs.google.com/document/d/13k8WUm2Ahn-w_LG66D-KhxVwxJlIwXUJjWjs-e1Xhq8/edit?tab=t.q7yulhuv2mvg#heading=h.y6bzj1gszlkm) if implementing this approach. \n- **Per-filter**: Updates when the user completes their selection within a filter category and clicks outside the dropdown area or clicks an “Apply” button for multi-select filters, or as soon as the user makes a selection for single-select filters. This is an intermediary solution between live and batch filtering.\n- **Batch filtering**: Updates the dataset only when the user clicks a global “Apply” button. Appropriate for complex and large datasets as it prevents the UI from switching while users make their selection, or when performance is a concern.\n\n### **Loading states**\n\nDepending on the amount of time taken to fetch results as a result of search and filtering, different types of user feedback should be provided:\n\n- If results can be surfaced in less than 1 second, do not add a loading state as users will not be able to pick up on what happened. \n- If it takes longer than 1 second, loading states should be used to provide feedback that a task is in progress ([NN Group](https://www.nngroup.com/articles/progress-indicators/)). Use the [processing button state](https://vanillaframework.io/docs/patterns/buttons#processing). \n- For anything that takes more than 5 seconds to load, do not use spinners as progress indicators as users cannot be sure if the system is still working and may abandon the task entirely. Consider using percentage-done progress indicators instead. \n\n## Filter selection indicators\n\nTable 79\n\n\n\n## Content guidelines\n\n### **Filter categories**\n\n- Only use filters for the most relevant categories that users need. Try to limit the number of filters so users aren’t overwhelmed.\n- Use descriptive category headings so users can predict what values are in the category and understand the differences between categories.\n- Categories should appear in order of most general to most specific. For example, filters should progress from product category, brand and color, price, size and weight.\n- Consider the order of the options within filter categories. Quantitative filters should be in ascending or descending order. Qualitative categories should be alphabetical or in order of relevance/popularity.\n\n### **Common copy for filter interactions**\n\n- **Filter by** label can be included next to the buttons, but isn’t required.\n- **Apply** button to trigger batch filtering.\n- **Clear all** to clear filters selected across categories.\n- **Reset all** to reset filters across categories to the default view, which may be pre-filtered. For example, on a “My requests” page, the default view has the filter requester = user applied, so resetting would display this pre-filtered view. \n- **Clear selection** to clear filters selected within a category\n- **Select all** to select all filters within a category.\n\n \n\n\n\n\n## Accessibility\n\nFilters should adhere to the accessibility guidelines for the components used within the filters. For instance, if combo boxes are used within the filters, designers should follow the accessibility guidelines for combo boxes. \n\n​\n\nEnsure:\n\n- Filters are labeled.\n- All filter controls should be navigable with a keyboard. Users should be able to tab through options, use arrow keys to move between options, use the spacebar to select/deselect options, and use the enter key to trigger buttons.\n\n \n\n\nWCAG’s [3.2.2 On Input (Level A)](https://www.w3.org/WAI/WCAG22/Understanding/on-input) outlines that users should be warned if their context will change based on their input, ensuring that interactive content is predictable. Context changes include a page reload, navigation to a new window, moving focus to another component and any other change that disorients the user. If a context change occurs, ensure the design:\n\n- Includes [submit buttons](https://www.w3.org/WAI/WCAG22/Techniques/general/G80) so the user has control in applying changes, or; \n- Includes[ written instructions](https://www.w3.org/WAI/WCAG22/Techniques/general/G13) before the filters to describe what will happen before a change occurs. \n\n \n\n\nIf a dynamic filter updates results on the same page, it does not count as a change of context. In this case, the screen should: \n\n- Communicate that the results have changed by including the number of results shown or updating the heading (e.g. <h2>Results (24)</h2>).\n- The focus stays on the filter the user last interacted with.\n\n \n\n\n# **Spec History and Changelog**\n\nTable 80\n\n​";
10
+ ds:conceptType ds:concepttype.Explanation.
@@ -7,5 +7,4 @@ ds:concept.Foundations-Baseline a ds:Concept;
7
7
  ds:summary "This document covers the 4px baseline grid every piece of text in the form system seats itself on: what the grid unit is, how a line of text is placed on it from the font's own metrics, why the placement holds at any font size without per-element tuning, and how control text is kept from drifting off it.";
8
8
  ds:tier ds:global;
9
9
  ds:content "**Status:** Final \n**Version:** 1.0 \n**Last updated:** 2026-09-11 \n**Source:** `@canonical/react-ds-global-form` Storybook guide — _The Baseline Grid_\n\n\nEvery piece of text in the form system seats itself on a shared 4px baseline\ngrid. A control's label, an input's value, and a paragraph of running prose all\nland their baselines on the same set of horizontal lines, so a form reads as one\ncontinuous rhythm rather than a stack of independently-spaced boxes. This guide\nexplains what the grid is, how text is placed on it, and why the placement holds\nat any font size without per-element tuning.\n\nFor how to _apply_ densities and drive the form's spacing from them, see\n**Density & the Form Channel**.\n\n## The grid unit\n\nThe grid is defined by a single custom property, `--baseline-height`, which the\ntypography engine sets to **4px** (`0.25rem`). Everything vertical is expressed\nas a whole multiple of this unit — a control height, a gap between fields, the\npadding that seats a line of text. Because the unit is a variable, the whole\nsystem re-flows if it changes; nothing hard-codes `4px`.\n\nThroughout this documentation, spacing is quoted in **baseline units** (bU): 1 bU\n= `--baseline-height` = 4px. A 32px control is \"8 bU\"; a 24px gap is \"6 bU\".\n\n## How a line of text seats on the grid\n\nA font does not place its baseline at the top or bottom of its line box — it sits\nsome fraction of the way down, determined by the font's metrics. To land that\nbaseline on a grid line, the system adds a calculated top padding.\n\nThe distance from the top of a `line-height: 1` box to the text baseline is\napproximated, font-relatively, as:\n\n\\`\\`\\`css\n--natural-baseline: calc((1em + 1cap) / 2);\n\\`\\`\\`\n\n`1cap` is the cap height of the current font, `1em` its size. The average of the\ntwo is a close, size-independent stand-in for where the alphabetic baseline sits\n— no magic pixel constant, and correct at any font size because both terms scale\nwith the font. That size-independence is the entire reason for the cap-unit form:\na naive implementation would hard-code a pixel offset per font size and break the\nmoment the size changed; this expression tracks the font automatically.\n\nThe text is then seated on a chosen grid line — the **target baseline** — by\npadding the top with the remaining distance:\n\n\\`\\`\\`css\n--space-before: max(0px, calc(target − --natural-baseline − border-top));\npadding-block-start: var(--space-before);\n\\`\\`\\`\n\nThe result: the first baseline lands exactly on `target`, which is always a whole\nbaseline multiple, so the text is on the grid.\n\n## A worked example\n\nTake **apps-comfortable**, the default cell. Its control height is a whole\nbaseline multiple:\n\n\\`\\`\\`\ncontrol-height = --baseline-height × 8 = 32px (8 bU)\n\\`\\`\\`\n\nThe density model seats a control's single baseline on its **target line**, which\nis two-thirds of the box height, rounded to the _nearest_ baseline:\n\n\\`\\`\\`\ntarget = round(nearest, control-height × 2/3, --baseline-height)\n = round(nearest, 32 × 2/3, 4)\n = round(nearest, 21.33px, 4)\n = 20px (5 bU)\n\\`\\`\\`\n\nRounding to the nearest line (not up) is deliberate. Two-thirds of the height is\nthe optical centre a control's text wants; snapping to the _nearest_ grid line\nstays as close to it as the grid allows. An earlier revision rounded _up_, which\nover-lifted the one cell where `height × 2/3` is fractional — apps-comfortable's\n21.33 was forced a whole step down the page to 24, a baseline too low (the\ndesign-review \"move text one baseline up\" finding). The exact-multiple cells are\nunaffected either way:\n\n\\`\\`\\`\napps-comfortable 32 × 2/3 = 21.33 → 20 (the fix; was 24)\napps-dense 24 × 2/3 = 16.00 → 16 (exact)\nsites-comfortable 36 × 2/3 = 24.00 → 24 (exact)\nsites-dense 28 × 2/3 = 18.67 → 20 (nearest = up here)\n\\`\\`\\`\n\nNow seat a 14px label into that box. With a cap height of roughly 10px for the\nbody face:\n\n\\`\\`\\`\nnatural-baseline = (1em + 1cap) / 2 = (14 + 10) / 2 = 12px\nspace-before = max(0px, 20 − 12 − border-top)\n\\`\\`\\`\n\nFor a borderless label (`border-top = 0`) that is `20 − 12 = 8px` of top\npadding, and the baseline lands exactly on the 5th grid line. Change the font\nsize and both terms move together, so the arithmetic still lands on `20px` — the\ntarget never has to be re-tuned per size.\n\nThe stories below force the baseline overlay on, so this seating can be read\ndirectly: the label's baseline and the input's baseline both rest on the same\npink band boundary.\n\n_(An interactive example accompanies this section in Storybook.)_\n\n## The whole-multiple invariant\n\nThe single rule that keeps _multi-line_ content on the grid:\n\n> A line-height that must stay on the grid has to be a whole multiple of\n> `--baseline-height`.\n\nThe first line seats on the grid via `--space-before` (above). Each subsequent\nline advances by exactly one `line-height`. So every wrapped line lands on a grid\nline **if and only if** the line-height is itself a whole baseline multiple. A\nsingle-line control can use any line-height (only its first baseline matters); a\nparagraph or a textarea cannot — its line-height must be snapped to the grid.\n\nThe typography engine already guarantees this for prose: it computes each tier's\nline-height as `round(up, font-size × ratio, --baseline-height)`, a snapped\nvalue. A `1rem × 1.5` body line snaps to `24px` — exactly 6 bU — so running text\nstays on the grid line after line. This is also why the textarea, alone among the\nform controls, takes the density line-height (a whole multiple) rather than the\n`line-height: 1` crush: it has many rows, and every row must land on a grid line,\nnot just the first.\n\n## Two ways text reaches the grid\n\nThe system seats text through two distinct mechanisms, applied to two disjoint\nsets of elements. Knowing which owns a given element is the key to the whole\nmodel.\n\n- **Controls** — seated by the **density model** on the density _target_ line\n (`round(nearest, height × 2/3, baseline)`, as worked above). This is what\n makes a 32px button's label and a 32px input's value share one line. Boxed\n controls (the button, the single-line input) use the **intrinsic seat**\n described below — their text carries a real line box that _is_ the control\n interior. The field label / description / error, which are bare text rather\n than boxes, use the simpler `line-height: 1` crush + `--space-before` pad.\n\n- **Running prose** — bare `p`, `h1`–`h6`, and anything in an `.editorial`\n context. These are seated by the **typography engine**: each keeps its tier's\n snapped natural line-height and is nudged onto the _nearest_ grid line (via the\n engine's `--start-nudge` / `--end-nudge`), so multi-line reading rhythm is\n preserved and every wrapped line stays on-grid.\n\nThe two never fight over the same element. Density seats controls; the engine\nseats prose. Because they write to **disjoint** element sets, there is no\nspecificity war between them — a point returned to below. A paragraph placed next\nto a control will sit on _a_ grid line, but not necessarily the control's target\nline — controls and prose answer to different seating rules by design.\n\n## The intrinsic control seat\n\nA boxed control (the button, the single-line input chrome) does **not** set a\nheight. Its height _emerges_: the text's own line box is the control interior,\nand border + padding + line-height add up to exactly the density cell.\n\nThe shared styles layer (`@canonical/styles`, `modifiers.density.css`) exports\ntwo pieces:\n\n\\`\\`\\`css\n/* The control's interior line box: the cell minus one baseline of headroom\n per side. 32px cell → 24px line; 24px cell → 16px line. */\n--control-seat-line: calc(\n var(--density-line-height-effective) - 2 * var(--baseline-height)\n);\n/* The unclamped distance from just inside the box's top border down to the\n target baseline, for a --control-seat-line line box. */\n--control-seat-basis: calc(\n var(--density-target-baseline-px) - (var(--control-seat-line) + 1cap) / 2\n);\n\\`\\`\\`\n\nEach control folds its **own** border into that basis and closes the box with a\ncomplement pad — the fold must happen at the component, because a `var()` inside\na custom property is substituted where the property is _declared_ (the density\nscope), so the shared layer can never read a component's border width:\n\n\\`\\`\\`css\n--seat-before: round(\n nearest,\n max(0px, calc(var(--control-seat-basis) - <border-width>)),\n 0.25px\n);\n--seat-after: max(0px, calc(\n var(--density-line-height-effective) - var(--control-seat-line) -\n var(--seat-before) - 2 * <border-width>\n));\nline-height: var(--control-seat-line);\npadding-block: var(--seat-before) var(--seat-after);\n\\`\\`\\`\n\nThe invariant: `border + seat-before + line + seat-after + border = the cell`,\nwith no `block-size` anywhere. Both outer edges land on grid lines, and the text\nbaseline lands on the target — at any font size, because `1cap`/`1em` resolve at\nthe element that applies the seat. (`--seat-before` is rounded to ¼px so the pad\nis exactly representable in the browser's 1/64px layout units; the fractional\ncap term otherwise leaves ~1/60px residues on the box height.)\n\n## The border is always present\n\nFor the geometry above to be _one_ formula, the border must be a **constant** of\nthe control, not a variant knob: every importance carries the same nominal\nborder width, and a \"borderless\" variant paints it `transparent` rather than\nremoving it. The button implements exactly this — its outline flag toggles the\nborder's **colour**, never its width:\n\n\\`\\`\\`css\nborder-width: var(--button-border-width); /* constant, both importances */\nborder-color: color-mix(in srgb,\n var(--modifier-color-border) calc(var(--modifier-outline, 0) * 100%),\n transparent);\n\\`\\`\\`\n\nA width-toggled border (an earlier revision multiplied the width by the flag)\nmakes the borderless variant 2px shorter and seats its label a pixel high — the\nbox geometry forks per importance, which is precisely what the constant border\nexists to prevent. A borderless primary and a bordered secondary are now\nbyte-identical boxes; only the paint differs. The example below places the two\nside by side against the overlay.\n\n_(An interactive example accompanies this section in Storybook.)_\n\n## Why not just set `line-height: 1` everywhere?\n\nCrushing everything to `line-height: 1` seats the _first_ line of any element on\nthe grid, which is why an earlier iteration did exactly that. But it breaks\nrunning prose two ways: it removes the leading that makes multi-line text\nreadable, and — because a crushed line-height is not a whole baseline multiple —\nit lets every _wrapped_ line drift off the grid.\n\nThe first fix (call it \"Stage A\") was to **partition** the two mechanisms:\ndensity seats controls only, and the typography engine owns prose. Because the\ntwo now write to disjoint element sets, `.editorial` composes with density\nwithout a specificity war, and — since the engine snaps prose line-height to a\nwhole baseline multiple — wrapped-prose drift is gone as well.\n\nThe second (\"Stage B\", the intrinsic seat above) retired the crush from the\n**boxed** controls too: the button and the single-line input now carry a real\nline box (`--control-seat-line`) instead of `line-height: 1` + a fixed box\nheight. The crush survives only on the field label / description / error — bare\nsingle-line text where it is harmless — and even there it is an implementation\ndetail of their seat, not a box model.\n\n## The \"control text drift\", solved\n\nEarlier revisions carried an empirical knob, `--control-text-drift-AVOID-USAGE`\n(~2px), to explain why a native `<input>` rendered its text lower than a\n`<span>` at byte-identical CSS. The intrinsic seat exposed the real mechanism —\nit was never a metrics quirk of editable controls:\n\n> **The user agent enforces a `line-height` floor of `normal` (≈1.2em) on a\n> single-line `<input>`.** A specified line-height below the floor is silently\n> clamped.\n\nUnder the old `line-height: 1` crush, the input's 14px line was silently\nrendered as a 16.8px line — the extra 2.8px of half-leading pushed the glyphs\ndown, and the \"drift\" knob was hand-calibrated to cancel a clamp nobody had\nidentified. Give the input a **real** line box (the intrinsic seat's\n`--control-seat-line`, ≥ the floor in the comfortable cells) and it positions\ntext exactly like a `<span>`: measured, the input's baseline lands on the\nlabel's to within 0.01px with **no** drift term.\n\nThe floor still exists, so the input's seat computes with the line the UA will\nactually use:\n\n\\`\\`\\`css\n--seat-line-floored: max(var(--control-seat-line), 1.2em);\n\\`\\`\\`\n\nIn dense cells (16px line < 16.8px floor) the clamped line is what enters both\nthe seat and the closing pad, so the box still lands on the cell. The knob\nsurvives only on the textarea path, pending the same treatment — expect it to be\nthe same artifact.\n\n## The debug overlay\n\nThe Storybook baseline overlay (the stepped pink bands) is driven by the same\n`--baseline-height`, so it always draws the real grid. Turn it on to read any\nelement against the grid: a correctly-seated baseline sits on a band boundary.\nThe overlay is a measuring tool only — it is never part of a shipped component.\nThe example stories above enable it automatically, which is why their controls\nappear striped.";
10
- ds:knownEdgeCases "";
11
10
  ds:conceptType ds:concepttype.Explanation.
@@ -0,0 +1,10 @@
1
+ @prefix ds: <https://ds.canonical.com/>.
2
+ @prefix anatomy: <https://anatomy.canonical.com/>.
3
+ @prefix dt: <https://dt.canonical.com/>.
4
+
5
+ ds:concept.Foundations-Color a ds:Concept;
6
+ ds:name "Foundations: Color";
7
+ ds:summary "This document describes Pragma’s approach to defining color palettes and the corresponding color design tokens. ​These design tokens are meant to be used across the entire design system as well as for brand purposes.\n\nFor the general Design tokens specification go to [Design tokens: Overview](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-GnfOU3MM-3/_rui-BlNN-e8ieQ). \n\n\nColor palettes in UI design serve as comprehensive collections of colors that support diverse UI requirements. They should provide enough range to accommodate different use cases and to create different themes - including light, dark and high-contrast versions - all while maintaining visual consistency. Therefore it is common practice to include more colors than are immediately needed to accommodate future growth of the design system and evolving product and brand requirements. \n\n​This color palette and corresponding set of design tokens will emphasize color contrast and accessibility requirements. This approach is intended to achieve three main objectives:\n\n1. Simplify the selection of colors (picking one instead of having to create one)\n2. Facilitate the easy creation of accessible color combinations that meet contrast requirements\n3. Create a systematic color framework to improve overall visual consistency";
8
+ ds:tier ds:global;
9
+ ds:content "# Requirements\n\n## **Consistency**\n\nFor colors to look consistent across an entire palette and for our contrast rules to work properly, the lightness within a step must be approximately the same. This means that if there are steps such as 5, 10, 15 ... 85, 90, 95, each color within the step of e.g. 50 must have approximately the same lightness.\n\nThe saturation curve should also be consistent across the entire palette. However, the saturation scale can be increased or decreased for specific colors or color groups to accommodate different use cases such as semantic colors (which should generally be more saturated) or brand colors (which can be less saturated). So while the absolute saturation may vary, the relative rate at which the saturation changes should ideally remain the same.\n\n​\n\n\n\nFig. 1: Two saturation curves. The red curve is scaled down to have a lower absolute saturation. But the relative rate of saturation changes is the same so colors look consistent.\n\n​\n\nWe will also have to have some tolerances as not every hue is able to exhibit every possible lightness and saturation. For example, there is no dark yellow.\n\n## **Hues**\n\nThe Canonical theme of the Pragma design system will include the following [hues](https://en.wikipedia.org/wiki/Hue): \n\nHues\n\n## **Saturation**\n\nFor the first version of the color palette we will go with a [saturation](https://en.wikipedia.org/wiki/Colorfulness) curve that for the most part follows the “natural” saturation curve of colors where the extreme ends are less saturated and the middle is more saturated. This saturation curve can be adjusted by setting a minimum and maximum saturation. The following min and max values have been chosen for the colors:\n\n​\n\nSaturation\n\n## **Lightness**\n\nThe most easily recognizable difference between shade steps is lightness. The lightness between steps is determined by the contrast requirements described in the following paragraphs, as the lightness contrast (which is the contrast that affects accessibility) is, as the name suggests, determined by the difference in lightness of a color pair.\n\n### Accessibility & contrast\n\n#### **Law**\n\n[Many countries around the world have laws related to web accessibility](https://www.w3.org/WAI/policies/). While these laws do not always (but sometimes) apply to the private sector, they do have an impact on the public sector and therefore on the procurement of services by public sector organizations from private sector companies. Accessibility should of course be pursued in all cases, but in some countries it may also be a legal requirement or a condition for public sector organizations to become customers.\n\nThis means that we need to abide by [WCAG 2.* AA](https://www.w3.org/WAI/WCAG2AA-Conformance) rules in our UIs. For this color palette work the following WCAG 2.2 success criterion are applicable:\n\n- [1.4.3 Contrast](https://www.w3.org/WAI/WCAG20/Understanding/contrast-minimum#:~:text=%3A%20Contrast%20(Minimum)-,Success%20Criterion%201.4.,Large%20Text)\n - The visual presentation of[ text](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html#dfn-text) and[ images of text](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html#dfn-image-of-text) has a[ contrast ratio](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html#dfn-contrast-ratio) of at least 4.5:1\n- [1.4.11 Non-text Contrast](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html)\n - The visual[ presentation](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast#dfn-presentation) of the following have a[ contrast ratio](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast#dfn-contrast-ratio) of at least 3:1 against adjacent color(s):\n - User Interface Components: visual information required to identify[ user interface components](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast#dfn-user-interface-component) and[ states](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast#dfn-state), except for inactive components or where the appearance of the component is determined by the user agent and not modified by the author;\n - Graphical Objects: parts of graphics required to understand the content, except when a particular presentation of graphics is[ essential](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast#dfn-essential) to the information being conveyed.\n\n#### **WCAG contrast algorithm vs APCA**\n\nUnfortunately the [contrast algorithm in WCAG 2](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html#visual-audio-contrast-contrast-intent-head:~:text=is%20much%20larger.-,Notes%20on%20formula,-Conversion%20from%20nonlinear) (which is based on [ISO-9241-3-1992](https://cdn.standards.iteh.ai/samples/16875/4e1bf8a0a2d34083a45e301f1e30884c/ISO-9241-3-1992.pdf)) is[ quite flawed](https://github.com/Myndex/SAPC-APCA/discussions/30). It has both false negatives and false positives. Meaning it passes colors that do not have enough contrast and doesn’t pass some colors that do have enough contrast. A contrast algorithm evidently better at actually predicting human perceived color contrast is [APCA](https://git.apcacontrast.com/documentation/APCAeasyIntro.html).\n\nThis puts us in a dilemma. On the one hand, we want to be as accessible as possible and therefore use APCA to determine contrast as people actually perceive it. On the other hand, of course, we want to comply with the law and avoid unnecessary discussions with customers about the details of accessibility.\n\nAfter having tested an APCA based color palette in [DE024 - Color palette](https://docs.google.com/document/u/0/d/14qB9_j_A2Th-t-vzma-CFKleSSXRvwLHg4oUw1AvhX0/edit) we came to the conclusion that a WCAG based color palette fits our needs better. After all, we need to be following the WCAG contrast requirements and trying to follow both APCA and WCAG diminishes the ease of use for this palette and makes the color pairs so dark (to meet both APCA and WCAG) that the resulting color pairs are undesirable from a branding perspective. \n\n**Improving the experience of selecting an accessible contrast**\n\nAs part of this specification we did [internal user research](https://miro.com/app/board/uXjVL2kS6jk=/) and one of the biggest identified pain points when having to select a color for e.g. a new component is the hassle of having to verify it meets the above mentioned accessibility requirements. That's why, for this new color palette, we want to make accessible contrast guarantees a core of the new color palette and thereby improve the experience of selecting accessible color pairs.\n\nWe aim to achieve this by providing the following contrast guarantees:\n\n- Shade steps that are 400 or further apart have a WCAG contrast of at least 3:1\n- Shade steps that are 500 or further apart have a WCAG contrast of at least 4.5:1\n- Shade steps that are 700 or further apart have a WCAG contrast of at least 8:1\n\nThis way it is possible to select any color in the palette as a background and be able to pick a foreground/text color that is guaranteed to meet the required accessibility/contrast standards.\n\n## **Shade steps**\n\nThe number of shades for each hue presents a challenge. As outlined before we want to provide more colors than are immediately needed to accommodate future growth of the design system and evolving product and brand requirements. On the other hand too many shades disrupt visual hierarchy and consistency, impacting both design decisions and user experience.\n\nThe palette was built with a magic number scale as described in the [Design tokens: Overview](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-GnfOU3MM-3/_rui-BlNN-e8ieQ) specification. This gives us the flexibility to add additional shades in the future if the need arises.\n\nThe final result of shade steps based on this method are:\n\n- 0\n- 20\n- 40\n- 70\n- 100\n- 180\n- 280\n- 398\n- 520\n- 590\n- 700\n- 820\n- 930\n- 960\n- 990\n- 1000\n\n\n\nAt first look this might look like an arbitrary selection of shade steps with no real rhythm or rhyme to it. But these steps have been intentionally and precisely chosen. To propose the specific shade steps in this specification we have done an exercise of figuring out the color needs that we have / will have in our Design system. \n\nWe have defined the following different types of color needs that we have when we design UIs:\n\n- **Background**\n - Background layer 1\n - Background layer 2\n - Background layer 3\n- **Foreground**\n - Primary foreground\n - Secondary foreground\n- **Border**\n - Primary border\n - Secondary border\n - Highlight border\n- **Text**\n - Primary text\n - Secondary text\n - Interactive text\n - Text on primary foreground\n - Text on secondary foreground\n\n\n\nThese types of color needs all have different contrast requirements to each other (see [law](https://docs.google.com/document/d/1vL0W-MA5QOLnQ_yZMt1xJ-tsVmiy5UD8613XCnpdi0w/edit?tab=t.0#heading=h.lw4l5xxm4acn) section). We created a custom tool where we encoded these types of color needs and all contrast requirements between them. This helped us to move around the colors within the bounds of the legal requirements and helped us strike a balance between abiding by the law and meeting brand needs. Using this methodology we arrived at the shade steps defined above which should perfectly match our current UI needs.\n\n#### Shade steps for ephemeral states (i.e. hover, active, disabled etc.)\n\nShade steps for ephemeral states will be created dynamically by manipulating the lightness values of the colors in the palette and they will therefore not be part of the main palette.\n\n## **Target color space**\n\nA color space is a specific organization of colors, which helps in the reproduction of color in both physical and digital realms. It defines a range of colors that can be represented and manipulated.\n\nThere are two color spaces that come into question for this color palette:\n\n- [srgb](https://en.wikipedia.org/wiki/SRGB)\n- [Display P3](https://en.wikipedia.org/wiki/DCI-P3)\n\n\n\nSrgb is the color space that has been the standard on the web until now and almost every device today can display srgb colors completely. Display P3 is a more modern color space that contains about 25% more colors than srgb. [Display P3 has baseline support since 2023](https://caniuse.com/css-color-function) and it is becoming apparent that [Display P3 will be the next web standard](https://github.com/w3c/csswg-drafts/issues/8659#issuecomment-1489160030). \n\n[We have created a metric on Google Analytics](https://analytics.google.com/analytics/web/#/analysis/p253146907/edit/SzNReRP4RpWaFJuTgVDR6A) for ubuntu.com and there we can see that about 88% of our users can display srgb, about 12% can display Display P3 and a negligible proportion cannot even fully display srgb.\n\nThis means that although a significant proportion of our users can already display Display P3, it does not make sense to use Display P3 as the target color space for this version of the color palette. \n\n## **Working color gamut**\n\nA color gamut is the complete range of colors that can be represented in a specific color space. It defines the limits of color reproduction for that space.\n\nFor creating the color palette we want to work in a perceptually uniform color gamut (such as [OkLch](https://bottosson.github.io/posts/oklab/)). Perceptually uniform in this case essentially means that the color gamut is modelled according to human color perception. This is in contrast to RGB for example which is modelled to make it easy for computers to display colors.\n\nFor example a 10-point lightness increase should feel the same whether applied to yellow or red. In other, RGB based, color gamut such as HSL this is not the case and you might get widely different brightness jumps for different hues, for the same 10-point lightness change.\n\nWhat this means is that perceptually uniform color gamut such as OKLch lend themselves a lot better to creating color palettes that appear to be visually consistent from a human perception.\n\nFor this color palette we have chosen to work with [Okhsl](https://bottosson.github.io/posts/colorpicker/)\n\n- Okhsl is based on Oklab but tries to fix the out-of-gamut problem of Oklch. By doing that it is not truly perceptually uniform anymore. It tries to strike a tradeoff between ease of use from traditional color gamut like HSL and the perception accuracy from Oklab / Oklch.\n- This tradeoff is favorable as color palette generation is significantly simpler with this tradeoff.\n- Okhsl only supports srgb but it [seems to be relatively simple to expand it to Display P3](https://github.com/w3c/csswg-drafts/issues/8659#issuecomment-1500699972), [Source code for Okhsl-P3](https://gist.github.com/facelessuser/2315c37741ae5253b8b42d2d41bcfa5a)\n\nTo evaluate the actual difference between colors we can still use OkLch.\n\n## **Unit**\n\nWhile the colors that we create for this first version of the color specification are within the srgb color space we would ideally like to use a color gamut that is able to encode Display P3 colors as well. So that when we want to expand our color space in the future we don’t need to change the color gamut / our unit. Additionally it makes sense to pick a unit which is human readable/understandable, where the components of the unit map to human understandable properties of color (lightness, chroma, hue) and the rate of change for those properties matches human perception too (perceptually uniform color gamut). \n\nFor these reasons we have chosen OKLch as the color gamut / unit to represent our colors. It is perceptually uniform, can encode Display P3 colors and is supported by the [W3C Design token specification](https://www.designtokens.org/tr/drafts/color/#oklch) as well as having [native support in CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch).​\n\n## **Interactive states**\n\nInteractive states such as hover, active and disabled are not represented as dedicated shades on the color palette. Adding them as palette shades would have introduced three additional steps per hue, bloating the palette with very subtle lightness differences that serve only a narrow purpose. Instead, interactive states are derived dynamically by manipulating the OKLch lightness and chroma components of the base color. This is possible because we represent our colors in OKLch: its lightness channel can be adjusted directly to produce perceptually consistent state changes across every hue and shade.\n\nThese adjusted lightness values are stored as primitive number tokens (e.g. number.lightness.foreground.primary.hover.onLight). Semantic color tokens then reference these number tokens in place of the lightness component, while keeping the chroma and hue of the base color intact. This means a single set of number tokens drives the interactive states for all semantic meanings (destructive, constructive, branded, etc.) that share the same foreground type, because the lightness shift is independent of hue.\n\nAdditionally, disabled states use a universal chroma token (number.chroma.disabled, set to 0.1) that replaces the original chroma value. Reducing chroma desaturates the color, reinforcing the visual impression that the element is inactive. This is applied alongside the lightness adjustment so that disabled elements appear both lighter (or darker in dark mode) and less saturated.\n\n### Why lightness manipulation over opacity\n\nA common shorthand for disabled states is to reduce the opacity of the element. We deliberately chose direct lightness manipulation instead, for the following reasons:\n\n- **Layering issues.** Elements that are positioned absolutely, such as floating action buttons or dropdown menus, sit above other content. Applying opacity to these elements makes the content behind them visible through the element, which is visually undesirable and can harm readability.\n- **Precision.** Opacity reduces apparent lightness as a side effect, but the resulting lightness change depends on the background color beneath the element. The same opacity value produces different perceived lightness shifts on different backgrounds. By manipulating the OKLch lightness channel directly, we achieve a deterministic and consistent result regardless of what sits behind the element.\n- **Independent control of foreground and background.** Opacity affects the entire element uniformly. With direct lightness manipulation we can adjust the foreground fill and the text on that foreground independently, ensuring both remain legible in their disabled state.\n\n### How the lightness values are calculated\n\nThe number tokens encode OKLch lightness values that are derived from the position of the base color on the palette scale (0–1000). Two different calculation methods are used depending on the state:\n\n#### **Hover and active**\n\nFor hover and active states, the new palette position is calculated by adding a fixed step offset to the base shade step:\n\n```\n**new_step = base_step + offset**​\n```\n\nFor example, a primary foreground at palette step 520 with a hover offset of +40 on light mode yields a new step of 560. On dark mode the offset is negative (e.g. -40 for hover, -70 for active) so that the color shifts in the opposite direction on the lightness scale. The palette step is then converted to an OKLch lightness value using the inverse of the WCAG relative luminance formula:\n\n```\n**lightness = (1.05 / (21 ^ (step / 1000)) - 0.05) ^ (1/3)**\n```\n\nThis formula derives from the contrast guarantees built into the palette: shade steps map to relative luminance values, and the cube root converts relative luminance to OKLch lightness. The result is rounded to two decimal places and stored as the token value.\n\nThe system uses a single, consistent set of offsets across all element types:\n\nHover & active states\n\n​On light mode the offsets are positive, moving the color to a higher (darker) shade step. On dark mode the offsets are negative, moving the color to a lower (lighter) shade step. In both cases the interactive state shifts the element away from the background and toward the viewer, creating a visual impression of the element responding to interaction.\n\nThe active offset is larger than the hover offset so that the progression from default → hover → active produces an escalating visual change that communicates increasing engagement. The active offset is also asymmetric between light (+60) and dark (-70) modes. This accounts for the non-linear relationship between palette steps and perceived lightness: the dark end of the scale is perceptually compressed, so a larger step change is needed to produce an equivalent perceptual shift.​\n\nThe base step that these offsets are applied to varies per element type depending on its default-state shade (e.g. step 520 for a primary foreground, step 100 for a secondary foreground, step 0 for a ghost foreground on the default background). For elements that can appear on different background layers the base step also shifts to match the layer (e.g. step 20 on layer 2 instead of step 0 on layer 1). The offsets themselves remain the same regardless of the element type or layer.​\n\nThere are two narrow exceptions to this system:\n\n- **Input foregrounds use an active offset of 0.** The active (focused) state of an input is communicated through the focus ring rather than a fill color shift.\n- **The root variant of the primary foreground inverts the offset direction.** This variant uses black (step 1000) on light mode and white (step 0) on dark mode rather than the mid-tone shade used by the semantic meaning variants. Because it already sits at the extreme end of the scale, the offset must go in the opposite direction (-40 for hover on light, +40 for hover on dark) to avoid going out of range and to shift the color toward a visible gray.\n\n#### **Disabled**\n\nDisabled states cannot use a simple fixed offset because the direction and magnitude of the shift must be relative to the background. A dark element on a light background needs to become lighter (move toward the background), while a light element on a dark background needs to become darker (also move toward the background). Elements that are already close to the background in lightness should shift less than those that are far away. This is achieved using linear interpolation between the base step and the background step:​\n\n```\n**new_step = base_step + (background_step - base_step) × factor**\n```\n\nThe factor is set globally to 0.66, meaning the disabled state moves 66% of the distance from the base color toward the background color on the palette scale. For example, a border at step 520 on a light background (step 0) yields a disabled step of 520 + (0 - 520) × 0.66 = 176.8. On a dark background (step 990) the same border yields 520 + (990 - 520) × 0.66 = 830.2. The resulting step is then converted to an OKLch lightness value using the same formula described above.\n\nThis approach ensures that disabled states always move proportionally toward the background, producing a natural \"washed out\" appearance regardless of how light or dark the original element was and regardless of whether the theme is light or dark.\n\nThe code used for generating the tokens can be found in the [Code - Interactive states](https://docs.google.com/document/d/1vL0W-MA5QOLnQ_yZMt1xJ-tsVmiy5UD8613XCnpdi0w/edit?tab=t.ttw1g6ituoxs) tab.\n\n## How we created semantic tokens\n\nThe semantic color tokens were derived methodically from an analysis of our existing component library (Vanilla) and a survey of established design systems. The goal was to create a layered system that covers the vast majority of color needs through generic, reusable tokens while only introducing component-specific tokens where strictly necessary.\n\n### **Step 1: Defining semantic categories**\n\nWe began by identifying the fundamental types of color roles that recur across UI components. These map directly to the top-level categories in the token files:\n\n​\n\nToken semantic categories\n\n​**Step 2: Building the base tokens**\n\nFor each category we first created the base (default state) tokens. For example, `color.foreground.primary.$root` defines the fill color for a primary button, color.text.$root defines the default body text color and color.border.$root defines the default border color. These base tokens directly reference shades from the primitive color palette (e.g. color.palette.gray.520 for a mid-tone foreground).\n\n### **Step 3: Ap****plying modifiers.**\n\nEach base token was then extended with variants that carry semantic meaning. These communicate the intent or consequence of an action or a state to the user, and can be seen in [https://docs.superhuman.com/d/_dNyzE_TLZDh#_tu_8wove](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tu_8wove) \n\nThese semantic variants usually share the same lightness and chroma structure as their base counterpart but substitute the appropriate hue from the primitive palette. This means the interactive state number tokens (hover, active, disabled lightness values) can be reused across all semantic meanings for a given foreground type.\n\n### **Step 4: Adding interactive states and layers**\n\nEach token that represents an interactive element was extended with hover, active and disabled variants. As described in the interactive states section above, these variants reference number tokens for their lightness component rather than pointing directly at a palette shade.\n\nTokens that can appear on different background layers were additionally extended with layer2 and layer3 variants. Because the background lightness differs between layers, the interactive state lightness values need to be calculated relative to the correct background. For example, color.foreground.ghost.layer2.hover references number.lightness.foreground.ghost.hover.onLayer2.onLight rather than the default onLight value.\n\n### **Step 5: Handling component-specific exceptions**\n\nThe system described in steps 1- 4 covers the large majority of our component color needs through generic, reusable tokens. However, a small number of components have unique color requirements that do not map cleanly to the generic categories. Specifically, several form components required dedicated tokens:\n\n- **Checkbox** - separate tokens for the checkmark fill, the selected state background and the unselected state border (with hover, active and disabled variants, plus layer variants)\n- **Radio** - similar structure to checkbox with selected/unselected states and layer variants\n- **Switch** - tokens for the knob fill, the selected track and the unselected track (with layer variants)\n- **Slider** - tokens for the progress fill, the track and the track endstop\n- **Input** - tokens for the input foreground with hover, active and disabled states across all three layers\n\nThese component-specific tokens follow the same principles (referencing number tokens for interactive states, using the same disabled factor and chroma reduction) but have their own base shades and state offsets tuned to the visual requirements of each component.\n\n### **Result**\n\nBy structuring the tokens this way: Generic categories first, semantic meanings second, states and layers third, and component-specific exceptions last we arrive at a system where only a small fraction of the 316 tokens per theme are component-specific. The majority are generic and reusable across any component that needs a foreground, border, text or icon color with a particular semantic meaning and interactive state. This significantly reduces the total number of tokens compared to an approach where every component defines its own full set of color tokens.​\n\n\n\n# References\n\n- [Canonical Internal]: [DE051 - Color tokens](https://docs.google.com/document/d/1vL0W-MA5QOLnQ_yZMt1xJ-tsVmiy5UD8613XCnpdi0w/edit?usp=sharing)\n- [Canonical Internal] [Resolvers](https://docs.google.com/spreadsheets/u/0/d/1OSa9BECoky3BFb-gaQfnbLbVfzfMp_r-Ot7ChcxDFTE/edit)\n- [Canonical Internal] [Global design tokens](https://docs.google.com/spreadsheets/d/1XXBNXVasSr1yfk_w-7Wpaeoag3tQM0y4YK6P_RYWFmU/edit?gid=561378064#gid=561378064)\n- [Canonical Internal] [Apps design tokens](https://docs.google.com/spreadsheets/d/1hTG_MXOEYpb6U3SVpCFNnQSDzB_LrsrABwsK3tZosH4/edit?gid=0#gid=0)\n- [Canonical Internal] [Docs design tokens](https://docs.google.com/spreadsheets/d/1Hk4PHbug3v8kNe65Qg0O0WMqGDI8Uhf1vvyLnD5Rv0U/edit?gid=0#gid=0)\n- [Canonical Internal] [Sites design tokens](https://docs.google.com/spreadsheets/d/179tDsNJYGKlJJbn7gxJ4khqZ6nPubaJkHZyRgH-vUGk/edit?gid=0#gid=0)\n\n\n\n- [External]: WCAG color palette generation algorythm, [github](https://github.com/dgtlntv/wcag-contrast-palette)";
10
+ ds:conceptType ds:concepttype.Explanation.
@@ -7,5 +7,4 @@ ds:concept.Foundations-Density--the-form-channel a ds:Concept;
7
7
  ds:summary "This document covers density as a 2x3 matrix of context and density, applied as two classes on an ancestor rather than per control: how a cell is read, how density reaches the form through the cascade, why the layering direction matters, and how gaps and control heights follow.";
8
8
  ds:tier ds:global;
9
9
  ds:content "**Status:** Final \n**Version:** 1.0 \n**Last updated:** 2026-09-11 \n**Source:** `@canonical/react-ds-global-form` Storybook guide — _Density & the Form Channel_\n\n\nDensity controls how tightly a form is packed: the height of its controls, the\npadding inside them, and the gaps between fields. It is a small, composable\nmodel — two class families on an ancestor — that resolves to a set of generic\nspacing primitives, which the form then maps onto its own tokens. Everything it\nproduces is a whole baseline multiple, so a denser form is still on the grid.\n\nFor the underlying grid and how text seats on it, read\n**The Baseline Grid**\nfirst.\n\n## The 2×3 matrix\n\nDensity is a matrix of two axes:\n\n- **Context** — `.app` / `.site` / `.docs` — the _surface_. `docs` shares its\n values with `site`. A site or docs surface runs one baseline looser than an\n app surface.\n- **Density** — `.comfortable` / `.dense` — the _tightness_ within a context.\n\nApply one class from each axis on an ancestor (the app root, or the Storybook\ntoolbar in this workspace). With no class, a form keeps its plain defaults.\n\nThe matrix, in baseline units (1 bU = `--baseline-height` = 4px):\n\n\\`\\`\\`\n app site / docs\n comfy dense comfy dense\n line-height 32 (8) 24 (6) 36 (9) 28 (7)\n padding-inline 16 (4) 8 (2) 16 (4) 12 (3)\n space-lg 40 (10) 32 (8) 44 (11) 36 (9) ← between fields\n space-md 8 (2) 4 (1) 8 (2) 8 (2) ← label → control\n space-sm 8 (2) 4 (1) 8 (2) 8 (2) ← desc/error → input\n space-xs 4 (1) 4 (1) 4 (1) 4 (1) ← label → description\n\\`\\`\\`\n\nContext sets the `*-comfy` / `*-dense` pair for every value; density picks within\nit. Every cell is a whole baseline multiple, so vertical rhythm holds in all four\ncombinations.\n\n### Reading one cell\n\nTake **site / dense**. The context is `.site`, so it runs one baseline looser\nthan an app; the density is `.dense`, so it picks the `*-dense` half of each of\nthe site's pairs. Read straight down that column:\n\n- **line-height** — 28px, so a control is a 7 bU box (`--baseline-height * 7`).\n- **padding-inline** — 12px = 3 bU of inline padding inside the control and on\n the horizontal label↔input gap.\n- **space-lg** — 36px = 9 bU between one field and the next.\n- **space-md** — 8px = 2 bU from a field's label down to its control.\n- **space-sm** — 8px = 2 bU from a description or error across to the input.\n- **space-xs** — 4px = 1 bU from a field's label down to a leading description.\n\nCompare that to **app / dense** one baseline tighter: the box is 24px (6 bU), the\ninline padding drops to 8px (2 bU), and the label→control / desc→input gaps\ntighten to 4px. The site column never goes below its 8px `space-md`/`space-sm` —\na site stays a touch airier than an app even when dense.\n\n## How to apply density\n\nDensity is two classes on an **ancestor**, not on each control. Put one context\nclass and one density class on a wrapper and every control beneath it sizes and\nseats to that cell:\n\n\\`\\`\\`jsx\n// site / dense — a moderately loose surface, packed tight.\n<div className=\"site dense\">\n <Form>\n <Field name=\"email\" label=\"Email\">\n <TextInput name=\"email\" />\n </Field>\n <Field name=\"role\" label=\"Role\">\n <Select name=\"role\" options={roles} />\n </Field>\n <Button importance=\"primary\">Save</Button>\n </Form>\n</div>\n\\`\\`\\`\n\nThe wrapper carries `.site .dense`; the `Form`, `Field`s and `Button` inside it\ninherit the cell through the cascade. Swap the two classes on the wrapper and the\nwhole form retunes — nothing on the controls changes. In this workspace the\nStorybook toolbar sets the two classes globally so an unwrapped story still has a\ncell; the examples below instead wrap each row in an explicit `.app .comfortable`\n(etc.) so they pin one named cell regardless of the toolbar.\n\n_(An interactive example accompanies this section in Storybook.)_\n\nComfortable is the 32px (8 bU) box; dense drops it to 24px (6 bU). The label text\nstill lands on a grid line in both rows — the seat is computed against the box, so\nit holds as the height changes.\n\n## Context: one baseline looser\n\nThe **context** axis is the surface, and its whole job is to run a site or docs\nsurface one baseline looser than an app. At the same `.comfortable` density an app\ncontrol is 32px (8 bU) and a site control is 36px (9 bU): the extra 4px is the one\nbaseline of headroom that makes a marketing or docs surface breathe. Every rung\nbelow the height lifts to match, so the looser surface is looser everywhere, not\njust taller.\n\n_(An interactive example accompanies this section in Storybook.)_\n\n## How density flows to the form\n\nThe model is layered so each layer knows only about the one below it:\n\n1. **Context classes** set raw pairs — `--density-lh-comfy` / `--density-lh-dense`,\n `--density-pad-inline-comfy` / `--density-pad-inline-dense`, and the three\n vertical rungs `--density-space-{sm,md,lg}-comfy` / `-dense`. (The pre-namespace\n bare names — `--lh-comfy` etc. — remain as back-compat aliases.)\n2. **Density classes** pick within each pair and expose _generic, domain-neutral_\n primitives: `--density-line-height`, `--density-padding-inline`, and\n `--density-space-{sm,md,lg}`. This layer knows nothing about \"form\" or\n \"field\".\n3. **The form** maps its own tokens onto those primitives — this is the only\n place a field concept meets a density value:\n\n\\`\\`\\`css\n--form-input-padding-inline: var(--density-padding-inline); /* inline */\n--form-field-inline-gap: var(--density-padding-inline); /* inline */\n--form-field-block-gap: var(--density-space-lg); /* between fields */\n--form-field-label-gap: var(--density-space-md); /* label → control */\n--form-group-gap: var(--density-space-sm); /* desc/error → input */\n--form-field-label-description-gap: var(--density-space-xs); /* label → description */\n\\`\\`\\`\n\n### Why the layering direction matters\n\nDensity is the lower layer and must **never** reference a `--form-*` token; the\nform reaches _down_ to density, never the reverse. This is not a style\npreference — it is what keeps density reusable and keeps the two layers from\ndeadlocking.\n\nConcretely, imagine the arrow reversed: the density layer setting\n`--density-space-lg: var(--form-field-block-gap)`. Now density is defined in terms\nof a form concept, so density can no longer size anything that is not a form —\nand the form maps `--form-field-block-gap` back onto `--density-space-lg`, so the\ntwo tokens each resolve to the other and the value collapses to nothing. Keeping\ndensity domain-neutral (it only ever emits `--density-*` primitives) means the\nsame layer can one day seat a toolbar, a list row or an Accordion header with no\nform in sight. If a new density-driven spacing is needed, add a primitive to the\ndensity layer and map it in the form — do not reach upward from density.\n\n## Gaps are split by axis\n\nThe form's gap tokens are separated by direction so a density tier can tune each\naxis independently, and so a token's name never lies about its axis:\n\n- **Block (vertical):** `--form-field-block-gap`, `--form-field-label-gap`,\n `--form-group-gap`.\n- **Inline (horizontal):** `--form-field-inline-gap`.\n\n`--form-field-inline-gap` is horizontal only. The vertical label-to-control gap\nis `--form-field-label-gap` — a dedicated block token, not the inline one.\n\nThis split fixes a concrete trap. An earlier version had a single inline token\ndoing double duty: it set the horizontal label↔input gap _and_ was borrowed as a\nvertical `row-gap` for the stacked label-over-control layout. So the moment that\ntoken was retuned to fix horizontal spacing, the vertical gap moved with it —\none edit dragged both axes at once, and there was no way to nudge one without\ndisturbing the other. Giving the vertical gap its own block token\n(`--form-field-label-gap`) means each axis is now tuned in isolation.\n\n## Control height\n\nA density control's height is **intrinsic**: no `block-size` anywhere. The\ncontrol's text carries an interior line box (`--control-seat-line`, the cell\nminus one baseline of headroom per side), a seat pad lands its baseline on the\ndensity _target_ — `round(nearest, height × 2/3, --baseline-height)` — and a\ncomplement pad closes the box so border + pads + line-height add up to\n**exactly** the density cell (32px apps-comfortable, 24px apps-dense, …). Text\nat any font size lands on the grid, and the height is a result, not an input.\nSee **The Baseline Grid**\nfor the full formula.\n\n_(An interactive example accompanies this section in Storybook.)_\n\nA borderless importance (e.g. a primary button) and a bordered one (a\nsecondary) are the same height and seat **identically**, because the border is\na **constant of the control**: every importance carries the same nominal border\nwidth, and the borderless variant paints it `transparent` rather than removing\nit (the outline flag toggles the border's colour, never its width). The\nhistory of getting here is instructive — first the seat subtracted the border\nonly when rendered (the borderless primary sat a pixel high), then a nominal\nsubtraction papered over a width-toggled border (under intrinsic height the\nprimary came out 2px _shorter_). Both bugs had one root: per-importance\ngeometry. The constant border removes the fork entirely.\n\n## Composition: density and running prose\n\nDensity seats **controls**. It does not touch **running prose** — bare `p`,\n`h1`–`h6`, or anything in an `.editorial` context. Those keep their engine-owned\nsnapped line-height and inter-block margins.\n\nThis is the rule that lets a density scope and `.editorial` prose _nest_ without\nconflict — for example a density-sized header above an `.editorial` content\npanel (the future Accordion case). Because density and the typography engine\nwrite to disjoint element sets, there is no specificity war and no override: each\nsystem owns its own elements. An earlier attempt to have density crush prose to\n`line-height: 1` fought the engine and only ever landed the _first_ line on the\ngrid — wrapped lines drifted. Partitioning prose out removed that fight entirely.\n\nPractically:\n\n- Put controls (buttons, inputs, field labels) inside a density scope — they size\n and seat to the density.\n- Let running prose be plain `p` / `h*` or wrap it in `.editorial` — it keeps its\n reading rhythm and stays on the grid, whether or not it sits inside a density\n scope.\n- Do **not** try to make density seat a paragraph. If a text reference must line\n up with controls (as the spike testbed does for its measuring lead), seat that\n one element explicitly; do not change how prose ships.\n\n## A former rough edge, resolved\n\nEarlier revisions lifted native form controls by an empirical ~2px knob\n(`--control-text-drift-AVOID-USAGE`) because an `<input>` rendered its text\nlower than a `<span>` at identical CSS. The intrinsic seat exposed the real\nmechanism: the user agent enforces a `line-height` floor of `normal` (≈1.2em)\non single-line `<input>`s, and the old `line-height: 1` crush was being\nsilently clamped — the \"drift\" was the clamp's extra half-leading. With a real\nline box the input renders exactly like a `<span>`; where the interior line\nwould dip below the floor (dense cells) the seat computes with the floored\nvalue (`max(--control-seat-line, 1.2em)`). The knob is deleted. See\n**Seating by Element Type**\nfor the full account.";
10
- ds:knownEdgeCases "";
11
10
  ds:conceptType ds:concepttype.Explanation.
@@ -4,8 +4,7 @@
4
4
 
5
5
  ds:concept.Foundations-Grid--Layout a ds:Concept;
6
6
  ds:name "Foundations: Grid & Layout";
7
- ds:summary "This document covers the horizontal grid system: column counts, column spans, gutters, outer margins, and layout strategy per tier.\n\n- Column structure and bisection rule\n- Gutter and outer margin values per tier and breakpoint\n- Viewport-based vs container-based grid contexts\n- Drawer and panel sizing (applications)\n- Nested grid alignment\n- When to use the grid vs other layout primitives";
7
+ ds:summary "This document covers the horizontal grid system: column counts, column spans, gutters, outer margins, and layout strategy per [https://docs.superhuman.com/d/_dNyzE_TLZDh/_suGGZ-v7](https://docs.superhuman.com/d/_dNyzE_TLZDh/_suGGZ-v7) \n\n- Column structure and bisection rule\n- Gutter and outer margin values per tier and breakpoint\n- Viewport-based vs container-based grid contexts\n- [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) and [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) sizing, in the [Apps](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-mWBJDa-kOF) tier\n- Nested grid alignment\n- When to use the grid vs other layout primitives";
8
8
  ds:tier ds:global;
9
- ds:content "**Status:** Final \n**Version:** 1.0 \n**Last updated:** 2026-04-24\n\n\n\n## Table of contents\n\n1. [Glossary](#glossary)\n2. [Problem statement and scope](#1-problem-statement-and-scope)\n3. [Core principles (universal)](#2-core-principles)\n4. [Editorial and marketing sites](#3-editorial-and-marketing-sites)\n5. [Documentation](#4-documentation)\n6. [Applications](#5-applications)\n7. [Responsive reflow](#6-responsive-reflow)\n8. [When to use the grid](#7-when-to-use-the-grid)\n9. [Form layouts](#8-form-layouts)\n10. [Future work](#9-future-work)\n\n\n\n## Glossary\n\nTable 21\n\n\n\n## 1. Problem statement and scope\n\n### 1.1 The problem\n\nOur design system serves three tiers:\n\n- [Apps](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-mWBJDa-kOF) **:** Application UIs – dashboards, forms, settings pages, admin panels (MAAS, Landscape, Launchpad, Snapcraft, support portal, and ~50 other products)\n- [Sites](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-T4g_fD6A91) : Editorial / marketing sites – [ubuntu.com](http://ubuntu.com), [canonical.com](http://canonical.com), blog content\n- [Documentation](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-RHPOgKqlyQ) **Docs:** Product documentation\n\nThese tiers have different grid needs. Application UIs require multiple concurrent grid contexts (main content alongside drawers, panels, and toolbars) with fluid, edge-to-edge layouts. Editorial and marketing sites use a single centered grid with a maximum content width and wider gutters that give editorial content more breathing room. Documentation shares the editorial grid model but typically uses narrower content columns with side navigation.\n\nA single grid configuration does not serve all three well. This document defines the shared column system and the per-tier rules built on top of it.\n\n### 1.2 Scope\n\nThis specification covers the horizontal grid system: column counts, column spans, gutters, outer margins, and layout strategy per tier.\n\n- Column structure and bisection rule\n- Gutter and outer margin values per tier and breakpoint\n- Viewport-based vs container-based grid contexts\n- Drawer and panel sizing (applications)\n- Nested grid alignment\n- When to use the grid vs other layout primitives\n\nOut of scope:\n\n- Vertical spacing and baseline grid (see the [spacing specification](https://coda.io/d/Docs_dTaVNZxkPrA/Spacing-architecture-0-4_su8_Tyhn#Table-11_turSlbF2))\n- Typography specification (referenced where relevant)\n- Implementation details (CSS architecture, component APIs, tooling)\n\n### 1.3 Goals\n\n1. **Predictability:** Grid behaviour is deterministic and learnable across all tiers\n2. **Visual coherence:** Shared column counts and bisection rule produce consistent keylines everywhere\n3. **Tier fit:** Each tier uses the grid model best suited to it\n4. **Composability:** Components placed on the grid in one tier work correctly when reused in another\n\n\n\n## 2. Core principles\n\nThese apply universally across all three tiers.\n\n### 2.1 Column counts\n\nColumn counts are determined by **container width** (applications) or **viewport width** (sites and documentation):\n\nTable 22\n\nThe two 8-column ranges are intentionally separate. Both use the same column count, but the breakpoint between them gives components a second threshold at which to switch layout – for example from stacked to side-by-side – within the mid-range.\n\n**Rationale for 240px minimum**: This is our current default minimum aside width, below which content truncation becomes excessive. It accommodates the minimum comfortable width for form fields, navigation items, and side panels.\n\n**Rationale for column counts**: We intentionally use only 4, 8, or 16 columns to create a structure where keylines either bisect spaces or follow parent keylines. This avoids the awkward offset-by-1 alignment issues that occur with 12-column grids (which permit thirds), and the column rivers that appear when the browser is left to choose a count freely. \n\n\n\n*Order emerging from restraint: 8 column grid with disciplined subdivision on the right compared to a 12 column grid with no restrictions.*\n\n### 2.2 Column span rule\n\nValid spans are power-of-2 fractions of the current column count – half, quarter, or eighth:\n\nTable 23\n\nThis allows uniform rows (e.g. four 2-column-wide cards on an 8-column grid) and the standard 50/50 or 25/75 two-part splits. It disallows thirds and any other non-bisecting division – the same principle that drove the move from 12-column to 8-column grids across the Canonical web portfolio.\n\n### 2.3 Gutter widths and outer margins\n\nGutters and outer margins are set by the **global viewport breakpoint**, not by container width. The tiers share the same values at small viewports but diverge at larger sizes – editorial sites and documentation use wider gutters for the more generous rhythm that content-heavy pages need.\n\n**Sites and documentation:**\n\nTable 24\n\n**Applications:**\n\nTable 25\n\nThe difference is at Large and X-Large: sites and documentation step up to 2rem (32px) gutters, while applications stay at 1.5rem (24px). Application interfaces are denser – tighter gutters give more room to data-heavy content, panels, and multi-column controls. Sites have more breathing room by design, so the wider gutter matches the editorial rhythm.\n\n### 2.4 Nested grids\n\n**All nested grids follow their parent container’s grid structure.** When a component establishes a grid within a parent grid cell, columns can only start at parent column offsets. This creates consistent vertical keylines throughout the interface.\n\nNo column is allowed to start anywhere except at parent column offsets. The grid subdivides through bisection (octree pattern), maintaining alignment at every nesting level.\n\n\n\n\n\n## 3. Editorial and marketing sites\n\nEditorial and marketing sites ([ubuntu.com](http://ubuntu.com), [canonical.com](http://canonical.com), blog content) use a single, viewport-based grid.\n\n### 3.1 Viewport-based grid\n\nThe full page width minus outer margins forms one grid context. There are no independent sub-grids for drawers or panels – the viewport is the only trigger for column count changes. Column count switches at the standard breakpoint thresholds (see §2.1).\n\n### 3.2 Centered, max-width layout\n\nContent is centered within the viewport and constrained to a maximum width of 80rem. At viewports wider than the max-width, the outer margins grow to absorb the excess space. This is the opposite of application layouts, which fill all available space edge-to-edge.\n\n\n\n### 3.3 Responsive reflow\n\nReflow on sites is driven by **viewport breakpoints**. When the viewport crosses a breakpoint threshold, column count and gutter width update together. There are no panels to trigger mid-viewport reflow – the only trigger is the viewport itself resizing.\n\n\n\n## 4. Documentation\n\nDocumentation follows the same grid model as editorial/marketing sites – viewport-based, centered, same gutter values – but uses a three-region layout:\n\n- **Left: site navigation** – persistent side navigation across all documentation pages. Collapses into a drawer at smaller breakpoints.\n- **Centre: content body** – the article or page content.\n- **Right: on-page table of contents** – anchor links to headings within the current page. At smaller breakpoints this stacks directly below the page’s h1 heading.\n\nEach region occupies a fixed column span on the grid. The content area respects the grid boundaries throughout.\n\n\n\n[example: documentation layout with side navigation and content area across breakpoints]\n\n\n\n## 5. Applications\n\nApplication UIs (for example, MAAS, LXD, Landscape) require multiple concurrent grid contexts and fluid, edge-to-edge layouts.\n\n\n\n### 5.1 Container-based grids\n\nEach major layout region (main content, panels/drawers, toolbars) can establish its own grid context based on its available width. **Panels** are layout zones that resize the main content (e.g., desktop navigation), while **drawers** overlay the main content without changing its size. This allows:\n\n- Consistent layouts regardless of panel positioning\n- Predictable behavior when drawers or panels are resized, hidden, or overlayed\n- Reusable components that adapt to their container\n\n**Key principle**: A drawer at any intrinsic width uses the gutters defined by the **global viewport breakpoint**, not by its own width. For example, a 320px side drawer displayed on a 1800px screen uses 1.5rem (24px) gutters (the application large-breakpoint value), not 1rem (16px). This ensures visual consistency across all drawers and the main area at the same screen size.\n\n### 5.2 Fluid layouts\n\n\n\nApplications use fluid grids that expand to fill available space. Unlike editorial sites, applications should not:\n\n- Have a maximum content width that leaves whitespace at large screens\n- Use centered positioning for the main layout container\n\nFluid grids ensure consistent, edge-to-edge space utilisation across application views and window sizes.\n\nThis spec proposes **container queries** to switch column counts: when a container crosses a defined width threshold, its column count explicitly switches to 4, 8, or 16. Gutter and outer margin values are controlled separately by the global viewport breakpoint (see §2.3). This combination gives explicit, predictable control over both column structure and spacing at every screen size.\n\nNote: We’re currently experimenting with an alternative, “intrinsic” grid approach that uses `auto-fill`, `auto-fit`, or `minmax()` to let the browser determine column count dynamically. The main rationale for this approach is support for predominantly left-aligned layouts: as the browser adds columns to fill available width, the grid naturally grows from the left edge, which makes centered compositions difficult and in practice rules them out. That same behavior creates an interesting opportunity for controlled breakout patterns, where a primary content area can remain on an 8-column reading width while additional columns are used for wider elements such as card grids. This should be used deliberately and with care, because it relaxes some of the explicit 4/8/16-column guardrails this spec is designed to preserve and can introduce column counts outside the canonical set. Container queries remain the recommended implementation mechanism whenever the design depends on one of the three defined column counts; intrinsic behavior is better treated as a deliberate exception for left-aligned and breakout use cases, not the default.\n\n### 5.3 Drawers vs panels\n\nWe distinguish between two types of layout regions:\n\n- **Drawers** overlap the main area without changing its size. Drawers sit on top of the main content without changing its size.\n- **Panels** exist in the same plane as the main area and cause the main area to resize.\n\nApplication layouts have one panel slot per browser window edge. That slot can be subdivided internally – for example into a narrow icon rail and a wider navigation list – but from the grid’s perspective it is a single region with a single width. The main content area occupies the remaining space and establishes its own grid context based on its available width.\n\n### 5.4 Panel/Drawer width constraints\n\nEach drawer type defines minimum and maximum widths. When placed in application landmark regions (`<aside>`, `<main>`, etc.), these internally defined constraints apply:\n\nTable 26\n\n**All applications must use these standardised widths on load.** Inconsistent drawer widths have been identified as a recurring problem across our product suite. If additional flexibility is needed, implement user-adjustable resizing within the min/max constraints above – but the default loaded state must always use the standard small/medium/large values.\n\nTable 9\n\n[Examples of 3 panel/drawer widths. A high contrast border in examples 1 and 2 serves as a resize affordance]\n\n### 5.5 Tile grid\n\nDashboard tile layouts are a common use case. We have explored an approach where component padding (on cards and similar elements) is absorbed into the grid gutters, increasing the proportion of space available for content. This is out of scope for the current spec – see [Future work](#9-future-work) for details and examples. For now, align cards to the grid.\n\n\n\n## 6. Responsive reflow\n\nContainer queries (applications) and viewport breakpoints (sites and documentation) drive all layout transitions. Each grid context has a defined layout for every width bracket – the browser moves between those defined states automatically as the width changes. The product designer’s job is to specify the layout at each bracket; the browser handles transitions between them.\n\n### 6.1 Panel-triggered reflow (applications)\n\nWhen a panel opens or is resized, the main area’s available width shrinks. If that crosses a container query threshold, the main area switches to the corresponding column layout automatically – no additional logic required. The same applies to panels themselves: a panel that narrows past a threshold switches to its own narrower layout. This is container queries working as intended, not a special case.\n\n### 6.2 Narrowing strategy (all tiers)\n\nWhen a grid container becomes too narrow to accommodate its current layout:\n\n1. **First**: Move to the narrower width bracket, which may reduce column count and spans (e.g., switch from an 8-column layout to a 4-column layout)\n2. **Then**: Switch from horizontal to vertical stacking if the narrower layout still doesn’t fit\n\nThis ensures content remains readable and functional at any width, whether the trigger is the viewport resizing (sites and documentation) or a panel opening (applications).\n\n\n\n## 7. When to use the grid\n\n### 7.1 Required\n\nThe grid **must** be used when placing blocks of content side by side. Some examples:\n\n- Placing block-level elements side-by-side (e.g., cards, form sections, data panels)\n- Creating multi-column layouts within a content area\n- Positioning elements that should align vertically across rows\n- Laying out dashboard widgets or data visualisations\n\n### 7.2 Optional\n\nThe grid is **optional** for:\n\n- **Tables**: While the table as a whole must span an exact number of columns, Internal column logic takes precedence. **Guideline**: If aligning table columns to the grid won’t hurt the content (i.e., grid column widths are suitable for the data inside), align to the grid. If alignment causes issues with data display, the table’s internal logic takes precedence.\n\n\n\n### 7.3 Not applicable\n\nThe grid is **not applicable** for:\n\n- **Inline content flows**: Tab labels, toolbar buttons, breadcrumbs – these behave like text and use natural inline layout\n- **Single-column content**: Articles, lists, side navigation – no subdivision needed\n\n### 7.4 Examples – sites and documentation\n\n**Landing page** (grid required):\n\n[example needed]\n\n**Article with side navigation** (grid required):\n\n- Sticky side nav in a narrow column span, article body in the remaining span\n- On narrow viewports the side nav stacks above or collapses\n\n\n\n### 7.5 Examples – applications\n\n\n\n**Combobox strip** (grid optional):\n\n- Labels flow inline like text (no grid needed)\n- But the combobox stri[ can be assigned a column span (e.g., “columns 4–8”)\n\n**Toolbar with left/right groups** (grid exempt):\n\n- Heading floated left\n- Right-aligned elements use CSS flexbox/float, not grid columns\n\n**Data table in main area** (grid optional):\n\n- Table has internal column logic\n- If table columns can align to grid without compromising data display: align to grid\n- If alignment causes truncation or awkward column widths: table takes precedence\n\n**Drawer** (grid required):\n\n- \n\n\n\n\n\n## 8. Form layouts\n\nForms align to grid columns based on their context:\n\n- Centered, spanning 4 columns (columns 3–6) on an 8-column grid – a half-width block in the middle of the page \n\n- **Left-aligned** (applications): Left-aligned, starting from the first column \n\n\n\n\n**Summary of constraints:**\n\n*Universal (all tiers):*\n\n- Column counts: 4, 8, or 16 only\n- Column spans: power-of-2 fractions of the column count (half, quarter, eighth) – no thirds or other non-bisecting splits\n- Nested grids: must align to parent column offsets\n- Gutters: At x-small and small breakpoints, gutters are universal (see the table in seciton 2.3). At larger breakpoints, gutter behavior changes, see below. \n\n*Sites and documentation:*\n\n- Grid context: single viewport-based grid\n- Gutters at large/x-large: 2rem (32px)\n- Layout: centered, max-width constrained\n\n*Applications:*\n\n- Grid context: container-based, multiple concurrent contexts\n- Gutters at large/x-large: 1.5rem (24px)\n- Layout: fluid, edge-to-edge\n- Drawer widths: defined min/max per drawer type, with standardised default widths on load\n\n\n\n## 9. Future work\n\n### Tile grid approaches\n\nDashboard views with tile-based content benefit from a specialised grid configuration. Two approaches worth exploring:\n\n- **Gutter-as-padding**: Use a 2px (or more) gap between tiles, with card padding absorbed into the gutter. This maximises content area within each tile.\n- **Half-gutter variant**: Split the gutter value between tile outer spacing and card inner padding, giving more control over the relative weight of gap vs card breathing room.\n- Future work: add examples for:\n\n[example needed: gutter-as-padding layout vs standard grid layout, side by side] \n[example needed: half-gutter variant showing relative padding proportions]";
10
- ds:knownEdgeCases "";
9
+ ds:content "**Status:** Final \n**Version:** 1.0 \n**Last updated:** 2026-04-24\n\n\n\n## Table of contents\n\n1. [Glossary](#glossary)\n2. [Problem statement and scope](#1-problem-statement-and-scope)\n3. [Core principles (universal)](#2-core-principles)\n4. [Editorial and marketing sites](#3-editorial-and-marketing-sites)\n5. [Documentation](#4-documentation)\n6. [Applications](#5-applications)\n7. [Responsive reflow](#6-responsive-reflow)\n8. [When to use the grid](#7-when-to-use-the-grid)\n9. [Form layouts](#8-form-layouts)\n10. [Future work](#9-future-work)\n\n\n\n## Glossary\n\nTable 21\n\n\n\n## 1. Problem statement and scope\n\n### 1.1 The problem\n\nOur design system serves three tiers:\n\n- [Apps](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-mWBJDa-kOF) **:** Application UIs – dashboards, forms, settings pages, admin panels (MAAS, Landscape, Launchpad, Snapcraft, support portal, and ~50 other products)\n- [Sites](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-T4g_fD6A91) : Editorial / marketing sites – [ubuntu.com](http://ubuntu.com), [canonical.com](http://canonical.com), blog content\n- [Documentation](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-KdW0T6RE3B/_rui-RHPOgKqlyQ) **Docs:** Product documentation\n\nThese tiers have different grid needs. Application UIs require multiple concurrent grid contexts (main content alongside [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) , [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) , and toolbars) with fluid, edge-to-edge layouts. Editorial and marketing sites use a single centered grid with a maximum content width and wider gutters that give editorial content more breathing room. Documentation shares the editorial grid model but typically uses narrower content columns with side navigation.\n\nA single grid configuration does not serve all three well. This document defines the shared column system and the per-tier rules built on top of it.\n\n### 1.2 Scope\n\nThis specification covers the horizontal grid system: column counts, column spans, gutters, outer margins, and layout strategy per tier.\n\n- Column structure and bisection rule\n- Gutter and outer margin values per tier and breakpoint\n- Viewport-based vs container-based grid contexts\n- [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) and panel sizing (applications)\n- Nested grid alignment\n- When to use the grid vs other layout primitives\n\nOut of scope:\n\n- Vertical spacing and baseline grid (see the [spacing specification](https://coda.io/d/Docs_dTaVNZxkPrA/Spacing-architecture-0-4_su8_Tyhn#Table-11_turSlbF2))\n- Typography specification (referenced where relevant)\n- Implementation details (CSS architecture, component APIs, tooling)\n\n### 1.3 Goals\n\n1. **Predictability:** Grid behaviour is deterministic and learnable across all tiers\n2. **Visual coherence:** Shared column counts and bisection rule produce consistent keylines everywhere\n3. **Tier fit:** Each tier uses the grid model best suited to it\n4. **Composability:** Components placed on the grid in one tier work correctly when reused in another\n\n\n\n## 2. Core principles\n\nThese apply universally across all three tiers.\n\n### 2.1 Column counts\n\nColumn counts are determined by **container width** (applications) or **viewport width** (sites and documentation):\n\nTable 22\n\nThe two 8-column ranges are intentionally separate. Both use the same column count, but the breakpoint between them gives components a second threshold at which to switch layout – for example from stacked to side-by-side – within the mid-range.\n\n**Rationale for 240px minimum**: This is our current default minimum aside width, below which content truncation becomes excessive. It accommodates the minimum comfortable width for form fields, navigation items, and [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) .\n\n**Rationale for column counts**: We intentionally use only 4, 8, or 16 columns to create a structure where keylines either bisect spaces or follow parent keylines. This avoids the awkward offset-by-1 alignment issues that occur with 12-column grids (which permit thirds), and the column rivers that appear when the browser is left to choose a count freely. \n\n\n\n*Order emerging from restraint: 8 column grid with disciplined subdivision on the right compared to a 12 column grid with no restrictions.*\n\n### 2.2 Column span rule\n\nValid spans are power-of-2 fractions of the current column count – half, quarter, or eighth:\n\nTable 23\n\nThis allows uniform rows (e.g. four 2-column-wide cards on an 8-column grid) and the standard 50/50 or 25/75 two-part splits. It disallows thirds and any other non-bisecting division – the same principle that drove the move from 12-column to 8-column grids across the Canonical web portfolio.\n\n### 2.3 Gutter widths and outer margins\n\nGutters and outer margins are set by the **global viewport breakpoint**, not by container width. The tiers share the same values at small viewports but diverge at larger sizes – editorial sites and documentation use wider gutters for the more generous rhythm that content-heavy pages need.\n\n**Sites and documentation:**\n\nTable 24\n\n**Applications:**\n\nTable 25\n\nThe difference is at Large and X-Large: sites and documentation step up to 2rem (32px) gutters, while applications stay at 1.5rem (24px). Application interfaces are denser – tighter gutters give more room to data-heavy content, panels, and multi-column controls. Sites have more breathing room by design, so the wider gutter matches the editorial rhythm.\n\n### 2.4 Nested grids\n\n**All nested grids follow their parent container’s grid structure.** When a component establishes a grid within a parent grid cell, columns can only start at parent column offsets. This creates consistent vertical keylines throughout the interface.\n\nNo column is allowed to start anywhere except at parent column offsets. The grid subdivides through bisection (octree pattern), maintaining alignment at every nesting level.\n\n\n\n\n\n## 3. Editorial and marketing sites\n\nEditorial and marketing sites ([ubuntu.com](http://ubuntu.com), [canonical.com](http://canonical.com), blog content) use a single, viewport-based grid.\n\n### 3.1 Viewport-based grid\n\nThe full page width minus outer margins forms one grid context. There are no independent sub-grids for [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) or panels – the viewport is the only trigger for column count changes. Column count switches at the standard breakpoint thresholds (see §2.1).\n\n### 3.2 Centered, max-width layout\n\nContent is centered within the viewport and constrained to a maximum width of 80rem. At viewports wider than the max-width, the outer margins grow to absorb the excess space. This is the opposite of application layouts, which fill all available space edge-to-edge.\n\n\n\n### 3.3 Responsive reflow\n\nReflow on sites is driven by **viewport breakpoints**. When the viewport crosses a breakpoint threshold, column count and gutter width update together. There are no panels to trigger mid-viewport reflow – the only trigger is the viewport itself resizing.\n\n\n\n## 4. Documentation\n\nDocumentation follows the same grid model as editorial/marketing sites – viewport-based, centered, same gutter values – but uses a three-region layout:\n\n- **Left:** [LibrarySideNavigation](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-0At4Um4Zc9) – persistent side navigation across all documentation pages. Collapses into a [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) at smaller breakpoints.\n- **Centre: content body** – the article or page content.\n- **Right: in-page table of contents** – anchor links to headings within the current page. At smaller breakpoints this stacks directly below the page’s h1 heading.\n\nEach region occupies a fixed column span on the grid. The content area respects the grid boundaries throughout.\n\n\n\n[example: Documentation layout with side navigation and content area across breakpoints]\n\n\n\n## 5. Applications\n\nApplication UIs (for example, MAAS, LXD, Landscape) require multiple concurrent grid contexts and fluid, edge-to-edge layouts.\n\n\n\n### 5.1 Container-based grids\n\nEach major layout region (main content, [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) / [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) , toolbars) can establish its own grid context based on its available width. [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj)s are layout zones that resize the main content (e.g., desktop navigation), while [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) overlay the main content without changing its size. This allows:\n\n- Consistent layouts regardless of panel positioning\n- Predictable behavior when [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) or panels are resized, hidden, or overlayed\n- Reusable components that adapt to their container\n\n**Key principle**: A [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) at any intrinsic width uses the gutters defined by the **global viewport breakpoint**, not by its own width. For example, a 320px [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) displayed on a 1800px screen uses 1.5rem (24px) gutters (the application large-breakpoint value), not 1rem (16px). This ensures visual consistency across all panels and the main area at the same screen size.\n\n### 5.2 Fluid layouts\n\n\n\nApplications use fluid grids that expand to fill available space. Unlike editorial sites, applications should not:\n\n- Have a maximum content width that leaves whitespace at large screens\n- Use centered positioning for the main layout container\n\nFluid grids ensure consistent, edge-to-edge space utilisation across application views and window sizes.\n\nThis spec proposes **container queries** to switch column counts: when a container crosses a defined width threshold, its column count explicitly switches to 4, 8, or 16. Gutter and outer margin values are controlled separately by the global viewport breakpoint (see §2.3). This combination gives explicit, predictable control over both column structure and spacing at every screen size.\n\nNote: We’re currently experimenting with an alternative, “intrinsic” grid approach that uses `auto-fill`, `auto-fit`, or `minmax()` to let the browser determine column count dynamically. The main rationale for this approach is support for predominantly left-aligned layouts: as the browser adds columns to fill available width, the grid naturally grows from the left edge, which makes centered compositions difficult and in practice rules them out. That same behavior creates an interesting opportunity for controlled breakout patterns, where a primary content area can remain on an 8-column reading width while additional columns are used for wider elements such as card grids. This should be used deliberately and with care, because it relaxes some of the explicit 4/8/16-column guardrails this spec is designed to preserve and can introduce column counts outside the canonical set. Container queries remain the recommended implementation mechanism whenever the design depends on one of the three defined column counts; intrinsic behavior is better treated as a deliberate exception for left-aligned and breakout use cases, not the default.\n\n### 5.3 [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) vs [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) \n\nWe distinguish between two types of layout regions:\n\n- [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) overlaps the main area without changing its size. \n- [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) exist in the same plane as the main area and cause the main area to resize.\n\nApplication layouts have one panel slot per browser window edge. That slot can be subdivided internally – for example into a narrow icon rail and a wider navigation list – but from the grid’s perspective it is a single region with a single width. The main content area occupies the remaining space and establishes its own grid context based on its available width.\n\n### 5.4 [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) / [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) width constraints\n\nEach panel type defines minimum and maximum widths. When placed in application landmark regions (`<aside>`, `<main>`, etc.), these internally defined constraints apply:\n\nPanel width constraints\n\n**All applications must use these standardised widths on load.** Inconsistent [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) widths have been identified as a recurring problem across our product suite. If additional flexibility is needed, implement user-adjustable resizing within the min/max constraints above – but the default loaded state must always use the standard small/medium/large values.\n\nTable 9\n\n[Examples of 3 [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) / [InlinePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-258LznysFj) widths.]\n\n### 5.5 Tile grid\n\nDashboard tile layouts are a common use case. We have explored an approach where component padding (on cards and similar elements) is absorbed into the grid gutters, increasing the proportion of space available for content. This is out of scope for the current spec – see [Future work](#9-future-work) for details and examples. For now, align cards to the grid.\n\n\n\n## 6. Responsive reflow\n\nContainer queries (applications) and viewport breakpoints (sites and documentation) drive all layout transitions. Each grid context has a defined layout for every width bracket – the browser moves between those defined states automatically as the width changes. The product designer’s job is to specify the layout at each bracket; the browser handles transitions between them.\n\n### 6.1 Panel-triggered reflow (applications)\n\nWhen a panel opens or is resized, the main area’s available width shrinks. If that crosses a container query threshold, the main area switches to the corresponding column layout automatically – no additional logic required. The same applies to panels themselves: a panel that narrows past a threshold switches to its own narrower layout. This is container queries working as intended, not a special case.\n\n### 6.2 Narrowing strategy (all tiers)\n\nWhen a grid container becomes too narrow to accommodate its current layout:\n\n1. **First**: Move to the narrower width bracket, which may reduce column count and spans (e.g., switch from an 8-column layout to a 4-column layout)\n2. **Then**: Switch from horizontal to vertical stacking if the narrower layout still doesn’t fit\n\nThis ensures content remains readable and functional at any width, whether the trigger is the viewport resizing (sites and documentation) or a panel opening (applications).\n\n\n\n## 7. When to use the grid\n\n### 7.1 Required\n\nThe grid **must** be used when placing blocks of content side by side. Some examples:\n\n- Placing block-level elements side-by-side (e.g., cards, form sections, data panels)\n- Creating multi-column layouts within a content area\n- Positioning elements that should align vertically across rows\n- Laying out dashboard widgets or data visualisations\n\n### 7.2 Optional\n\nThe grid is **optional** for:\n\n- **Tables**: While the table as a whole must span an exact number of columns, Internal column logic takes precedence. **Guideline**: If aligning table columns to the grid won’t hurt the content (i.e., grid column widths are suitable for the data inside), align to the grid. If alignment causes issues with data display, the table’s internal logic takes precedence.\n\n\n\n### 7.3 Not applicable\n\nThe grid is **not applicable** for:\n\n- **Inline content flows**: Tab labels, toolbar buttons, breadcrumbs – these behave like text and use natural inline layout\n- **Single-column content**: Articles, lists, side navigation – no subdivision needed\n\n### 7.4 Examples – sites and documentation\n\n**Landing page** (grid required):\n\n[example needed]\n\n**Article with side navigation** (grid required):\n\n- Sticky side nav in a narrow column span, article body in the remaining span\n- On narrow viewports the side nav stacks above or collapses\n\n\n\n### 7.5 Examples – applications\n\n\n\n**Combobox strip** (grid optional):\n\n- Labels flow inline like text (no grid needed)\n- But the combobox stri[ can be assigned a column span (e.g., “columns 4–8”)\n\n**Toolbar with left/right groups** (grid exempt):\n\n- Heading floated left\n- Right-aligned elements use CSS flexbox/float, not grid columns\n\n**Data table in main area** (grid optional):\n\n- Table has internal column logic\n- If table columns can align to grid without compromising data display: align to grid\n- If alignment causes truncation or awkward column widths: table takes precedence\n\n[SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) (grid required):\n\n- \n\n\n\n\n\n## 8. Form layouts\n\nForms align to grid columns based on their context:\n\n- Centered, spanning 4 columns (columns 3–6) on an 8-column grid – a half-width block in the middle of the page \n\n- **Left-aligned** (applications): Left-aligned, starting from the first column \n\n\n\n\n**Summary of constraints:**\n\n*Universal (all tiers):*\n\n- Column counts: 4, 8, or 16 only\n- Column spans: power-of-2 fractions of the column count (half, quarter, eighth) – no thirds or other non-bisecting splits\n- Nested grids: must align to parent column offsets\n- Gutters: At x-small and small breakpoints, gutters are universal (see the table in seciton 2.3). At larger breakpoints, gutter behavior changes, see below. \n\n*Sites and documentation:*\n\n- Grid context: single viewport-based grid\n- Gutters at large/x-large: 2rem (32px)\n- Layout: centered, max-width constrained\n\n*Applications:*\n\n- Grid context: container-based, multiple concurrent contexts\n- Gutters at large/x-large: 1.5rem (24px)\n- Layout: fluid, edge-to-edge\n- [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) widths: defined min/max per [SidePanel](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-fjHExV6dWH) type, with standardised default widths on load\n\n\n\n## 9. Future work\n\n### Tile grid approaches\n\nDashboard views with tile-based content benefit from a specialised grid configuration. Two approaches worth exploring:\n\n- **Gutter-as-padding**: Use a 2px (or more) gap between tiles, with card padding absorbed into the gutter. This maximises content area within each tile.\n- **Half-gutter variant**: Split the gutter value between tile outer spacing and card inner padding, giving more control over the relative weight of gap vs card breathing room.\n- Future work: add examples for:\n\n[example needed: gutter-as-padding layout vs standard grid layout, side by side] \n[example needed: half-gutter variant showing relative padding proportions]";
11
10
  ds:conceptType ds:concepttype.Explanation.