@morphemecms/cms 0.5.0 → 0.7.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 (396) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/astro.mjs +3 -0
  3. package/bin/morpheme.mjs +3 -1
  4. package/defaults/blockTexts.ts +2 -2
  5. package/defaults/collections.ts +10 -0
  6. package/defaults/editor.ts +57 -53
  7. package/defaults/privacy.ts +4 -1
  8. package/defaults/rules.ts +36 -38
  9. package/defaults/standardPages.ts +0 -3
  10. package/defaults/texts.ts +11 -2
  11. package/demo/src/content/pages/about.md +2 -0
  12. package/icons/lucide/browser-fill.svg +1 -0
  13. package/icons/lucide/buildings-fill.svg +1 -0
  14. package/icons/lucide/certificate-fill.svg +1 -0
  15. package/icons/lucide/chart-line-up-fill.svg +1 -0
  16. package/icons/lucide/chats-fill.svg +1 -0
  17. package/icons/lucide/envelope-simple-fill.svg +1 -0
  18. package/icons/lucide/file-text-fill.svg +1 -0
  19. package/icons/lucide/folder-simple-fill.svg +1 -0
  20. package/icons/lucide/gauge.svg +1 -1
  21. package/icons/lucide/gear-six.svg +1 -0
  22. package/icons/lucide/globe-simple.svg +1 -0
  23. package/icons/lucide/heart-fill.svg +1 -0
  24. package/icons/lucide/layout.svg +1 -0
  25. package/icons/lucide/list-checks-fill.svg +1 -0
  26. package/icons/lucide/magnifying-glass-fill.svg +1 -0
  27. package/icons/lucide/megaphone-fill.svg +1 -0
  28. package/icons/lucide/newspaper-fill.svg +1 -0
  29. package/icons/lucide/paint-brush-broad-fill.svg +1 -0
  30. package/icons/lucide/puzzle-piece-fill.svg +1 -0
  31. package/icons/lucide/shield-check-fill.svg +1 -0
  32. package/icons/lucide/sidebar-simple.svg +1 -1
  33. package/icons/lucide/sidebar.svg +1 -0
  34. package/icons/lucide/square-half-bottom-fill.svg +1 -0
  35. package/icons/lucide/square-half.svg +1 -0
  36. package/icons/lucide/squares-four-fill.svg +1 -0
  37. package/icons/lucide/storefront-fill.svg +1 -0
  38. package/icons/lucide/tag-fill.svg +1 -0
  39. package/icons/lucide/toggle-right-fill.svg +1 -0
  40. package/icons/lucide/trash-fill.svg +1 -0
  41. package/icons/lucide/user-fill.svg +1 -0
  42. package/icons/lucide/wrench-fill.svg +1 -0
  43. package/icons/material-symbols/browser-fill.svg +1 -0
  44. package/icons/material-symbols/buildings-fill.svg +1 -0
  45. package/icons/material-symbols/certificate-fill.svg +1 -0
  46. package/icons/material-symbols/chart-line-up-fill.svg +1 -0
  47. package/icons/material-symbols/chats-fill.svg +1 -0
  48. package/icons/material-symbols/envelope-simple-fill.svg +1 -0
  49. package/icons/material-symbols/file-text-fill.svg +1 -0
  50. package/icons/material-symbols/folder-simple-fill.svg +1 -0
  51. package/icons/material-symbols/gauge.svg +1 -1
  52. package/icons/material-symbols/gear-six.svg +1 -0
  53. package/icons/material-symbols/globe-simple.svg +1 -0
  54. package/icons/material-symbols/heart-fill.svg +1 -0
  55. package/icons/material-symbols/layout.svg +1 -0
  56. package/icons/material-symbols/list-checks-fill.svg +1 -0
  57. package/icons/material-symbols/magnifying-glass-fill.svg +1 -0
  58. package/icons/material-symbols/megaphone-fill.svg +1 -0
  59. package/icons/material-symbols/newspaper-fill.svg +1 -0
  60. package/icons/material-symbols/paint-brush-broad-fill.svg +1 -0
  61. package/icons/material-symbols/puzzle-piece-fill.svg +1 -0
  62. package/icons/material-symbols/shield-check-fill.svg +1 -0
  63. package/icons/material-symbols/sidebar-simple.svg +1 -1
  64. package/icons/material-symbols/sidebar.svg +1 -0
  65. package/icons/material-symbols/square-half-bottom-fill.svg +1 -0
  66. package/icons/material-symbols/square-half.svg +1 -0
  67. package/icons/material-symbols/squares-four-fill.svg +1 -0
  68. package/icons/material-symbols/storefront-fill.svg +1 -0
  69. package/icons/material-symbols/tag-fill.svg +1 -0
  70. package/icons/material-symbols/toggle-right-fill.svg +1 -0
  71. package/icons/material-symbols/trash-fill.svg +1 -0
  72. package/icons/material-symbols/user-fill.svg +1 -0
  73. package/icons/material-symbols/wrench-fill.svg +1 -0
  74. package/icons/phosphor/browser-fill.svg +1 -0
  75. package/icons/phosphor/buildings-fill.svg +1 -0
  76. package/icons/phosphor/certificate-fill.svg +1 -0
  77. package/icons/phosphor/chart-line-up-fill.svg +1 -0
  78. package/icons/phosphor/chats-fill.svg +1 -0
  79. package/icons/phosphor/envelope-simple-fill.svg +1 -0
  80. package/icons/phosphor/file-text-fill.svg +1 -0
  81. package/icons/phosphor/folder-simple-fill.svg +1 -0
  82. package/icons/phosphor/gear-six.svg +1 -0
  83. package/icons/phosphor/globe-simple.svg +1 -0
  84. package/icons/phosphor/heart-fill.svg +1 -0
  85. package/icons/phosphor/layout.svg +1 -0
  86. package/icons/phosphor/list-checks-fill.svg +1 -0
  87. package/icons/phosphor/magnifying-glass-fill.svg +1 -0
  88. package/icons/phosphor/megaphone-fill.svg +1 -0
  89. package/icons/phosphor/newspaper-fill.svg +1 -0
  90. package/icons/phosphor/paint-brush-broad-fill.svg +1 -0
  91. package/icons/phosphor/puzzle-piece-fill.svg +1 -0
  92. package/icons/phosphor/shield-check-fill.svg +1 -0
  93. package/icons/phosphor/sidebar.svg +1 -0
  94. package/icons/phosphor/square-half-bottom-fill.svg +1 -0
  95. package/icons/phosphor/square-half.svg +1 -0
  96. package/icons/phosphor/squares-four-fill.svg +1 -0
  97. package/icons/phosphor/storefront-fill.svg +1 -0
  98. package/icons/phosphor/tag-fill.svg +1 -0
  99. package/icons/phosphor/toggle-right-fill.svg +1 -0
  100. package/icons/phosphor/trash-fill.svg +1 -0
  101. package/icons/phosphor/user-fill.svg +1 -0
  102. package/icons/phosphor/wrench-fill.svg +1 -0
  103. package/lib/breakpoints.d.mts +13 -0
  104. package/lib/breakpoints.mjs +20 -0
  105. package/lib/breakpoints.test.mjs +39 -0
  106. package/lib/build-lane.d.mts +15 -0
  107. package/lib/build-lane.mjs +23 -0
  108. package/lib/build-lane.test.mjs +74 -0
  109. package/lib/build-settings.d.mts +16 -0
  110. package/lib/build-settings.mjs +39 -0
  111. package/lib/build-settings.test.mjs +41 -0
  112. package/lib/contracts.d.mts +3 -2
  113. package/lib/contracts.mjs +3 -2
  114. package/lib/drawer-swipe.d.mts +10 -0
  115. package/lib/drawer-swipe.mjs +17 -0
  116. package/lib/drawer-swipe.test.mjs +33 -0
  117. package/lib/drawerKeys.d.mts +9 -0
  118. package/lib/drawerKeys.mjs +26 -0
  119. package/lib/drawerKeys.test.mjs +21 -0
  120. package/lib/eyebrow.d.mts +6 -0
  121. package/lib/eyebrow.mjs +24 -0
  122. package/lib/eyebrow.test.mjs +20 -0
  123. package/lib/front-sections.test.mjs +82 -0
  124. package/lib/heading-levels.d.mts +7 -0
  125. package/lib/heading-levels.mjs +16 -0
  126. package/lib/heading-levels.test.mjs +37 -0
  127. package/lib/inline.ts +3 -2
  128. package/lib/markdown.ts +2 -0
  129. package/lib/materialIcon.d.mts +21 -0
  130. package/lib/materialIcon.mjs +29 -0
  131. package/lib/materialIcon.test.mjs +45 -0
  132. package/lib/menu-layout.d.mts +11 -0
  133. package/lib/menu-layout.mjs +14 -0
  134. package/lib/menu-layout.test.mjs +23 -0
  135. package/lib/menu.d.mts +59 -0
  136. package/lib/menu.mjs +129 -0
  137. package/lib/menu.test.mjs +291 -0
  138. package/lib/rehype-emphasize.d.mts +4 -0
  139. package/lib/rehype-emphasize.mjs +20 -0
  140. package/lib/rehype-emphasize.test.mjs +39 -0
  141. package/lib/section-in-view.d.mts +8 -0
  142. package/lib/section-in-view.mjs +25 -0
  143. package/lib/section-in-view.test.mjs +35 -0
  144. package/lib/section-marker.d.mts +5 -0
  145. package/lib/section-marker.mjs +18 -0
  146. package/lib/section-marker.test.mjs +22 -0
  147. package/lib/section-ranges.d.mts +12 -0
  148. package/lib/section-ranges.mjs +43 -0
  149. package/lib/section-ranges.test.mjs +61 -0
  150. package/lib/sheet-stops.d.mts +68 -0
  151. package/lib/sheet-stops.mjs +198 -0
  152. package/lib/sheet-stops.test.mjs +155 -0
  153. package/lib/still-timer.d.mts +5 -0
  154. package/lib/still-timer.mjs +17 -0
  155. package/lib/still-timer.test.mjs +42 -0
  156. package/lib/text-sections.d.mts +10 -0
  157. package/lib/text-sections.mjs +45 -0
  158. package/lib/text-sections.test.mjs +78 -0
  159. package/lib/video.mjs +2 -1
  160. package/lib/without-h1.d.mts +1 -0
  161. package/lib/without-h1.mjs +7 -0
  162. package/lib/without-h1.test.mjs +26 -0
  163. package/lib/word-at.d.mts +6 -0
  164. package/lib/word-at.mjs +20 -0
  165. package/lib/word-at.test.mjs +19 -0
  166. package/package.json +3 -1
  167. package/pages/editor/version.json.js +22 -2
  168. package/scripts/already-checked.mjs +11 -0
  169. package/scripts/already-checked.test.mjs +18 -0
  170. package/scripts/build-settings-problems.mjs +27 -0
  171. package/scripts/build-settings-problems.test.mjs +35 -0
  172. package/scripts/check-content.mjs +42 -4
  173. package/scripts/check-worker.mjs +96 -4
  174. package/scripts/ci-build.mjs +85 -0
  175. package/scripts/ci-build.test.mjs +137 -0
  176. package/scripts/editor-roundtrip.mjs +62 -3
  177. package/scripts/editor-screens.mjs +21 -7
  178. package/scripts/git-env.mjs +6 -0
  179. package/scripts/step-command.mjs +34 -0
  180. package/scripts/step-command.test.mjs +50 -0
  181. package/scripts/text-problems.mjs +83 -0
  182. package/scripts/text-problems.test.mjs +74 -0
  183. package/scripts/worker-modules.mjs +11 -1
  184. package/site/breakpoints.d.mts +6 -0
  185. package/site/breakpoints.mjs +52 -0
  186. package/site/breakpoints.test.mjs +36 -0
  187. package/site/casing.d.mts +3 -0
  188. package/site/casing.mjs +26 -0
  189. package/site/content.config.ts +2 -0
  190. package/site/content.ts +2 -4
  191. package/site/defineSite.d.mts +1 -0
  192. package/site/defineSite.mjs +3 -0
  193. package/site/home.ts +3 -2
  194. package/site/icons.d.mts +116 -4
  195. package/site/icons.mjs +62 -6
  196. package/site/images.mjs +1 -1
  197. package/site/live-diff.d.mts +22 -0
  198. package/site/live-diff.mjs +98 -0
  199. package/site/live-diff.test.mjs +235 -0
  200. package/site/materialSymbols.d.mts +5 -0
  201. package/site/materialSymbols.mjs +19 -0
  202. package/site/sections.ts +1 -1
  203. package/site/theme.d.mts +1 -1
  204. package/site/theme.mjs +7 -1
  205. package/src/ActionParts.tsx +1 -1
  206. package/src/Advanced.tsx +101 -20
  207. package/src/App.tsx +47 -121
  208. package/src/AppList.tsx +1 -1
  209. package/src/BlockParts.tsx +3 -3
  210. package/src/Colors.tsx +1 -1
  211. package/src/CommunicationParts.tsx +1 -1
  212. package/src/ContainmentParts.tsx +80 -28
  213. package/src/Deleted.tsx +18 -4
  214. package/src/EditorFooter.tsx +14 -0
  215. package/src/EntryForm.tsx +75 -39
  216. package/src/FormFrame.tsx +3 -8
  217. package/src/Library.tsx +46 -51
  218. package/src/Licenses.tsx +27 -11
  219. package/src/MainDrawerParts.tsx +60 -0
  220. package/src/MainMenu.tsx +136 -0
  221. package/src/MarkdownEditor.tsx +175 -32
  222. package/src/Media.tsx +69 -16
  223. package/src/MediaTags.tsx +91 -0
  224. package/src/ModalSheetSample.tsx +47 -0
  225. package/src/NavigationParts.tsx +67 -21
  226. package/src/NavigationRestParts.tsx +1 -1
  227. package/src/Parts.tsx +71 -0
  228. package/src/PartsShown.tsx +1 -1
  229. package/src/PickerParts.tsx +2 -2
  230. package/src/Redirects.tsx +3 -2
  231. package/src/Screen.tsx +93 -90
  232. package/src/SelectionParts.tsx +22 -6
  233. package/src/SiteLogoLink.tsx +14 -0
  234. package/src/StartFab.tsx +22 -0
  235. package/src/StartStatus.tsx +1 -1
  236. package/src/autoTags.d.mts +28 -0
  237. package/src/autoTags.mjs +68 -0
  238. package/src/autoTags.test.mjs +109 -0
  239. package/src/buildSettings.test.mjs +20 -0
  240. package/src/buildSettings.ts +20 -0
  241. package/src/checkSite.ts +14 -1
  242. package/src/deploy.ts +7 -9
  243. package/src/editor.css +150 -17
  244. package/src/eyebrow.d.mts +5 -0
  245. package/src/eyebrow.mjs +53 -0
  246. package/src/eyebrowState.d.mts +21 -0
  247. package/src/eyebrowState.mjs +62 -0
  248. package/src/eyebrowState.test.mjs +78 -0
  249. package/src/fileRecords.d.mts +115 -0
  250. package/src/fileRecords.mjs +224 -0
  251. package/src/fileRecords.test.mjs +224 -0
  252. package/src/fileTagFilter.d.mts +30 -0
  253. package/src/fileTagFilter.mjs +44 -0
  254. package/src/fileTagFilter.test.mjs +57 -0
  255. package/src/fileTags.d.mts +56 -0
  256. package/src/fileTags.mjs +100 -0
  257. package/src/fileTags.test.mjs +127 -0
  258. package/src/firstHeading.d.mts +6 -0
  259. package/src/firstHeading.mjs +37 -0
  260. package/src/i18n/da-DK/advanced.ts +27 -12
  261. package/src/i18n/da-DK/app.ts +9 -7
  262. package/src/i18n/da-DK/apps.ts +16 -16
  263. package/src/i18n/da-DK/blockSettings.ts +9 -9
  264. package/src/i18n/da-DK/blocks.ts +2 -2
  265. package/src/i18n/da-DK/check.ts +5 -2
  266. package/src/i18n/da-DK/cms.ts +14 -12
  267. package/src/i18n/da-DK/colors.ts +5 -5
  268. package/src/i18n/da-DK/common.ts +2 -2
  269. package/src/i18n/da-DK/company.ts +3 -3
  270. package/src/i18n/da-DK/consents.ts +6 -6
  271. package/src/i18n/da-DK/forms.ts +6 -6
  272. package/src/i18n/da-DK/history.ts +6 -6
  273. package/src/i18n/da-DK/keywords.ts +2 -2
  274. package/src/i18n/da-DK/library.ts +17 -15
  275. package/src/i18n/da-DK/licenses.ts +4 -4
  276. package/src/i18n/da-DK/media.ts +10 -4
  277. package/src/i18n/da-DK/parts.ts +62 -25
  278. package/src/i18n/da-DK/preview.ts +5 -6
  279. package/src/i18n/da-DK/redirects.ts +7 -7
  280. package/src/i18n/da-DK/seo.ts +1 -1
  281. package/src/i18n/da-DK/text.ts +2 -0
  282. package/src/i18n/da-DK/theme.ts +5 -5
  283. package/src/i18n/en-US/advanced.ts +34 -18
  284. package/src/i18n/en-US/app.ts +7 -5
  285. package/src/i18n/en-US/apps.ts +9 -9
  286. package/src/i18n/en-US/blockSettings.ts +4 -4
  287. package/src/i18n/en-US/blocks.ts +6 -6
  288. package/src/i18n/en-US/check.ts +6 -3
  289. package/src/i18n/en-US/cms.ts +15 -14
  290. package/src/i18n/en-US/colors.ts +18 -18
  291. package/src/i18n/en-US/common.ts +3 -3
  292. package/src/i18n/en-US/consents.ts +4 -4
  293. package/src/i18n/en-US/forms.ts +5 -5
  294. package/src/i18n/en-US/history.ts +2 -2
  295. package/src/i18n/en-US/library.ts +21 -15
  296. package/src/i18n/en-US/licenses.ts +6 -6
  297. package/src/i18n/en-US/media.ts +7 -1
  298. package/src/i18n/en-US/parts.ts +60 -21
  299. package/src/i18n/en-US/preview.ts +5 -6
  300. package/src/i18n/en-US/redirects.ts +3 -3
  301. package/src/i18n/en-US/seo.ts +1 -1
  302. package/src/i18n/en-US/text.ts +3 -0
  303. package/src/i18n/en-US/theme.ts +6 -6
  304. package/src/icon.tsx +90 -27
  305. package/src/licenseData.test.mjs +28 -0
  306. package/src/licenseData.ts +12 -1
  307. package/src/markdown.d.mts +2 -0
  308. package/src/markdown.mjs +73 -5
  309. package/src/markdown.test.mjs +74 -0
  310. package/src/materialIcons.ts +8 -0
  311. package/src/menuChildren.ts +36 -0
  312. package/src/menuOpen.ts +34 -0
  313. package/src/pagePreview.tsx +23 -19
  314. package/src/r2Caching.ts +14 -0
  315. package/src/sectionFrame.ts +39 -0
  316. package/src/sectionState.d.mts +19 -0
  317. package/src/sectionState.mjs +31 -0
  318. package/src/sectionState.test.mjs +59 -0
  319. package/src/sections.d.mts +9 -7
  320. package/src/sections.mjs +74 -27
  321. package/src/sections.test.mjs +59 -0
  322. package/src/sidebar.ts +2 -2
  323. package/src/site.ts +27 -17
  324. package/src/stillCursor.d.mts +8 -0
  325. package/src/stillCursor.mjs +19 -0
  326. package/src/stillCursor.test.mjs +26 -0
  327. package/src/tagUses.d.mts +47 -0
  328. package/src/tagUses.mjs +121 -0
  329. package/src/tagUses.test.mjs +141 -0
  330. package/src/themeUi.ts +10 -0
  331. package/src/topBarSlot.tsx +37 -0
  332. package/src/ui.tsx +654 -150
  333. package/src/virtual.d.ts +5 -0
  334. package/starter/README.md +2 -1
  335. package/starter/package.json +2 -1
  336. package/starter/wrangler.jsonc +3 -2
  337. package/theme/blocks/cards/LinkCards.tsx +2 -1
  338. package/theme/blocks/hero/View.tsx +2 -1
  339. package/theme/blocks/video/View.tsx +2 -1
  340. package/theme/components/BlogIndex.astro +2 -2
  341. package/theme/components/BlogPosts.astro +1 -1
  342. package/theme/components/BlogPosts.tsx +9 -6
  343. package/theme/components/Container.astro +1 -1
  344. package/theme/components/CookieConsent.astro +1 -1
  345. package/theme/components/EndBlock.astro +1 -1
  346. package/theme/components/Footer.astro +5 -5
  347. package/theme/components/Header.astro +3 -3
  348. package/theme/components/Icon.astro +2 -2
  349. package/theme/components/MobileMenu.tsx +72 -61
  350. package/theme/components/MobileNav.astro +2 -2
  351. package/theme/components/PageHeader.astro +2 -2
  352. package/theme/components/PageSection.astro +1 -1
  353. package/theme/components/PopupButton.tsx +2 -2
  354. package/theme/components/PopupView.tsx +2 -2
  355. package/theme/components/PostList.tsx +7 -3
  356. package/theme/components/RichText.astro +22 -7
  357. package/theme/components/Section.astro +17 -10
  358. package/theme/components/SectionHeading.tsx +1 -1
  359. package/theme/components/home/PageBlock.astro +4 -4
  360. package/theme/components/home/Text.astro +3 -3
  361. package/theme/layouts/PageLayout.astro +3 -3
  362. package/theme/layouts/PostLayout.astro +9 -8
  363. package/theme/styles/base.css +13 -3
  364. package/theme/styles/blocks.css +97 -10
  365. package/theme/styles/components.css +9 -9
  366. package/theme/styles/elevation.test.mjs +168 -0
  367. package/theme/styles/global.css +65 -59
  368. package/theme/styles/ui.css +460 -131
  369. package/theme/templates/Home.astro +1 -1
  370. package/theme/templates/New.astro +5 -5
  371. package/theme/templates/NotFound.astro +2 -2
  372. package/theme/ui/BottomSheet.tsx +118 -21
  373. package/theme/ui/BottomSheetResizeIcon.tsx +13 -0
  374. package/theme/ui/Button.tsx +4 -3
  375. package/theme/ui/Dialog.tsx +1 -1
  376. package/theme/ui/FabMenu.tsx +13 -12
  377. package/theme/ui/LoadingIndicator.tsx +1 -1
  378. package/theme/ui/NavigationDrawer.tsx +116 -15
  379. package/theme/ui/NavigationRail.tsx +22 -13
  380. package/theme/ui/Search.tsx +1 -1
  381. package/theme/ui/SettingRow.tsx +31 -0
  382. package/theme/ui/Switch.tsx +11 -11
  383. package/theme/ui/TextField.tsx +17 -6
  384. package/theme/ui/bottomSheet.script.ts +3 -2
  385. package/theme/ui/bottomSheetControl.ts +131 -46
  386. package/theme/ui/fabMenu.script.ts +69 -53
  387. package/theme/ui/modalSheetSize.ts +214 -0
  388. package/theme/ui/navigationDrawerControl.ts +35 -0
  389. package/theme/ui/search.script.ts +4 -2
  390. package/worker/index.js +3 -0
  391. package/worker/plan-status.js +46 -0
  392. package/worker/push.js +7 -5
  393. package/worker/r2-status.js +2 -1
  394. package/icons/lucide/desktop.svg +0 -1
  395. package/icons/material-symbols/desktop.svg +0 -1
  396. package/icons/phosphor/desktop.svg +0 -1
@@ -17,7 +17,8 @@
17
17
  when the colours are made from a source colour (dynamic colour), and every text on them keeps the contrast the editor
18
18
  checks (colorPairs), in light and dark mode.
19
19
  */
20
- :root {
20
+ :root,
21
+ .text-section-accent > * {
21
22
  /* The surfaces and the outline, M3's roles as the site's colours ("Farver"): the page on the background, --surface
22
23
  the lowest container, and the containers each a step towards the text's colour. */
23
24
  --md-background: var(--bg);
@@ -39,6 +40,15 @@
39
40
  --elevation-3: 0 1px 3px rgb(0 0 0 / 0.3), 0 4px 8px 3px rgb(0 0 0 / 0.15);
40
41
  --elevation-4: 0 2px 3px rgb(0 0 0 / 0.3), 0 6px 10px 4px rgb(0 0 0 / 0.15);
41
42
  --elevation-5: 0 4px 4px rgb(0 0 0 / 0.3), 0 8px 12px 6px rgb(0 0 0 / 0.15);
43
+ /* M3 shows elevation by colour: the theme's parts have no shadow at rest. Only the FAB (below) and the lift when a part
44
+ is pointed at or dragged have one. */
45
+ --elevation-1-rest-shadow: var(--elevation-0);
46
+ --elevation-2-rest-shadow: var(--elevation-0);
47
+ --elevation-3-rest-shadow: var(--elevation-0);
48
+ --elevation-4-rest-shadow: var(--elevation-0);
49
+ --elevation-5-rest-shadow: var(--elevation-0);
50
+ --fab-shadow: var(--elevation-3);
51
+ --fab-hover-shadow: var(--elevation-4);
42
52
  /* The shade over the page behind a dialog, a sheet and the navigation drawer. */
43
53
  --md-scrim: rgb(0 0 0 / 0.32);
44
54
  /* M3's corner radius scale (m3.material.io/styles/shape/corner-radius-scale), its ten steps named for how round a
@@ -60,14 +70,14 @@
60
70
  --md-shape-full: 9999px;
61
71
 
62
72
  --radius: var(--md-shape-medium);
63
- --shadow: var(--elevation-1);
73
+ --shadow: var(--elevation-1-rest-shadow);
64
74
  /* The site's motion scheme's curve ("Bevægelse", @morphemecms/cms/lib/motion.ts). */
65
75
  --ease: var(--motion-ease, cubic-bezier(0.2, 0, 0, 1));
66
76
 
67
77
  --block-surface: var(--md-surface-container-low);
68
78
  --block-radius: var(--md-shape-medium);
69
79
  --block-control-radius: var(--md-shape-full);
70
- --block-shadow: var(--elevation-1);
80
+ --block-shadow: var(--elevation-1-rest-shadow);
71
81
  --block-ease: var(--ease);
72
82
  /* Pictures in a list, a row, a step on the time line: large corners. */
73
83
  --radius-small: var(--md-shape-large);
@@ -75,14 +85,12 @@
75
85
  /* The standard theme's components (docs/editor.md, "Temaets variabler"). Dialogs (the cookie question, a pop-up):
76
86
  extra-large increased corners, a high surface container, no line (the third elevation, as every dialog). */
77
87
  --dialog-radius: var(--md-shape-extra-large-increased);
78
- --dialog-surface: var(--md-surface-container-high);
79
88
  --dialog-line: transparent;
80
89
  --dialog-scrim: var(--md-scrim);
81
90
  /* A bottom sheet (ui.css; a dialog on a computer): extra-large corners, the lowest surface container (also as a dialog,
82
91
  as M3's on every screen), no lines, the scrim, the drag handle in on-surface-variant at 40% (the first elevation,
83
92
  the third as a dialog, as every bottom sheet). */
84
93
  --bottom-sheet-radius: var(--md-shape-extra-large);
85
- --bottom-sheet-surface: var(--md-surface-container-low);
86
94
  --bottom-sheet-line: transparent;
87
95
  --bottom-sheet-scrim: var(--md-scrim);
88
96
  --bottom-sheet-handle: color-mix(in srgb, var(--muted) 40%, transparent);
@@ -140,7 +148,6 @@
140
148
  --button-tonal-surface: var(--tint);
141
149
  --button-tonal-text: var(--ink);
142
150
  --button-tonal-hover: color-mix(in srgb, var(--ink) 8%, var(--tint));
143
- --button-elevated-surface: var(--md-surface-container-low);
144
151
  --button-elevated-text: var(--accent);
145
152
  --button-outlined-surface: transparent;
146
153
  --button-outlined-text: var(--accent);
@@ -187,7 +194,6 @@
187
194
  --card-filled-surface: var(--md-surface-container-highest);
188
195
  --card-outlined-surface: var(--surface);
189
196
  --card-outlined-line: var(--line);
190
- --card-elevated-surface: var(--md-surface-container-low);
191
197
  /* Lists (M3 Expressive's list tokens): items 56, 72 and 88px high by their lines, 16px in from their sides, 10px over
192
198
  and under their text and 12px between their elements, without lines between them; 20px icons; the headline in body
193
199
  large, the supporting text in body medium, the overline and the trailing text in label small; a state layer in the
@@ -232,10 +238,8 @@
232
238
  /* The header's parts (ui.css): the top app bar on the background, in a surface container once the page scrolls under
233
239
  it (M3 shows its second elevation there by that surface alone), without a line, a shadow or a blur. */
234
240
  --top-app-bar-surface: var(--md-background);
235
- --top-app-bar-stuck-surface: var(--md-surface-container);
236
241
  --top-app-bar-line-width: 0;
237
242
  --top-app-bar-backdrop: none;
238
- --top-app-bar-stuck-shadow: none;
239
243
  /* Menus: a surface container with small corners (its groups' inner corners extra-small), the second elevation, items 48px high, 112–280px wide, and
240
244
  scrolling when higher than the screen; the open page in the secondary container. */
241
245
  --menu-width: max-content;
@@ -244,7 +248,6 @@
244
248
  --menu-max-height: calc(100dvh - 5rem);
245
249
  --menu-radius: var(--md-shape-small);
246
250
  --menu-group-inner-radius: var(--md-shape-extra-small);
247
- --menu-surface: var(--md-surface-container);
248
251
  --menu-line: transparent;
249
252
  --menu-padding: 0.5rem 0;
250
253
  --menu-item-height: 3rem;
@@ -258,18 +261,7 @@
258
261
  --menu-item-selected-weight: 400;
259
262
  /* Navigation drawers: from the left, large corners towards the page, a low surface container, M3's scrim; items 56px
260
263
  high with a full active indicator in the secondary container, a label in medium weight. */
261
- --navigation-drawer-width: min(22.5rem, 88vw);
262
- --navigation-drawer-radius: var(--md-shape-none) var(--md-shape-large) var(--md-shape-large) var(--md-shape-none);
263
- --navigation-drawer-surface: var(--md-surface-container-low);
264
264
  --navigation-drawer-scrim: var(--md-scrim);
265
- --navigation-drawer-item-height: 3.5rem;
266
- --navigation-drawer-item-padding: 0 1.5rem 0 1rem;
267
- --navigation-drawer-item-radius: var(--md-shape-full);
268
- --navigation-drawer-item-text: var(--muted);
269
- --navigation-drawer-item-hover: var(--md-hover);
270
- --navigation-drawer-item-active-surface: var(--tint);
271
- --navigation-drawer-item-active-text: var(--ink);
272
- --navigation-drawer-item-active-weight: 500;
273
265
  --navigation-drawer-row-gap: 0;
274
266
  --navigation-drawer-toggle-size: 3rem;
275
267
  --navigation-drawer-toggle-hover: var(--md-hover);
@@ -329,7 +321,6 @@
329
321
  --switch-handle-pressed-size: 1.75rem;
330
322
  --switch-handle-surface: var(--md-outline);
331
323
  --switch-handle-checked-surface: var(--on-accent);
332
- --switch-handle-shadow: none;
333
324
  --switch-icon-color: var(--md-surface-container-highest);
334
325
  --switch-icon-checked-color: var(--accent);
335
326
  --switch-disabled-opacity: 0.38;
@@ -357,7 +348,6 @@
357
348
  --slider-handle-radius: var(--md-shape-full);
358
349
  --slider-handle-surface: var(--accent);
359
350
  --slider-handle-line-width: 0;
360
- --slider-handle-shadow: none;
361
351
  --slider-handle-pressed-width: 0.125rem;
362
352
  --slider-handle-inset: 0.375rem;
363
353
  --slider-stop-color: var(--accent);
@@ -370,8 +360,6 @@
370
360
  /* Side sheets: a standard one on the page's surface with the outline variant between them, a modal one in a low
371
361
  surface container with large corners towards the page, the first elevation and M3's scrim; the headline in title
372
362
  large, a line in the outline variant over the actions. */
373
- --side-sheet-surface: var(--md-background);
374
- --side-sheet-modal-surface: var(--md-surface-container-low);
375
363
  --side-sheet-radius: var(--md-shape-large);
376
364
  /* A modal navigation rail: large corners towards the page, as the drawer. */
377
365
  --navigation-rail-modal-radius: var(--md-shape-large);
@@ -395,7 +383,6 @@
395
383
  --tooltip-plain-surface: var(--inverse-surface);
396
384
  --tooltip-plain-text: var(--inverse-on-surface);
397
385
  --tooltip-plain-radius: var(--md-shape-extra-small);
398
- --tooltip-rich-surface: var(--md-surface-container);
399
386
  --tooltip-rich-text: var(--muted);
400
387
  --tooltip-rich-subhead: var(--ink);
401
388
  --tooltip-rich-radius: var(--md-shape-medium);
@@ -422,7 +409,6 @@
422
409
  --navigation-rail-width: 6rem;
423
410
  --navigation-rail-expanded-width: 13.75rem;
424
411
  --navigation-rail-padding: 1.5rem 0.5rem;
425
- --navigation-rail-surface: var(--md-background);
426
412
  --navigation-rail-line: transparent;
427
413
  --navigation-rail-item-text: var(--muted);
428
414
  --navigation-rail-item-selected-text: var(--ink);
@@ -441,7 +427,6 @@
441
427
  --search-bar-line: transparent;
442
428
  --search-bar-hover: color-mix(in srgb, var(--ink) 8%, var(--md-surface-container-high));
443
429
  --search-bar-placeholder: var(--muted);
444
- --search-view-surface: var(--md-surface-container-high);
445
430
  --search-view-radius: var(--md-shape-extra-large);
446
431
  --search-view-line: transparent;
447
432
  --search-view-divider: var(--line);
@@ -475,14 +460,48 @@
475
460
  --time-picker-dial-surface: var(--md-surface-container-highest);
476
461
  }
477
462
 
463
+ /* The blocks in a section on the accent (blocks.css) read as an inverted theme: the site's colours below are swapped for
464
+ it, and the list above (the M3 aliases and the parts' variables, which are resolved where they are declared) is
465
+ declared again on them (the selector of its rule), so every part takes the swapped colours. The section's own
466
+ colours are in --section-… (blocks.css). */
467
+ .text-section-accent > * {
468
+ --ink: var(--section-on-accent);
469
+ --muted: color-mix(in srgb, var(--section-on-accent) 80%, transparent);
470
+ --line: color-mix(in srgb, var(--section-on-accent) 35%, transparent);
471
+ --outline: color-mix(in srgb, var(--section-on-accent) 35%, transparent);
472
+ --bg: var(--section-accent);
473
+ --accent: var(--section-on-accent);
474
+ --accent-hover: color-mix(in srgb, var(--section-on-accent) 88%, var(--section-accent));
475
+ --on-accent: var(--section-accent);
476
+ --tint: color-mix(in srgb, var(--section-on-accent) 14%, transparent);
477
+ --surface: color-mix(in srgb, var(--section-on-accent) 10%, transparent);
478
+ --surface-container-lowest: color-mix(in srgb, var(--section-on-accent) 10%, transparent);
479
+ --surface-container-low: color-mix(in srgb, var(--section-on-accent) 12%, transparent);
480
+ --surface-container: color-mix(in srgb, var(--section-on-accent) 14%, transparent);
481
+ --surface-container-high: color-mix(in srgb, var(--section-on-accent) 18%, transparent);
482
+ --surface-container-highest: color-mix(in srgb, var(--section-on-accent) 22%, transparent);
483
+ --secondary: var(--section-on-accent);
484
+ --on-secondary: var(--section-accent);
485
+ --secondary-container: color-mix(in srgb, var(--section-on-accent) 22%, transparent);
486
+ --on-secondary-container: var(--section-on-accent);
487
+ --tertiary: var(--section-on-accent);
488
+ --on-tertiary: var(--section-accent);
489
+ --tertiary-container: color-mix(in srgb, var(--section-on-accent) 22%, transparent);
490
+ --on-tertiary-container: var(--section-on-accent);
491
+ --accent-container: color-mix(in srgb, var(--section-on-accent) 22%, transparent);
492
+ --on-accent-container: var(--section-on-accent);
493
+ --block-shadow: none;
494
+ --shadow: none;
495
+ }
496
+
478
497
  /* The same elevation in dark mode (the standard theme's shadow there is another). */
479
498
  @media (prefers-color-scheme: dark) {
480
499
  :root:not([data-theme='light']) {
481
- --shadow: var(--elevation-1);
500
+ --shadow: var(--elevation-1-rest-shadow);
482
501
  }
483
502
  }
484
503
  :root[data-theme='dark'] {
485
- --shadow: var(--elevation-1);
504
+ --shadow: var(--elevation-1-rest-shadow);
486
505
  }
487
506
 
488
507
  @theme inline {
@@ -541,7 +560,7 @@
541
560
  }
542
561
  /* The hero's buttons: small (40px) on a phone, so two fit side by side, medium (56px, a larger label) from a
543
562
  tablet. */
544
- @media (min-width: 48rem) {
563
+ @media (width >= theme(--breakpoint-medium)) {
545
564
  .block-hero {
546
565
  --button-height: 3.5rem;
547
566
  --button-square-radius: var(--md-shape-large);
@@ -878,7 +897,7 @@
878
897
  .block-cta-picture {
879
898
  border-radius: var(--md-shape-large);
880
899
  }
881
- @media (min-width: 48rem) {
900
+ @media (width >= theme(--breakpoint-medium)) {
882
901
  .block-cta {
883
902
  --card-padding: 2rem;
884
903
  }
@@ -904,7 +923,7 @@
904
923
  width: 2rem;
905
924
  height: 0.25rem;
906
925
  }
907
- @media (width >= 48rem) {
926
+ @media (width >= theme(--breakpoint-medium)) {
908
927
  .bottom-sheet-header {
909
928
  padding: 1.5rem 1.5rem 0.75rem;
910
929
  }
@@ -1076,7 +1095,7 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1076
1095
  bottom: max(1rem, env(safe-area-inset-bottom));
1077
1096
  z-index: 30;
1078
1097
  }
1079
- @media (min-width: 48rem) {
1098
+ @media (width >= theme(--breakpoint-medium)) {
1080
1099
  [data-fab] {
1081
1100
  right: 1.5rem;
1082
1101
  bottom: 1.5rem;
@@ -1093,7 +1112,7 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1093
1112
  /* On a phone with a bar at the bottom of the screen (a docked toolbar, components.css), the page's FAB is not shown; the
1094
1113
  bar's buttons are the common buttons, round and as everywhere else (only pressed a little squarer), the filled one to
1095
1114
  the right, after the outlined one or the text. */
1096
- @media (width < 48rem) {
1115
+ @media (width < theme(--breakpoint-medium)) {
1097
1116
  body:has(.theme-action-bar) [data-fab] {
1098
1117
  display: none;
1099
1118
  }
@@ -1102,14 +1121,7 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1102
1121
  order: 2;
1103
1122
  }
1104
1123
 
1105
- /* The modal navigation drawer (its variables above, MobileMenu.tsx): room inside it; nothing in it is squeezed when its
1106
- content is higher than the screen, the drawer scrolls instead. */
1107
- .navigation-drawer {
1108
- padding: 0.75rem 0.75rem max(1rem, env(safe-area-inset-bottom));
1109
- }
1110
- .navigation-drawer > * {
1111
- flex-shrink: 0;
1112
- }
1124
+ /* The site's menu in the navigation drawer (its values are ui.css's, MobileMenu.tsx): its head. */
1113
1125
  .md-drawer-head {
1114
1126
  display: flex;
1115
1127
  align-items: center;
@@ -1129,16 +1141,15 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1129
1141
  font-weight: var(--type-body-medium-weight);
1130
1142
  letter-spacing: var(--type-body-medium-tracking);
1131
1143
  }
1132
- .navigation-drawer-item:focus-visible {
1133
- background: var(--md-pressed);
1134
- }
1135
1144
  /* An item with sub-pages: its link and the caret in one row, the active indicator around both. */
1136
1145
  .navigation-drawer-row {
1137
1146
  border-radius: var(--md-shape-full);
1138
1147
  transition: background-color var(--motion-effects);
1139
1148
  }
1140
1149
  .navigation-drawer-row > .navigation-drawer-item,
1141
- .navigation-drawer-row > .navigation-drawer-item:hover {
1150
+ .navigation-drawer-row > .navigation-drawer-item:hover,
1151
+ .navigation-drawer-row > .navigation-drawer-item:focus-visible,
1152
+ .navigation-drawer-row > .navigation-drawer-item:active {
1142
1153
  background: none;
1143
1154
  }
1144
1155
  .navigation-drawer-row:has(> .navigation-drawer-item:hover) {
@@ -1148,16 +1159,16 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1148
1159
  background: var(--md-pressed);
1149
1160
  }
1150
1161
  .navigation-drawer-row[data-active] {
1151
- background: var(--tint);
1162
+ background: var(--secondary-container);
1152
1163
  }
1153
1164
  .navigation-drawer-row[data-active] > .navigation-drawer-item {
1154
- color: var(--ink);
1165
+ color: var(--on-secondary-container);
1155
1166
  }
1156
1167
  .navigation-drawer-row[data-active]:has(> .navigation-drawer-item:hover) {
1157
- background: color-mix(in srgb, var(--ink) 8%, var(--tint));
1168
+ background: color-mix(in srgb, var(--on-secondary-container) 8%, var(--secondary-container));
1158
1169
  }
1159
1170
  .navigation-drawer-row[data-active]:has(> .navigation-drawer-item:focus-visible) {
1160
- background: color-mix(in srgb, var(--ink) 10%, var(--tint));
1171
+ background: color-mix(in srgb, var(--on-secondary-container) 10%, var(--secondary-container));
1161
1172
  }
1162
1173
  .navigation-drawer-toggle {
1163
1174
  margin-right: 0.25rem;
@@ -1189,15 +1200,10 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1189
1200
  background: var(--md-pressed);
1190
1201
  }
1191
1202
  .navigation-drawer-subitem[data-active] {
1192
- background: var(--tint);
1193
- color: var(--ink);
1203
+ background: var(--secondary-container);
1204
+ color: var(--on-secondary-container);
1194
1205
  font-weight: 400;
1195
1206
  }
1196
- .md-divider {
1197
- margin: 0.5rem 1rem;
1198
- border: 0;
1199
- border-top: 1px solid var(--line);
1200
- }
1201
1207
 
1202
1208
  /* The footer: a surface container with extra-large corners at the top, a headline, lists with leading icons and a
1203
1209
  state layer, and text buttons at the bottom. */
@@ -1292,7 +1298,7 @@ li:has(.menu-item[aria-current='page']) > .md-nav-item {
1292
1298
  }
1293
1299
  /* Room under the footer's last line for the FAB, or for the bar at the bottom of the screen: in the footer instead of
1294
1300
  under the page (components.css), so the footer reaches the bar. */
1295
- @media (width < 48rem) {
1301
+ @media (width < theme(--breakpoint-medium)) {
1296
1302
  body:has(.theme-action-bar):has(.md-footer) {
1297
1303
  padding-bottom: 0;
1298
1304
  }