@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.
- package/CHANGELOG.md +16 -0
- package/astro.mjs +3 -0
- package/bin/morpheme.mjs +3 -1
- package/defaults/blockTexts.ts +2 -2
- package/defaults/collections.ts +10 -0
- package/defaults/editor.ts +57 -53
- package/defaults/privacy.ts +4 -1
- package/defaults/rules.ts +36 -38
- package/defaults/standardPages.ts +0 -3
- package/defaults/texts.ts +11 -2
- package/demo/src/content/pages/about.md +2 -0
- package/icons/lucide/browser-fill.svg +1 -0
- package/icons/lucide/buildings-fill.svg +1 -0
- package/icons/lucide/certificate-fill.svg +1 -0
- package/icons/lucide/chart-line-up-fill.svg +1 -0
- package/icons/lucide/chats-fill.svg +1 -0
- package/icons/lucide/envelope-simple-fill.svg +1 -0
- package/icons/lucide/file-text-fill.svg +1 -0
- package/icons/lucide/folder-simple-fill.svg +1 -0
- package/icons/lucide/gauge.svg +1 -1
- package/icons/lucide/gear-six.svg +1 -0
- package/icons/lucide/globe-simple.svg +1 -0
- package/icons/lucide/heart-fill.svg +1 -0
- package/icons/lucide/layout.svg +1 -0
- package/icons/lucide/list-checks-fill.svg +1 -0
- package/icons/lucide/magnifying-glass-fill.svg +1 -0
- package/icons/lucide/megaphone-fill.svg +1 -0
- package/icons/lucide/newspaper-fill.svg +1 -0
- package/icons/lucide/paint-brush-broad-fill.svg +1 -0
- package/icons/lucide/puzzle-piece-fill.svg +1 -0
- package/icons/lucide/shield-check-fill.svg +1 -0
- package/icons/lucide/sidebar-simple.svg +1 -1
- package/icons/lucide/sidebar.svg +1 -0
- package/icons/lucide/square-half-bottom-fill.svg +1 -0
- package/icons/lucide/square-half.svg +1 -0
- package/icons/lucide/squares-four-fill.svg +1 -0
- package/icons/lucide/storefront-fill.svg +1 -0
- package/icons/lucide/tag-fill.svg +1 -0
- package/icons/lucide/toggle-right-fill.svg +1 -0
- package/icons/lucide/trash-fill.svg +1 -0
- package/icons/lucide/user-fill.svg +1 -0
- package/icons/lucide/wrench-fill.svg +1 -0
- package/icons/material-symbols/browser-fill.svg +1 -0
- package/icons/material-symbols/buildings-fill.svg +1 -0
- package/icons/material-symbols/certificate-fill.svg +1 -0
- package/icons/material-symbols/chart-line-up-fill.svg +1 -0
- package/icons/material-symbols/chats-fill.svg +1 -0
- package/icons/material-symbols/envelope-simple-fill.svg +1 -0
- package/icons/material-symbols/file-text-fill.svg +1 -0
- package/icons/material-symbols/folder-simple-fill.svg +1 -0
- package/icons/material-symbols/gauge.svg +1 -1
- package/icons/material-symbols/gear-six.svg +1 -0
- package/icons/material-symbols/globe-simple.svg +1 -0
- package/icons/material-symbols/heart-fill.svg +1 -0
- package/icons/material-symbols/layout.svg +1 -0
- package/icons/material-symbols/list-checks-fill.svg +1 -0
- package/icons/material-symbols/magnifying-glass-fill.svg +1 -0
- package/icons/material-symbols/megaphone-fill.svg +1 -0
- package/icons/material-symbols/newspaper-fill.svg +1 -0
- package/icons/material-symbols/paint-brush-broad-fill.svg +1 -0
- package/icons/material-symbols/puzzle-piece-fill.svg +1 -0
- package/icons/material-symbols/shield-check-fill.svg +1 -0
- package/icons/material-symbols/sidebar-simple.svg +1 -1
- package/icons/material-symbols/sidebar.svg +1 -0
- package/icons/material-symbols/square-half-bottom-fill.svg +1 -0
- package/icons/material-symbols/square-half.svg +1 -0
- package/icons/material-symbols/squares-four-fill.svg +1 -0
- package/icons/material-symbols/storefront-fill.svg +1 -0
- package/icons/material-symbols/tag-fill.svg +1 -0
- package/icons/material-symbols/toggle-right-fill.svg +1 -0
- package/icons/material-symbols/trash-fill.svg +1 -0
- package/icons/material-symbols/user-fill.svg +1 -0
- package/icons/material-symbols/wrench-fill.svg +1 -0
- package/icons/phosphor/browser-fill.svg +1 -0
- package/icons/phosphor/buildings-fill.svg +1 -0
- package/icons/phosphor/certificate-fill.svg +1 -0
- package/icons/phosphor/chart-line-up-fill.svg +1 -0
- package/icons/phosphor/chats-fill.svg +1 -0
- package/icons/phosphor/envelope-simple-fill.svg +1 -0
- package/icons/phosphor/file-text-fill.svg +1 -0
- package/icons/phosphor/folder-simple-fill.svg +1 -0
- package/icons/phosphor/gear-six.svg +1 -0
- package/icons/phosphor/globe-simple.svg +1 -0
- package/icons/phosphor/heart-fill.svg +1 -0
- package/icons/phosphor/layout.svg +1 -0
- package/icons/phosphor/list-checks-fill.svg +1 -0
- package/icons/phosphor/magnifying-glass-fill.svg +1 -0
- package/icons/phosphor/megaphone-fill.svg +1 -0
- package/icons/phosphor/newspaper-fill.svg +1 -0
- package/icons/phosphor/paint-brush-broad-fill.svg +1 -0
- package/icons/phosphor/puzzle-piece-fill.svg +1 -0
- package/icons/phosphor/shield-check-fill.svg +1 -0
- package/icons/phosphor/sidebar.svg +1 -0
- package/icons/phosphor/square-half-bottom-fill.svg +1 -0
- package/icons/phosphor/square-half.svg +1 -0
- package/icons/phosphor/squares-four-fill.svg +1 -0
- package/icons/phosphor/storefront-fill.svg +1 -0
- package/icons/phosphor/tag-fill.svg +1 -0
- package/icons/phosphor/toggle-right-fill.svg +1 -0
- package/icons/phosphor/trash-fill.svg +1 -0
- package/icons/phosphor/user-fill.svg +1 -0
- package/icons/phosphor/wrench-fill.svg +1 -0
- package/lib/breakpoints.d.mts +13 -0
- package/lib/breakpoints.mjs +20 -0
- package/lib/breakpoints.test.mjs +39 -0
- package/lib/build-lane.d.mts +15 -0
- package/lib/build-lane.mjs +23 -0
- package/lib/build-lane.test.mjs +74 -0
- package/lib/build-settings.d.mts +16 -0
- package/lib/build-settings.mjs +39 -0
- package/lib/build-settings.test.mjs +41 -0
- package/lib/contracts.d.mts +3 -2
- package/lib/contracts.mjs +3 -2
- package/lib/drawer-swipe.d.mts +10 -0
- package/lib/drawer-swipe.mjs +17 -0
- package/lib/drawer-swipe.test.mjs +33 -0
- package/lib/drawerKeys.d.mts +9 -0
- package/lib/drawerKeys.mjs +26 -0
- package/lib/drawerKeys.test.mjs +21 -0
- package/lib/eyebrow.d.mts +6 -0
- package/lib/eyebrow.mjs +24 -0
- package/lib/eyebrow.test.mjs +20 -0
- package/lib/front-sections.test.mjs +82 -0
- package/lib/heading-levels.d.mts +7 -0
- package/lib/heading-levels.mjs +16 -0
- package/lib/heading-levels.test.mjs +37 -0
- package/lib/inline.ts +3 -2
- package/lib/markdown.ts +2 -0
- package/lib/materialIcon.d.mts +21 -0
- package/lib/materialIcon.mjs +29 -0
- package/lib/materialIcon.test.mjs +45 -0
- package/lib/menu-layout.d.mts +11 -0
- package/lib/menu-layout.mjs +14 -0
- package/lib/menu-layout.test.mjs +23 -0
- package/lib/menu.d.mts +59 -0
- package/lib/menu.mjs +129 -0
- package/lib/menu.test.mjs +291 -0
- package/lib/rehype-emphasize.d.mts +4 -0
- package/lib/rehype-emphasize.mjs +20 -0
- package/lib/rehype-emphasize.test.mjs +39 -0
- package/lib/section-in-view.d.mts +8 -0
- package/lib/section-in-view.mjs +25 -0
- package/lib/section-in-view.test.mjs +35 -0
- package/lib/section-marker.d.mts +5 -0
- package/lib/section-marker.mjs +18 -0
- package/lib/section-marker.test.mjs +22 -0
- package/lib/section-ranges.d.mts +12 -0
- package/lib/section-ranges.mjs +43 -0
- package/lib/section-ranges.test.mjs +61 -0
- package/lib/sheet-stops.d.mts +68 -0
- package/lib/sheet-stops.mjs +198 -0
- package/lib/sheet-stops.test.mjs +155 -0
- package/lib/still-timer.d.mts +5 -0
- package/lib/still-timer.mjs +17 -0
- package/lib/still-timer.test.mjs +42 -0
- package/lib/text-sections.d.mts +10 -0
- package/lib/text-sections.mjs +45 -0
- package/lib/text-sections.test.mjs +78 -0
- package/lib/video.mjs +2 -1
- package/lib/without-h1.d.mts +1 -0
- package/lib/without-h1.mjs +7 -0
- package/lib/without-h1.test.mjs +26 -0
- package/lib/word-at.d.mts +6 -0
- package/lib/word-at.mjs +20 -0
- package/lib/word-at.test.mjs +19 -0
- package/package.json +3 -1
- package/pages/editor/version.json.js +22 -2
- package/scripts/already-checked.mjs +11 -0
- package/scripts/already-checked.test.mjs +18 -0
- package/scripts/build-settings-problems.mjs +27 -0
- package/scripts/build-settings-problems.test.mjs +35 -0
- package/scripts/check-content.mjs +42 -4
- package/scripts/check-worker.mjs +96 -4
- package/scripts/ci-build.mjs +85 -0
- package/scripts/ci-build.test.mjs +137 -0
- package/scripts/editor-roundtrip.mjs +62 -3
- package/scripts/editor-screens.mjs +21 -7
- package/scripts/git-env.mjs +6 -0
- package/scripts/step-command.mjs +34 -0
- package/scripts/step-command.test.mjs +50 -0
- package/scripts/text-problems.mjs +83 -0
- package/scripts/text-problems.test.mjs +74 -0
- package/scripts/worker-modules.mjs +11 -1
- package/site/breakpoints.d.mts +6 -0
- package/site/breakpoints.mjs +52 -0
- package/site/breakpoints.test.mjs +36 -0
- package/site/casing.d.mts +3 -0
- package/site/casing.mjs +26 -0
- package/site/content.config.ts +2 -0
- package/site/content.ts +2 -4
- package/site/defineSite.d.mts +1 -0
- package/site/defineSite.mjs +3 -0
- package/site/home.ts +3 -2
- package/site/icons.d.mts +116 -4
- package/site/icons.mjs +62 -6
- package/site/images.mjs +1 -1
- package/site/live-diff.d.mts +22 -0
- package/site/live-diff.mjs +98 -0
- package/site/live-diff.test.mjs +235 -0
- package/site/materialSymbols.d.mts +5 -0
- package/site/materialSymbols.mjs +19 -0
- package/site/sections.ts +1 -1
- package/site/theme.d.mts +1 -1
- package/site/theme.mjs +7 -1
- package/src/ActionParts.tsx +1 -1
- package/src/Advanced.tsx +101 -20
- package/src/App.tsx +47 -121
- package/src/AppList.tsx +1 -1
- package/src/BlockParts.tsx +3 -3
- package/src/Colors.tsx +1 -1
- package/src/CommunicationParts.tsx +1 -1
- package/src/ContainmentParts.tsx +80 -28
- package/src/Deleted.tsx +18 -4
- package/src/EditorFooter.tsx +14 -0
- package/src/EntryForm.tsx +75 -39
- package/src/FormFrame.tsx +3 -8
- package/src/Library.tsx +46 -51
- package/src/Licenses.tsx +27 -11
- package/src/MainDrawerParts.tsx +60 -0
- package/src/MainMenu.tsx +136 -0
- package/src/MarkdownEditor.tsx +175 -32
- package/src/Media.tsx +69 -16
- package/src/MediaTags.tsx +91 -0
- package/src/ModalSheetSample.tsx +47 -0
- package/src/NavigationParts.tsx +67 -21
- package/src/NavigationRestParts.tsx +1 -1
- package/src/Parts.tsx +71 -0
- package/src/PartsShown.tsx +1 -1
- package/src/PickerParts.tsx +2 -2
- package/src/Redirects.tsx +3 -2
- package/src/Screen.tsx +93 -90
- package/src/SelectionParts.tsx +22 -6
- package/src/SiteLogoLink.tsx +14 -0
- package/src/StartFab.tsx +22 -0
- package/src/StartStatus.tsx +1 -1
- package/src/autoTags.d.mts +28 -0
- package/src/autoTags.mjs +68 -0
- package/src/autoTags.test.mjs +109 -0
- package/src/buildSettings.test.mjs +20 -0
- package/src/buildSettings.ts +20 -0
- package/src/checkSite.ts +14 -1
- package/src/deploy.ts +7 -9
- package/src/editor.css +150 -17
- package/src/eyebrow.d.mts +5 -0
- package/src/eyebrow.mjs +53 -0
- package/src/eyebrowState.d.mts +21 -0
- package/src/eyebrowState.mjs +62 -0
- package/src/eyebrowState.test.mjs +78 -0
- package/src/fileRecords.d.mts +115 -0
- package/src/fileRecords.mjs +224 -0
- package/src/fileRecords.test.mjs +224 -0
- package/src/fileTagFilter.d.mts +30 -0
- package/src/fileTagFilter.mjs +44 -0
- package/src/fileTagFilter.test.mjs +57 -0
- package/src/fileTags.d.mts +56 -0
- package/src/fileTags.mjs +100 -0
- package/src/fileTags.test.mjs +127 -0
- package/src/firstHeading.d.mts +6 -0
- package/src/firstHeading.mjs +37 -0
- package/src/i18n/da-DK/advanced.ts +27 -12
- package/src/i18n/da-DK/app.ts +9 -7
- package/src/i18n/da-DK/apps.ts +16 -16
- package/src/i18n/da-DK/blockSettings.ts +9 -9
- package/src/i18n/da-DK/blocks.ts +2 -2
- package/src/i18n/da-DK/check.ts +5 -2
- package/src/i18n/da-DK/cms.ts +14 -12
- package/src/i18n/da-DK/colors.ts +5 -5
- package/src/i18n/da-DK/common.ts +2 -2
- package/src/i18n/da-DK/company.ts +3 -3
- package/src/i18n/da-DK/consents.ts +6 -6
- package/src/i18n/da-DK/forms.ts +6 -6
- package/src/i18n/da-DK/history.ts +6 -6
- package/src/i18n/da-DK/keywords.ts +2 -2
- package/src/i18n/da-DK/library.ts +17 -15
- package/src/i18n/da-DK/licenses.ts +4 -4
- package/src/i18n/da-DK/media.ts +10 -4
- package/src/i18n/da-DK/parts.ts +62 -25
- package/src/i18n/da-DK/preview.ts +5 -6
- package/src/i18n/da-DK/redirects.ts +7 -7
- package/src/i18n/da-DK/seo.ts +1 -1
- package/src/i18n/da-DK/text.ts +2 -0
- package/src/i18n/da-DK/theme.ts +5 -5
- package/src/i18n/en-US/advanced.ts +34 -18
- package/src/i18n/en-US/app.ts +7 -5
- package/src/i18n/en-US/apps.ts +9 -9
- package/src/i18n/en-US/blockSettings.ts +4 -4
- package/src/i18n/en-US/blocks.ts +6 -6
- package/src/i18n/en-US/check.ts +6 -3
- package/src/i18n/en-US/cms.ts +15 -14
- package/src/i18n/en-US/colors.ts +18 -18
- package/src/i18n/en-US/common.ts +3 -3
- package/src/i18n/en-US/consents.ts +4 -4
- package/src/i18n/en-US/forms.ts +5 -5
- package/src/i18n/en-US/history.ts +2 -2
- package/src/i18n/en-US/library.ts +21 -15
- package/src/i18n/en-US/licenses.ts +6 -6
- package/src/i18n/en-US/media.ts +7 -1
- package/src/i18n/en-US/parts.ts +60 -21
- package/src/i18n/en-US/preview.ts +5 -6
- package/src/i18n/en-US/redirects.ts +3 -3
- package/src/i18n/en-US/seo.ts +1 -1
- package/src/i18n/en-US/text.ts +3 -0
- package/src/i18n/en-US/theme.ts +6 -6
- package/src/icon.tsx +90 -27
- package/src/licenseData.test.mjs +28 -0
- package/src/licenseData.ts +12 -1
- package/src/markdown.d.mts +2 -0
- package/src/markdown.mjs +73 -5
- package/src/markdown.test.mjs +74 -0
- package/src/materialIcons.ts +8 -0
- package/src/menuChildren.ts +36 -0
- package/src/menuOpen.ts +34 -0
- package/src/pagePreview.tsx +23 -19
- package/src/r2Caching.ts +14 -0
- package/src/sectionFrame.ts +39 -0
- package/src/sectionState.d.mts +19 -0
- package/src/sectionState.mjs +31 -0
- package/src/sectionState.test.mjs +59 -0
- package/src/sections.d.mts +9 -7
- package/src/sections.mjs +74 -27
- package/src/sections.test.mjs +59 -0
- package/src/sidebar.ts +2 -2
- package/src/site.ts +27 -17
- package/src/stillCursor.d.mts +8 -0
- package/src/stillCursor.mjs +19 -0
- package/src/stillCursor.test.mjs +26 -0
- package/src/tagUses.d.mts +47 -0
- package/src/tagUses.mjs +121 -0
- package/src/tagUses.test.mjs +141 -0
- package/src/themeUi.ts +10 -0
- package/src/topBarSlot.tsx +37 -0
- package/src/ui.tsx +654 -150
- package/src/virtual.d.ts +5 -0
- package/starter/README.md +2 -1
- package/starter/package.json +2 -1
- package/starter/wrangler.jsonc +3 -2
- package/theme/blocks/cards/LinkCards.tsx +2 -1
- package/theme/blocks/hero/View.tsx +2 -1
- package/theme/blocks/video/View.tsx +2 -1
- package/theme/components/BlogIndex.astro +2 -2
- package/theme/components/BlogPosts.astro +1 -1
- package/theme/components/BlogPosts.tsx +9 -6
- package/theme/components/Container.astro +1 -1
- package/theme/components/CookieConsent.astro +1 -1
- package/theme/components/EndBlock.astro +1 -1
- package/theme/components/Footer.astro +5 -5
- package/theme/components/Header.astro +3 -3
- package/theme/components/Icon.astro +2 -2
- package/theme/components/MobileMenu.tsx +72 -61
- package/theme/components/MobileNav.astro +2 -2
- package/theme/components/PageHeader.astro +2 -2
- package/theme/components/PageSection.astro +1 -1
- package/theme/components/PopupButton.tsx +2 -2
- package/theme/components/PopupView.tsx +2 -2
- package/theme/components/PostList.tsx +7 -3
- package/theme/components/RichText.astro +22 -7
- package/theme/components/Section.astro +17 -10
- package/theme/components/SectionHeading.tsx +1 -1
- package/theme/components/home/PageBlock.astro +4 -4
- package/theme/components/home/Text.astro +3 -3
- package/theme/layouts/PageLayout.astro +3 -3
- package/theme/layouts/PostLayout.astro +9 -8
- package/theme/styles/base.css +13 -3
- package/theme/styles/blocks.css +97 -10
- package/theme/styles/components.css +9 -9
- package/theme/styles/elevation.test.mjs +168 -0
- package/theme/styles/global.css +65 -59
- package/theme/styles/ui.css +460 -131
- package/theme/templates/Home.astro +1 -1
- package/theme/templates/New.astro +5 -5
- package/theme/templates/NotFound.astro +2 -2
- package/theme/ui/BottomSheet.tsx +118 -21
- package/theme/ui/BottomSheetResizeIcon.tsx +13 -0
- package/theme/ui/Button.tsx +4 -3
- package/theme/ui/Dialog.tsx +1 -1
- package/theme/ui/FabMenu.tsx +13 -12
- package/theme/ui/LoadingIndicator.tsx +1 -1
- package/theme/ui/NavigationDrawer.tsx +116 -15
- package/theme/ui/NavigationRail.tsx +22 -13
- package/theme/ui/Search.tsx +1 -1
- package/theme/ui/SettingRow.tsx +31 -0
- package/theme/ui/Switch.tsx +11 -11
- package/theme/ui/TextField.tsx +17 -6
- package/theme/ui/bottomSheet.script.ts +3 -2
- package/theme/ui/bottomSheetControl.ts +131 -46
- package/theme/ui/fabMenu.script.ts +69 -53
- package/theme/ui/modalSheetSize.ts +214 -0
- package/theme/ui/navigationDrawerControl.ts +35 -0
- package/theme/ui/search.script.ts +4 -2
- package/worker/index.js +3 -0
- package/worker/plan-status.js +46 -0
- package/worker/push.js +7 -5
- package/worker/r2-status.js +2 -1
- package/icons/lucide/desktop.svg +0 -1
- package/icons/material-symbols/desktop.svg +0 -1
- package/icons/phosphor/desktop.svg +0 -1
package/theme/styles/global.css
CHANGED
|
@@ -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 (
|
|
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 (
|
|
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 >=
|
|
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 (
|
|
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 <
|
|
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
|
|
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(--
|
|
1162
|
+
background: var(--secondary-container);
|
|
1152
1163
|
}
|
|
1153
1164
|
.navigation-drawer-row[data-active] > .navigation-drawer-item {
|
|
1154
|
-
color: var(--
|
|
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(--
|
|
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(--
|
|
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(--
|
|
1193
|
-
color: var(--
|
|
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 <
|
|
1301
|
+
@media (width < theme(--breakpoint-medium)) {
|
|
1296
1302
|
body:has(.theme-action-bar):has(.md-footer) {
|
|
1297
1303
|
padding-bottom: 0;
|
|
1298
1304
|
}
|