material-plus-ui 1.6.0 → 1.8.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/LICENSE +1 -1
- package/README.md +20 -14
- package/dist/components/accordion/MPAccordion.d.ts +21 -1
- package/dist/components/accordion/MPAccordion.js +1 -1
- package/dist/components/alert/MPAlert.d.ts +34 -3
- package/dist/components/alert/MPAlert.js +1 -1
- package/dist/components/anchor/MPAnchor.d.ts +107 -0
- package/dist/components/anchor/MPAnchor.js +2 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/animate-appear/MPAnimateAppear.d.ts +2 -2
- package/dist/components/animate-appear/MPAnimateAppear.js +1 -1
- package/dist/components/animate-blink/MPAnimateBlink.d.ts +2 -2
- package/dist/components/animate-blink/MPAnimateBlink.js +2 -1
- package/dist/components/animate-counter/MPAnimateCounter.d.ts +67 -0
- package/dist/components/animate-counter/MPAnimateCounter.js +2 -0
- package/dist/components/animate-counter/index.d.ts +2 -0
- package/dist/components/animate-counter/index.js +1 -0
- package/dist/components/animate-fade/MPAnimateFade.d.ts +2 -2
- package/dist/components/animate-fade/MPAnimateFade.js +2 -1
- package/dist/components/animate-float/MPAnimateFloat.d.ts +53 -0
- package/dist/components/animate-float/MPAnimateFloat.js +2 -0
- package/dist/components/animate-float/index.d.ts +2 -0
- package/dist/components/animate-float/index.js +1 -0
- package/dist/components/animate-grow/MPAnimateGrow.d.ts +2 -2
- package/dist/components/animate-grow/MPAnimateGrow.js +2 -1
- package/dist/components/animate-lighting/MPAnimateLighting.js +1 -0
- package/dist/components/animate-reveal/MPAnimateReveal.d.ts +64 -0
- package/dist/components/animate-reveal/MPAnimateReveal.js +2 -0
- package/dist/components/animate-reveal/index.d.ts +2 -0
- package/dist/components/animate-reveal/index.js +1 -0
- package/dist/components/animate-rotate/MPAnimateRotate.d.ts +2 -2
- package/dist/components/animate-rotate/MPAnimateRotate.js +2 -1
- package/dist/components/animate-scramble/MPAnimateScramble.d.ts +65 -0
- package/dist/components/animate-scramble/MPAnimateScramble.js +2 -0
- package/dist/components/animate-scramble/index.d.ts +2 -0
- package/dist/components/animate-scramble/index.js +1 -0
- package/dist/components/animate-shake/MPAnimateShake.d.ts +65 -0
- package/dist/components/animate-shake/MPAnimateShake.js +2 -0
- package/dist/components/animate-shake/index.d.ts +2 -0
- package/dist/components/animate-shake/index.js +1 -0
- package/dist/components/animate-slide/MPAnimateSlide.d.ts +2 -2
- package/dist/components/animate-slide/MPAnimateSlide.js +2 -1
- package/dist/components/animate-split/MPAnimateSplit.d.ts +56 -0
- package/dist/components/animate-split/MPAnimateSplit.js +2 -0
- package/dist/components/animate-split/index.d.ts +2 -0
- package/dist/components/animate-split/index.js +1 -0
- package/dist/components/animate-typing/MPAnimateTyping.js +1 -1
- package/dist/components/animate-zoom/MPAnimateZoom.d.ts +2 -2
- package/dist/components/animate-zoom/MPAnimateZoom.js +2 -1
- package/dist/components/app-logo/MPAppLogo.d.ts +171 -0
- package/dist/components/app-logo/MPAppLogo.js +2 -0
- package/dist/components/app-logo/index.d.ts +2 -0
- package/dist/components/app-logo/index.js +1 -0
- package/dist/components/area-chart/MPAreaChart.d.ts +79 -0
- package/dist/components/area-chart/MPAreaChart.js +2 -0
- package/dist/components/area-chart/index.d.ts +2 -0
- package/dist/components/area-chart/index.js +1 -0
- package/dist/components/aspect-ratio/MPAspectRatio.d.ts +1 -1
- package/dist/components/aspect-ratio/MPAspectRatio.js +2 -1
- package/dist/components/avatar/MPAvatar.d.ts +10 -1
- package/dist/components/avatar/MPAvatar.js +1 -1
- package/dist/components/bar-chart/MPBarChart.d.ts +74 -0
- package/dist/components/bar-chart/MPBarChart.js +2 -0
- package/dist/components/bar-chart/index.d.ts +2 -0
- package/dist/components/bar-chart/index.js +1 -0
- package/dist/components/blockquote/MPBlockquote.d.ts +18 -1
- package/dist/components/blockquote/MPBlockquote.js +1 -1
- package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +2 -18
- package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
- package/dist/components/box/MPBox.d.ts +43 -8
- package/dist/components/box/MPBox.js +2 -1
- package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
- package/dist/components/button/MPButton.js +1 -1
- package/dist/components/calendar/MPCalendar.js +1 -1
- package/dist/components/card/MPCard.js +1 -1
- package/dist/components/carousel/MPCarousel.js +1 -1
- package/dist/components/checkbox/MPCheckbox.js +1 -1
- package/dist/components/chip/MPChip.d.ts +11 -2
- package/dist/components/chip/MPChip.js +1 -1
- package/dist/components/code-block/MPCodeBlock.d.ts +177 -0
- package/dist/components/code-block/MPCodeBlock.js +2 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/collapsible/MPCollapsible.d.ts +12 -1
- package/dist/components/collapsible/MPCollapsible.js +1 -1
- package/dist/components/color-picker/MPColorPicker.js +1 -1
- package/dist/components/combobox/MPCombobox.d.ts +21 -4
- package/dist/components/combobox/MPCombobox.js +1 -1
- package/dist/components/command-palette/MPCommandPalette.d.ts +12 -2
- package/dist/components/command-palette/MPCommandPalette.js +1 -1
- package/dist/components/config/MPConfigProvider.d.ts +49 -7
- package/dist/components/config/MPConfigProvider.js +1 -1
- package/dist/components/confirm/MPConfirmProvider.js +1 -1
- package/dist/components/container/MPContainer.d.ts +9 -2
- package/dist/components/container/MPContainer.js +2 -1
- package/dist/components/data-list/MPDataList.d.ts +82 -0
- package/dist/components/data-list/MPDataList.js +2 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.js +1 -0
- package/dist/components/data-table/MPDataTable.d.ts +314 -0
- package/dist/components/data-table/MPDataTable.js +2 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +1 -0
- package/dist/components/date-picker/MPDatePicker.js +1 -1
- package/dist/components/dialog/MPDialog.d.ts +10 -2
- package/dist/components/dialog/MPDialog.js +1 -1
- package/dist/components/drawer/MPDrawer.d.ts +8 -2
- package/dist/components/drawer/MPDrawer.js +1 -1
- package/dist/components/empty/MPEmpty.d.ts +10 -1
- package/dist/components/empty/MPEmpty.js +1 -1
- package/dist/components/fieldset/MPFieldset.js +1 -1
- package/dist/components/file-picker/MPFilePicker.js +1 -1
- package/dist/components/flex/MPFlex.d.ts +95 -0
- package/dist/components/flex/MPFlex.js +2 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.js +1 -0
- package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
- package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.d.ts +127 -0
- package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.js +2 -0
- package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
- package/dist/components/floating-bottom-navigation/index.js +1 -0
- package/dist/components/footer/MPFooter.d.ts +24 -4
- package/dist/components/footer/MPFooter.js +1 -1
- package/dist/components/form/MPForm.js +1 -1
- package/dist/components/gauge-chart/MPGaugeChart.d.ts +78 -0
- package/dist/components/gauge-chart/MPGaugeChart.js +2 -0
- package/dist/components/gauge-chart/index.d.ts +2 -0
- package/dist/components/gauge-chart/index.js +1 -0
- package/dist/components/grid/MPGrid.d.ts +25 -8
- package/dist/components/grid/MPGrid.js +1 -1
- package/dist/components/header/MPHeader.d.ts +26 -4
- package/dist/components/header/MPHeader.js +1 -1
- package/dist/components/heatmap-chart/MPHeatmapChart.d.ts +75 -0
- package/dist/components/heatmap-chart/MPHeatmapChart.js +2 -0
- package/dist/components/heatmap-chart/index.d.ts +2 -0
- package/dist/components/heatmap-chart/index.js +1 -0
- package/dist/components/hover-card/MPHoverCard.d.ts +101 -0
- package/dist/components/hover-card/MPHoverCard.js +2 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/icon/MPIcon.js +1 -1
- package/dist/components/image/MPImage.d.ts +122 -5
- package/dist/components/image/MPImage.js +1 -1
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/line-chart/MPLineChart.d.ts +66 -0
- package/dist/components/line-chart/MPLineChart.js +2 -0
- package/dist/components/line-chart/index.d.ts +2 -0
- package/dist/components/line-chart/index.js +1 -0
- package/dist/components/list/MPList.d.ts +23 -1
- package/dist/components/list/MPList.js +1 -1
- package/dist/components/menu/MPMenu.d.ts +1 -1
- package/dist/components/menu/MPMenu.js +1 -1
- package/dist/components/menubar/MPMenubar.js +1 -1
- package/dist/components/meter/MPMeter.d.ts +87 -0
- package/dist/components/meter/MPMeter.js +2 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/index.js +1 -0
- package/dist/components/mockup/MPMockup.d.ts +143 -0
- package/dist/components/mockup/MPMockup.js +2 -0
- package/dist/components/mockup/index.d.ts +2 -0
- package/dist/components/mockup/index.js +1 -0
- package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
- package/dist/components/number-field/MPNumberField.js +1 -1
- package/dist/components/pie-chart/MPPieChart.d.ts +77 -0
- package/dist/components/pie-chart/MPPieChart.js +2 -0
- package/dist/components/pie-chart/index.d.ts +2 -0
- package/dist/components/pie-chart/index.js +1 -0
- package/dist/components/pill/MPPill.js +1 -1
- package/dist/components/popconfirm/MPPopconfirm.d.ts +2 -2
- package/dist/components/popover/MPPopover.d.ts +1 -0
- package/dist/components/popover/MPPopover.js +1 -1
- package/dist/components/portal/MPPortal.d.ts +75 -0
- package/dist/components/portal/MPPortal.js +2 -0
- package/dist/components/portal/index.d.ts +2 -0
- package/dist/components/portal/index.js +1 -0
- package/dist/components/radio-group/MPRadioGroup.js +1 -1
- package/dist/components/rating/MPRating.js +1 -1
- package/dist/components/scatter-chart/MPScatterChart.d.ts +66 -0
- package/dist/components/scatter-chart/MPScatterChart.js +2 -0
- package/dist/components/scatter-chart/index.d.ts +2 -0
- package/dist/components/scatter-chart/index.js +1 -0
- package/dist/components/scroll-area/MPScrollArea.d.ts +82 -0
- package/dist/components/scroll-area/MPScrollArea.js +2 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-zone/MPScrollZone.d.ts +165 -0
- package/dist/components/scroll-zone/MPScrollZone.js +2 -0
- package/dist/components/scroll-zone/index.d.ts +2 -0
- package/dist/components/scroll-zone/index.js +1 -0
- package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
- package/dist/components/select/MPSelect.d.ts +27 -4
- package/dist/components/select/MPSelect.js +1 -1
- package/dist/components/show/MPShow.d.ts +78 -0
- package/dist/components/show/MPShow.js +2 -0
- package/dist/components/show/index.d.ts +2 -0
- package/dist/components/show/index.js +1 -0
- package/dist/components/sidebar/MPSidebar.d.ts +20 -1
- package/dist/components/sidebar/MPSidebar.js +1 -1
- package/dist/components/sparkline/MPSparkline.d.ts +85 -0
- package/dist/components/sparkline/MPSparkline.js +2 -0
- package/dist/components/sparkline/index.d.ts +2 -0
- package/dist/components/sparkline/index.js +1 -0
- package/dist/components/spoiler/MPSpoiler.d.ts +12 -0
- package/dist/components/spoiler/MPSpoiler.js +1 -1
- package/dist/components/stack/MPStack.d.ts +198 -0
- package/dist/components/stack/MPStack.js +2 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/statistic/MPStatistic.d.ts +104 -0
- package/dist/components/statistic/MPStatistic.js +2 -0
- package/dist/components/statistic/index.d.ts +2 -0
- package/dist/components/statistic/index.js +1 -0
- package/dist/components/stepper/MPStepper.js +1 -1
- package/dist/components/table/MPTable.d.ts +25 -3
- package/dist/components/table/MPTable.js +1 -1
- package/dist/components/tabs/MPTabs.d.ts +12 -0
- package/dist/components/tabs/MPTabs.js +1 -1
- package/dist/components/timeline/MPTimeline.js +1 -1
- package/dist/components/timeline-chart/MPTimelineChart.d.ts +63 -0
- package/dist/components/timeline-chart/MPTimelineChart.js +2 -0
- package/dist/components/timeline-chart/index.d.ts +2 -0
- package/dist/components/timeline-chart/index.js +1 -0
- package/dist/components/toggle/MPToggle.js +1 -1
- package/dist/components/toolbar/MPToolbar.d.ts +106 -0
- package/dist/components/toolbar/MPToolbar.js +2 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/tooltip/MPTooltip.js +1 -1
- package/dist/components/tour/MPTour.d.ts +120 -0
- package/dist/components/tour/MPTour.js +2 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/transfer/MPTransfer.js +1 -1
- package/dist/components/tree-select/MPTreeSelect.d.ts +113 -0
- package/dist/components/tree-select/MPTreeSelect.js +2 -0
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/index.js +1 -0
- package/dist/components/tree-view/MPTreeView.d.ts +153 -0
- package/dist/components/tree-view/MPTreeView.js +2 -0
- package/dist/components/tree-view/index.d.ts +2 -0
- package/dist/components/tree-view/index.js +1 -0
- package/dist/components/typography/MPTypography.d.ts +10 -1
- package/dist/components/typography/MPTypography.js +2 -1
- package/dist/constants/glyphs.d.ts +33 -31
- package/dist/constants/glyphs.js +1 -1
- package/dist/constants/icons.d.ts +32 -31
- package/dist/constants/icons.js +1 -1
- package/dist/hooks/index.d.ts +22 -5
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useMPColorScheme.js +1 -0
- package/dist/hooks/useMPDisclosure.d.ts +58 -0
- package/dist/hooks/useMPDisclosure.js +2 -0
- package/dist/hooks/useMPElementSize.d.ts +55 -0
- package/dist/hooks/useMPElementSize.js +2 -0
- package/dist/hooks/useMPMediaQuery.d.ts +40 -0
- package/dist/hooks/useMPMediaQuery.js +2 -0
- package/dist/hooks/useMPOnScreen.d.ts +58 -0
- package/dist/hooks/useMPOnScreen.js +2 -0
- package/dist/hooks/useMPReducedMotion.js +1 -0
- package/dist/hooks/useMPWindowClass.d.ts +7 -0
- package/dist/hooks/useMPWindowClass.js +1 -0
- package/dist/index.d.ts +35 -1
- package/dist/index.js +1 -1
- package/dist/internal/Calendar.js +1 -1
- package/dist/internal/ChartChrome.d.ts +199 -0
- package/dist/internal/ChartChrome.js +2 -0
- package/dist/internal/ChartFrame.d.ts +197 -0
- package/dist/internal/ChartFrame.js +2 -0
- package/dist/internal/FieldOutline.d.ts +14 -5
- package/dist/internal/FieldOutline.js +1 -1
- package/dist/internal/Picker.js +1 -1
- package/dist/internal/PopupArrow.d.ts +60 -0
- package/dist/internal/PopupArrow.js +2 -0
- package/dist/internal/SupportingText.d.ts +24 -0
- package/dist/internal/SupportingText.js +1 -1
- package/dist/internal/animate-core.d.ts +121 -0
- package/dist/internal/animate-core.js +1 -0
- package/dist/internal/animate.d.ts +75 -55
- package/dist/internal/animate.js +1 -1
- package/dist/internal/bottom-navigation.d.ts +58 -0
- package/dist/internal/bottom-navigation.js +2 -0
- package/dist/internal/chart.d.ts +461 -0
- package/dist/internal/chart.js +1 -0
- package/dist/internal/color-scheme.d.ts +0 -9
- package/dist/internal/color-scheme.js +1 -1
- package/dist/internal/config.d.ts +24 -5
- package/dist/internal/config.js +1 -1
- package/dist/internal/data-table.d.ts +195 -0
- package/dist/internal/data-table.js +1 -0
- package/dist/internal/date.d.ts +22 -18
- package/dist/internal/date.js +1 -1
- package/dist/internal/density.d.ts +9 -0
- package/dist/internal/density.js +1 -0
- package/dist/internal/elevation.d.ts +26 -0
- package/dist/internal/elevation.js +1 -0
- package/dist/internal/highlight.d.ts +96 -0
- package/dist/internal/highlight.js +1 -0
- package/dist/internal/i18n.d.ts +180 -0
- package/dist/internal/initials.d.ts +28 -0
- package/dist/internal/initials.js +1 -0
- package/dist/internal/intl.d.ts +64 -0
- package/dist/internal/intl.js +1 -0
- package/dist/internal/mark.d.ts +52 -0
- package/dist/internal/mark.js +1 -0
- package/dist/internal/measure.d.ts +31 -0
- package/dist/internal/measure.js +1 -0
- package/dist/internal/messages/anchor.d.ts +3 -0
- package/dist/internal/messages/anchor.js +1 -0
- package/dist/internal/messages/chart.d.ts +3 -0
- package/dist/internal/messages/chart.js +1 -0
- package/dist/internal/messages/code.d.ts +3 -0
- package/dist/internal/messages/code.js +1 -0
- package/dist/internal/messages/data-table.d.ts +3 -0
- package/dist/internal/messages/data-table.js +1 -0
- package/dist/internal/messages/scroll.d.ts +3 -0
- package/dist/internal/messages/scroll.js +1 -0
- package/dist/internal/messages/sparkline.d.ts +3 -0
- package/dist/internal/messages/sparkline.js +1 -0
- package/dist/internal/messages/tour.d.ts +3 -0
- package/dist/internal/messages/tour.js +1 -0
- package/dist/internal/messages/transfer.d.ts +1 -1
- package/dist/internal/messages/transfer.js +1 -1
- package/dist/internal/mockup.d.ts +174 -0
- package/dist/internal/mockup.js +2 -0
- package/dist/internal/page-layout.d.ts +24 -5
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/responsive.d.ts +55 -0
- package/dist/internal/responsive.js +1 -0
- package/dist/internal/scale.d.ts +0 -17
- package/dist/internal/scale.js +1 -1
- package/dist/internal/step.d.ts +15 -0
- package/dist/internal/step.js +1 -1
- package/dist/internal/table.d.ts +53 -0
- package/dist/internal/table.js +1 -0
- package/dist/internal/text.d.ts +57 -0
- package/dist/internal/text.js +1 -0
- package/dist/internal/threshold.d.ts +19 -0
- package/dist/internal/threshold.js +1 -0
- package/dist/internal/time-scale.d.ts +44 -0
- package/dist/internal/time-scale.js +1 -0
- package/dist/internal/transition.d.ts +33 -0
- package/dist/internal/transition.js +1 -0
- package/dist/internal/visibility.d.ts +48 -0
- package/dist/internal/visibility.js +1 -0
- package/dist/internal/window-class.d.ts +29 -2
- package/dist/internal/window-class.js +1 -1
- package/dist/locales/ar.js +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/id.js +1 -1
- package/dist/locales/it.js +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/nl.js +1 -1
- package/dist/locales/pl.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/th.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/vi.js +1 -1
- package/dist/locales/zh-hans.js +1 -1
- package/dist/locales/zh-hant.js +1 -1
- package/dist/styles/accordion.css +1 -1
- package/dist/styles/alert.css +1 -1
- package/dist/styles/anchor.css +2 -0
- package/dist/styles/animate-appear.css +1 -1
- package/dist/styles/animate-blink.css +1 -1
- package/dist/styles/animate-counter.css +2 -0
- package/dist/styles/animate-fade.css +1 -1
- package/dist/styles/animate-float.css +2 -0
- package/dist/styles/animate-grow.css +1 -1
- package/dist/styles/animate-headline.css +1 -1
- package/dist/styles/animate-lighting.css +1 -1
- package/dist/styles/animate-marquee.css +1 -1
- package/dist/styles/animate-reveal.css +2 -0
- package/dist/styles/animate-rotate.css +1 -1
- package/dist/styles/animate-scramble.css +2 -0
- package/dist/styles/animate-shake.css +2 -0
- package/dist/styles/animate-slide.css +1 -1
- package/dist/styles/animate-split.css +2 -0
- package/dist/styles/animate-typing.css +1 -1
- package/dist/styles/animate-zoom.css +1 -1
- package/dist/styles/app-logo.css +2 -0
- package/dist/styles/area-chart.css +2 -0
- package/dist/styles/aspect-ratio.css +1 -1
- package/dist/styles/avatar.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/bar-chart.css +2 -0
- package/dist/styles/blockquote.css +1 -1
- package/dist/styles/bottom-navigation.css +1 -1
- package/dist/styles/box.css +1 -1
- package/dist/styles/breadcrumb.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/chat-bubble.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chip.css +1 -1
- package/dist/styles/code-block.css +2 -0
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +1 -1
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/config.css +1 -1
- package/dist/styles/confirm.css +1 -1
- package/dist/styles/container.css +1 -1
- package/dist/styles/data-list.css +2 -0
- package/dist/styles/data-table.css +2 -0
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/date-time-picker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/empty.css +1 -1
- package/dist/styles/fieldset.css +1 -1
- package/dist/styles/file-picker.css +1 -1
- package/dist/styles/flex.css +2 -0
- package/dist/styles/floating-action-button.css +1 -1
- package/dist/styles/floating-bottom-navigation.css +2 -0
- package/dist/styles/footer.css +1 -1
- package/dist/styles/form.css +1 -1
- package/dist/styles/gauge-chart.css +2 -0
- package/dist/styles/grid.css +1 -1
- package/dist/styles/header.css +1 -1
- package/dist/styles/heatmap-chart.css +2 -0
- package/dist/styles/highlight.css +1 -1
- package/dist/styles/hover-card.css +2 -0
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/icon.css +1 -1
- package/dist/styles/image.css +1 -1
- package/dist/styles/line-chart.css +2 -0
- package/dist/styles/list.css +1 -1
- package/dist/styles/locale.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/meter.css +2 -0
- package/dist/styles/mockup.css +2 -0
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-field.css +1 -1
- package/dist/styles/overlay.css +1 -1
- package/dist/styles/page-layout.css +1 -1
- package/dist/styles/pagination.css +1 -1
- package/dist/styles/pie-chart.css +2 -0
- package/dist/styles/pill.css +1 -1
- package/dist/styles/popconfirm.css +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/portal.css +2 -0
- package/dist/styles/progress-box.css +1 -1
- package/dist/styles/progress-circular.css +1 -1
- package/dist/styles/progress-linear.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/scatter-chart.css +2 -0
- package/dist/styles/scroll-area.css +2 -0
- package/dist/styles/scroll-zone.css +2 -0
- package/dist/styles/segmented-button.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/show.css +2 -0
- package/dist/styles/sidebar.css +1 -1
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/sparkline.css +2 -0
- package/dist/styles/spoiler.css +1 -1
- package/dist/styles/stack.css +2 -0
- package/dist/styles/statistic.css +2 -0
- package/dist/styles/stepper.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/text-link.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/timeline-chart.css +2 -0
- package/dist/styles/timeline.css +1 -1
- package/dist/styles/toggle.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/styles/toolbar.css +2 -0
- package/dist/styles/tour.css +2 -0
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/tree-select.css +2 -0
- package/dist/styles/tree-view.css +2 -0
- package/dist/styles/typography.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +2606 -185
- package/dist/types.d.ts +566 -5
- package/package.json +26 -25
- package/.fix.py +0 -92
- package/dist/components/avatar-group/MPAvatarGroup.d.ts +0 -74
- package/dist/components/avatar-group/MPAvatarGroup.js +0 -2
- package/dist/components/avatar-group/index.d.ts +0 -2
- package/dist/components/avatar-group/index.js +0 -1
- package/dist/internal/avatar-group.d.ts +0 -22
- package/dist/internal/avatar-group.js +0 -2
- package/dist/styles/avatar-group.css +0 -2
package/dist/tailwind.css
CHANGED
|
@@ -262,6 +262,59 @@
|
|
|
262
262
|
--_mp-chroma-error: 0.1783;
|
|
263
263
|
--_mp-hue-error: 28.7;
|
|
264
264
|
|
|
265
|
+
/*
|
|
266
|
+
* The chart ramp's lightness, one stop per slot.
|
|
267
|
+
*
|
|
268
|
+
* Eight slots, and the *only* thing that changes between the two schemes is
|
|
269
|
+
* this list: the hues are the same eight in both, because a series that
|
|
270
|
+
* changed hue when the page went dark would be a series a reader has to
|
|
271
|
+
* learn twice.
|
|
272
|
+
*
|
|
273
|
+
* These are not the accent tones. A chart's job for colour is identity —
|
|
274
|
+
* telling one series from another — and MD3's accent stops are tuned for
|
|
275
|
+
* legibility of a *label on a fill*, which is a different question. Every
|
|
276
|
+
* number here was fitted rather than chosen: see the derivations below.
|
|
277
|
+
*/
|
|
278
|
+
--_mp-tone-chart-1: 0.56;
|
|
279
|
+
--_mp-tone-chart-2: 0.44;
|
|
280
|
+
--_mp-tone-chart-3: 0.62;
|
|
281
|
+
--_mp-tone-chart-4: 0.44;
|
|
282
|
+
--_mp-tone-chart-5: 0.62;
|
|
283
|
+
--_mp-tone-chart-6: 0.44;
|
|
284
|
+
--_mp-tone-chart-7: 0.62;
|
|
285
|
+
--_mp-tone-chart-8: 0.5;
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
* The sequential ramp, for a magnitude rather than an identity.
|
|
289
|
+
*
|
|
290
|
+
* One hue and five steps, because that is what a *quantity* wants. The eight
|
|
291
|
+
* slots above are an identity channel, and reading them as an order is the
|
|
292
|
+
* mistake this exists to prevent: nobody can say whether slot 6 is more than
|
|
293
|
+
* slot 3.
|
|
294
|
+
*
|
|
295
|
+
* The step nearest the surface decides where the ramp starts. It has to
|
|
296
|
+
* clear 2:1 against the page or the lowest cell of a heatmap is a hole
|
|
297
|
+
* rather than a reading, and that floor is what put the light end at 0.755
|
|
298
|
+
* rather than somewhere paler. The four checks are monotone lightness,
|
|
299
|
+
* adjacent steps at least 0.06 apart, that contrast, and one hue throughout;
|
|
300
|
+
* both schemes pass all four.
|
|
301
|
+
*
|
|
302
|
+
* The scheme flips the anchor rather than the hue. On a light page the ramp
|
|
303
|
+
* runs pale to deep and on a dark one deep to bright, because "more" is
|
|
304
|
+
* further from the page in both — a ramp that ran the same way in the dark
|
|
305
|
+
* would put its high end where the eye reads nothing.
|
|
306
|
+
*/
|
|
307
|
+
--_mp-tone-chart-scale-1: 0.755;
|
|
308
|
+
--_mp-tone-chart-scale-2: 0.68;
|
|
309
|
+
--_mp-tone-chart-scale-3: 0.605;
|
|
310
|
+
--_mp-tone-chart-scale-4: 0.53;
|
|
311
|
+
--_mp-tone-chart-scale-5: 0.45;
|
|
312
|
+
--_mp-chroma-chart-scale-1: 0.06;
|
|
313
|
+
--_mp-chroma-chart-scale-2: 0.085;
|
|
314
|
+
--_mp-chroma-chart-scale-3: 0.11;
|
|
315
|
+
--_mp-chroma-chart-scale-4: 0.13;
|
|
316
|
+
--_mp-chroma-chart-scale-5: 0.15;
|
|
317
|
+
|
|
265
318
|
/*
|
|
266
319
|
* The chroma a whole palette carries, as opposed to the chroma one role of it
|
|
267
320
|
* came out at. Deliberately *not* reassigned for the dark scheme below, and
|
|
@@ -271,13 +324,13 @@
|
|
|
271
324
|
* boundary take back whatever will not fit — which is why `primary` at tone 40
|
|
272
325
|
* is vivid and `primary-container` at tone 90 is a pale wash, from one number.
|
|
273
326
|
* The container and `on-` roles are written the same way: the palette's chroma
|
|
274
|
-
* goes in unmodified and the
|
|
275
|
-
*
|
|
327
|
+
* goes in unmodified, and the roles themselves take back what sRGB cannot
|
|
328
|
+
* show — see "Inside sRGB" on the roles below. The browser does not: it clips
|
|
329
|
+
* each channel on its own, which moves the hue and the lightness with it.
|
|
276
330
|
*
|
|
277
|
-
* Fed the baseline source, that lands the
|
|
278
|
-
* within 0.
|
|
279
|
-
*
|
|
280
|
-
* and the error palette is the only one saturated enough to notice.
|
|
331
|
+
* Fed the baseline source, that lands the eighteen container and `on-` roles
|
|
332
|
+
* of the three accent families within a ΔE of 0.02 of MD3's own, and
|
|
333
|
+
* `on-primary`, `on-secondary` and `on-tertiary` exactly on its white.
|
|
281
334
|
*
|
|
282
335
|
* `error` is an absolute chroma rather than a multiplier, because it is not
|
|
283
336
|
* derived from the source colour at all.
|
|
@@ -333,6 +386,32 @@
|
|
|
333
386
|
--_mp-tone-error: 0.834;
|
|
334
387
|
--_mp-chroma-error: 0.0677;
|
|
335
388
|
--_mp-hue-error: 22;
|
|
389
|
+
|
|
390
|
+
/* The chart ramp again — see the light block. The hues do not move; only
|
|
391
|
+
these do, because a dark surface needs the marks lighter to clear 3:1. */
|
|
392
|
+
--_mp-tone-chart-1: 0.56;
|
|
393
|
+
--_mp-tone-chart-2: 0.6;
|
|
394
|
+
--_mp-tone-chart-3: 0.64;
|
|
395
|
+
--_mp-tone-chart-4: 0.64;
|
|
396
|
+
--_mp-tone-chart-5: 0.56;
|
|
397
|
+
--_mp-tone-chart-6: 0.64;
|
|
398
|
+
--_mp-tone-chart-7: 0.64;
|
|
399
|
+
--_mp-tone-chart-8: 0.64;
|
|
400
|
+
|
|
401
|
+
/* The anchor flips: deep to bright, so "more" is still further from the
|
|
402
|
+
page. The low end sits at 0.405 for the same 2:1 reason the light one
|
|
403
|
+
sits at 0.755, measured against this scheme's surface rather than the
|
|
404
|
+
other's. */
|
|
405
|
+
--_mp-tone-chart-scale-1: 0.405;
|
|
406
|
+
--_mp-tone-chart-scale-2: 0.49;
|
|
407
|
+
--_mp-tone-chart-scale-3: 0.575;
|
|
408
|
+
--_mp-tone-chart-scale-4: 0.66;
|
|
409
|
+
--_mp-tone-chart-scale-5: 0.745;
|
|
410
|
+
--_mp-chroma-chart-scale-1: 0.06;
|
|
411
|
+
--_mp-chroma-chart-scale-2: 0.09;
|
|
412
|
+
--_mp-chroma-chart-scale-3: 0.115;
|
|
413
|
+
--_mp-chroma-chart-scale-4: 0.135;
|
|
414
|
+
--_mp-chroma-chart-scale-5: 0.15;
|
|
336
415
|
}
|
|
337
416
|
}
|
|
338
417
|
|
|
@@ -373,6 +452,28 @@
|
|
|
373
452
|
--_mp-tone-error: 0.834;
|
|
374
453
|
--_mp-chroma-error: 0.0677;
|
|
375
454
|
--_mp-hue-error: 22;
|
|
455
|
+
|
|
456
|
+
/* The chart ramp again — see the light block. */
|
|
457
|
+
--_mp-tone-chart-1: 0.56;
|
|
458
|
+
--_mp-tone-chart-2: 0.6;
|
|
459
|
+
--_mp-tone-chart-3: 0.64;
|
|
460
|
+
--_mp-tone-chart-4: 0.64;
|
|
461
|
+
--_mp-tone-chart-5: 0.56;
|
|
462
|
+
--_mp-tone-chart-6: 0.64;
|
|
463
|
+
--_mp-tone-chart-7: 0.64;
|
|
464
|
+
--_mp-tone-chart-8: 0.64;
|
|
465
|
+
|
|
466
|
+
/* The dark scheme's ramp again, for a region forced dark. */
|
|
467
|
+
--_mp-tone-chart-scale-1: 0.405;
|
|
468
|
+
--_mp-tone-chart-scale-2: 0.49;
|
|
469
|
+
--_mp-tone-chart-scale-3: 0.575;
|
|
470
|
+
--_mp-tone-chart-scale-4: 0.66;
|
|
471
|
+
--_mp-tone-chart-scale-5: 0.745;
|
|
472
|
+
--_mp-chroma-chart-scale-1: 0.06;
|
|
473
|
+
--_mp-chroma-chart-scale-2: 0.09;
|
|
474
|
+
--_mp-chroma-chart-scale-3: 0.115;
|
|
475
|
+
--_mp-chroma-chart-scale-4: 0.135;
|
|
476
|
+
--_mp-chroma-chart-scale-5: 0.15;
|
|
376
477
|
}
|
|
377
478
|
|
|
378
479
|
/*
|
|
@@ -390,17 +491,127 @@
|
|
|
390
491
|
*
|
|
391
492
|
* `oklch(from … h)` keeps the source colour's hue and replaces lightness and
|
|
392
493
|
* chroma. See the note above for why this is on `*` rather than `:root`.
|
|
494
|
+
*
|
|
495
|
+
* ## Inside sRGB
|
|
496
|
+
*
|
|
497
|
+
* A palette's chroma is too much for the ends of its own ramp. At the tone of
|
|
498
|
+
* `on-primary` there is no chroma left inside sRGB at all, and at the tone of
|
|
499
|
+
* a container there is a fraction of it. A browser handed such a colour does
|
|
500
|
+
* not bring it in at constant lightness and hue, which is what CSS Color 4
|
|
501
|
+
* describes: it clips each channel on its own. Measured in Chromium, Firefox
|
|
502
|
+
* and WebKit alike, the default `on-primary` came out `#b8ffff` instead of
|
|
503
|
+
* white, its container a saturated cyan, and `error-container` a salmon at a
|
|
504
|
+
* ΔE of 0.1 from MD3's.
|
|
505
|
+
*
|
|
506
|
+
* So the accent and error roles bring the colour in themselves, written as
|
|
507
|
+
* nested relative colours. The innermost converts the role to linear sRGB
|
|
508
|
+
* and works out, for each channel, how far along the straight line from the
|
|
509
|
+
* grey of the same lightness the colour can go before that channel leaves
|
|
510
|
+
* [0, 1]; the smallest of the three is carried in the alpha channel. The
|
|
511
|
+
* next scales the colour's OKLab chroma by that factor, which keeps its
|
|
512
|
+
* lightness and hue exactly and lands it at or near the edge of sRGB. The
|
|
513
|
+
* last two repeat the measurement on that colour and move whatever still
|
|
514
|
+
* does not fit along the line in linear light, then set the alpha back to 1.
|
|
515
|
+
* A colour already inside sRGB comes out unchanged, because every channel
|
|
516
|
+
* then allows the whole line.
|
|
517
|
+
*
|
|
518
|
+
* The factor comes from a line in linear light rather than from the curved
|
|
519
|
+
* edge of the gamut, so the result is near an exact chroma reduction rather
|
|
520
|
+
* than on it. For the default source the worst role is a ΔE of 0.004 from
|
|
521
|
+
* that colour, where clipping each channel was 0.084 off. Across every hue
|
|
522
|
+
* at the same saturation the worst is 0.009 against 0.122, and at the
|
|
523
|
+
* saturation of the most vivid sRGB sources 0.099 against 0.299. An
|
|
524
|
+
* estimate can also stop short of the edge: a pure `#0000ff` source comes
|
|
525
|
+
* out 0.072 away, where the linear line alone gave 0.053. The `0.0000001`
|
|
526
|
+
* keeps a channel that sits exactly on the grey from dividing zero by zero.
|
|
527
|
+
*
|
|
528
|
+
* The neutral roles carry too little chroma to leave sRGB, and stay as they
|
|
529
|
+
* are. The one exception is the light `surface` near a hue of 270°, which
|
|
530
|
+
* passes the edge by less than 4% of one channel.
|
|
393
531
|
*/
|
|
394
532
|
*,
|
|
395
533
|
::before,
|
|
396
534
|
::after,
|
|
397
535
|
::backdrop {
|
|
536
|
+
/*
|
|
537
|
+
* The grey each accent tone sits on, in linear light: an OKLCh lightness
|
|
538
|
+
* with no chroma is the same value in all three sRGB channels, and that
|
|
539
|
+
* value is the lightness cubed. The roles below pull a colour towards it
|
|
540
|
+
* when the colour will not fit sRGB — see "Inside sRGB" above.
|
|
541
|
+
*/
|
|
542
|
+
--_mp-grey-accent: calc(
|
|
543
|
+
var(--_mp-tone-accent) * var(--_mp-tone-accent) * var(--_mp-tone-accent)
|
|
544
|
+
);
|
|
545
|
+
--_mp-grey-on-accent: calc(
|
|
546
|
+
var(--_mp-tone-on-accent) * var(--_mp-tone-on-accent) * var(--_mp-tone-on-accent)
|
|
547
|
+
);
|
|
548
|
+
--_mp-grey-accent-container: calc(
|
|
549
|
+
var(--_mp-tone-accent-container) * var(--_mp-tone-accent-container) *
|
|
550
|
+
var(--_mp-tone-accent-container)
|
|
551
|
+
);
|
|
552
|
+
--_mp-grey-on-accent-container: calc(
|
|
553
|
+
var(--_mp-tone-on-accent-container) * var(--_mp-tone-on-accent-container) *
|
|
554
|
+
var(--_mp-tone-on-accent-container)
|
|
555
|
+
);
|
|
556
|
+
--_mp-grey-inverse-accent: calc(
|
|
557
|
+
var(--_mp-tone-inverse-accent) * var(--_mp-tone-inverse-accent) *
|
|
558
|
+
var(--_mp-tone-inverse-accent)
|
|
559
|
+
);
|
|
560
|
+
--_mp-grey-error: calc(var(--_mp-tone-error) * var(--_mp-tone-error) * var(--_mp-tone-error));
|
|
561
|
+
|
|
398
562
|
--_mp-color-primary: var(
|
|
399
563
|
--mp-sys-color-primary,
|
|
400
564
|
var(
|
|
401
565
|
--md-sys-color-primary,
|
|
402
|
-
|
|
403
|
-
from
|
|
566
|
+
color(
|
|
567
|
+
from
|
|
568
|
+
color(
|
|
569
|
+
from
|
|
570
|
+
oklab(
|
|
571
|
+
from
|
|
572
|
+
color(
|
|
573
|
+
from
|
|
574
|
+
oklch(
|
|
575
|
+
from var(--mp-source-color) var(--_mp-tone-accent)
|
|
576
|
+
calc(c * var(--_mp-chroma-primary)) h
|
|
577
|
+
)
|
|
578
|
+
srgb-linear r g b /
|
|
579
|
+
min(
|
|
580
|
+
calc(
|
|
581
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
582
|
+
(r - var(--_mp-grey-accent) + 0.0000001)
|
|
583
|
+
),
|
|
584
|
+
calc(
|
|
585
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
586
|
+
(g - var(--_mp-grey-accent) + 0.0000001)
|
|
587
|
+
),
|
|
588
|
+
calc(
|
|
589
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
590
|
+
(b - var(--_mp-grey-accent) + 0.0000001)
|
|
591
|
+
)
|
|
592
|
+
)
|
|
593
|
+
)
|
|
594
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
595
|
+
)
|
|
596
|
+
srgb-linear r g b /
|
|
597
|
+
min(
|
|
598
|
+
calc(
|
|
599
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
600
|
+
(r - var(--_mp-grey-accent) + 0.0000001)
|
|
601
|
+
),
|
|
602
|
+
calc(
|
|
603
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
604
|
+
(g - var(--_mp-grey-accent) + 0.0000001)
|
|
605
|
+
),
|
|
606
|
+
calc(
|
|
607
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
608
|
+
(b - var(--_mp-grey-accent) + 0.0000001)
|
|
609
|
+
)
|
|
610
|
+
)
|
|
611
|
+
)
|
|
612
|
+
srgb-linear calc(var(--_mp-grey-accent) + alpha * (r - var(--_mp-grey-accent)))
|
|
613
|
+
calc(var(--_mp-grey-accent) + alpha * (g - var(--_mp-grey-accent)))
|
|
614
|
+
calc(var(--_mp-grey-accent) + alpha * (b - var(--_mp-grey-accent))) / 1
|
|
404
615
|
)
|
|
405
616
|
)
|
|
406
617
|
);
|
|
@@ -408,9 +619,55 @@
|
|
|
408
619
|
--mp-sys-color-on-primary,
|
|
409
620
|
var(
|
|
410
621
|
--md-sys-color-on-primary,
|
|
411
|
-
|
|
412
|
-
from
|
|
413
|
-
|
|
622
|
+
color(
|
|
623
|
+
from
|
|
624
|
+
color(
|
|
625
|
+
from
|
|
626
|
+
oklab(
|
|
627
|
+
from
|
|
628
|
+
color(
|
|
629
|
+
from
|
|
630
|
+
oklch(
|
|
631
|
+
from var(--mp-source-color) var(--_mp-tone-on-accent)
|
|
632
|
+
calc(c * var(--_mp-palette-primary)) h
|
|
633
|
+
)
|
|
634
|
+
srgb-linear r g b /
|
|
635
|
+
min(
|
|
636
|
+
calc(
|
|
637
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
638
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
639
|
+
),
|
|
640
|
+
calc(
|
|
641
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
642
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
643
|
+
),
|
|
644
|
+
calc(
|
|
645
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
646
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
647
|
+
)
|
|
648
|
+
)
|
|
649
|
+
)
|
|
650
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
651
|
+
)
|
|
652
|
+
srgb-linear r g b /
|
|
653
|
+
min(
|
|
654
|
+
calc(
|
|
655
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
656
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
657
|
+
),
|
|
658
|
+
calc(
|
|
659
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
660
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
661
|
+
),
|
|
662
|
+
calc(
|
|
663
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
664
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
665
|
+
)
|
|
666
|
+
)
|
|
667
|
+
)
|
|
668
|
+
srgb-linear calc(var(--_mp-grey-on-accent) + alpha * (r - var(--_mp-grey-on-accent)))
|
|
669
|
+
calc(var(--_mp-grey-on-accent) + alpha * (g - var(--_mp-grey-on-accent)))
|
|
670
|
+
calc(var(--_mp-grey-on-accent) + alpha * (b - var(--_mp-grey-on-accent))) / 1
|
|
414
671
|
)
|
|
415
672
|
)
|
|
416
673
|
);
|
|
@@ -418,9 +675,59 @@
|
|
|
418
675
|
--mp-sys-color-primary-container,
|
|
419
676
|
var(
|
|
420
677
|
--md-sys-color-primary-container,
|
|
421
|
-
|
|
422
|
-
from
|
|
423
|
-
|
|
678
|
+
color(
|
|
679
|
+
from
|
|
680
|
+
color(
|
|
681
|
+
from
|
|
682
|
+
oklab(
|
|
683
|
+
from
|
|
684
|
+
color(
|
|
685
|
+
from
|
|
686
|
+
oklch(
|
|
687
|
+
from var(--mp-source-color) var(--_mp-tone-accent-container)
|
|
688
|
+
calc(c * var(--_mp-palette-primary)) h
|
|
689
|
+
)
|
|
690
|
+
srgb-linear r g b /
|
|
691
|
+
min(
|
|
692
|
+
calc(
|
|
693
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
694
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
695
|
+
),
|
|
696
|
+
calc(
|
|
697
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
698
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
699
|
+
),
|
|
700
|
+
calc(
|
|
701
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
702
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
703
|
+
)
|
|
704
|
+
)
|
|
705
|
+
)
|
|
706
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
707
|
+
)
|
|
708
|
+
srgb-linear r g b /
|
|
709
|
+
min(
|
|
710
|
+
calc(
|
|
711
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
712
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
713
|
+
),
|
|
714
|
+
calc(
|
|
715
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
716
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
717
|
+
),
|
|
718
|
+
calc(
|
|
719
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
720
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
721
|
+
)
|
|
722
|
+
)
|
|
723
|
+
)
|
|
724
|
+
srgb-linear
|
|
725
|
+
calc(var(--_mp-grey-accent-container) + alpha * (r - var(--_mp-grey-accent-container)))
|
|
726
|
+
calc(var(--_mp-grey-accent-container) + alpha * (g - var(--_mp-grey-accent-container)))
|
|
727
|
+
calc(
|
|
728
|
+
var(--_mp-grey-accent-container) + alpha * (b - var(--_mp-grey-accent-container))
|
|
729
|
+
) /
|
|
730
|
+
1
|
|
424
731
|
)
|
|
425
732
|
)
|
|
426
733
|
);
|
|
@@ -428,9 +735,66 @@
|
|
|
428
735
|
--mp-sys-color-on-primary-container,
|
|
429
736
|
var(
|
|
430
737
|
--md-sys-color-on-primary-container,
|
|
431
|
-
|
|
432
|
-
from
|
|
433
|
-
|
|
738
|
+
color(
|
|
739
|
+
from
|
|
740
|
+
color(
|
|
741
|
+
from
|
|
742
|
+
oklab(
|
|
743
|
+
from
|
|
744
|
+
color(
|
|
745
|
+
from
|
|
746
|
+
oklch(
|
|
747
|
+
from var(--mp-source-color) var(--_mp-tone-on-accent-container)
|
|
748
|
+
calc(c * var(--_mp-palette-primary)) h
|
|
749
|
+
)
|
|
750
|
+
srgb-linear r g b /
|
|
751
|
+
min(
|
|
752
|
+
calc(
|
|
753
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
754
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
755
|
+
),
|
|
756
|
+
calc(
|
|
757
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
758
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
759
|
+
),
|
|
760
|
+
calc(
|
|
761
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
762
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
763
|
+
)
|
|
764
|
+
)
|
|
765
|
+
)
|
|
766
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
767
|
+
)
|
|
768
|
+
srgb-linear r g b /
|
|
769
|
+
min(
|
|
770
|
+
calc(
|
|
771
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
772
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
773
|
+
),
|
|
774
|
+
calc(
|
|
775
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
776
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
777
|
+
),
|
|
778
|
+
calc(
|
|
779
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
780
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
781
|
+
)
|
|
782
|
+
)
|
|
783
|
+
)
|
|
784
|
+
srgb-linear
|
|
785
|
+
calc(
|
|
786
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
787
|
+
(r - var(--_mp-grey-on-accent-container))
|
|
788
|
+
)
|
|
789
|
+
calc(
|
|
790
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
791
|
+
(g - var(--_mp-grey-on-accent-container))
|
|
792
|
+
)
|
|
793
|
+
calc(
|
|
794
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
795
|
+
(b - var(--_mp-grey-on-accent-container))
|
|
796
|
+
) /
|
|
797
|
+
1
|
|
434
798
|
)
|
|
435
799
|
)
|
|
436
800
|
);
|
|
@@ -439,8 +803,55 @@
|
|
|
439
803
|
--mp-sys-color-secondary,
|
|
440
804
|
var(
|
|
441
805
|
--md-sys-color-secondary,
|
|
442
|
-
|
|
443
|
-
from
|
|
806
|
+
color(
|
|
807
|
+
from
|
|
808
|
+
color(
|
|
809
|
+
from
|
|
810
|
+
oklab(
|
|
811
|
+
from
|
|
812
|
+
color(
|
|
813
|
+
from
|
|
814
|
+
oklch(
|
|
815
|
+
from var(--mp-source-color) var(--_mp-tone-accent)
|
|
816
|
+
calc(c * var(--_mp-chroma-secondary)) h
|
|
817
|
+
)
|
|
818
|
+
srgb-linear r g b /
|
|
819
|
+
min(
|
|
820
|
+
calc(
|
|
821
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
822
|
+
(r - var(--_mp-grey-accent) + 0.0000001)
|
|
823
|
+
),
|
|
824
|
+
calc(
|
|
825
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
826
|
+
(g - var(--_mp-grey-accent) + 0.0000001)
|
|
827
|
+
),
|
|
828
|
+
calc(
|
|
829
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
830
|
+
(b - var(--_mp-grey-accent) + 0.0000001)
|
|
831
|
+
)
|
|
832
|
+
)
|
|
833
|
+
)
|
|
834
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
835
|
+
)
|
|
836
|
+
srgb-linear r g b /
|
|
837
|
+
min(
|
|
838
|
+
calc(
|
|
839
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
840
|
+
(r - var(--_mp-grey-accent) + 0.0000001)
|
|
841
|
+
),
|
|
842
|
+
calc(
|
|
843
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
844
|
+
(g - var(--_mp-grey-accent) + 0.0000001)
|
|
845
|
+
),
|
|
846
|
+
calc(
|
|
847
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
848
|
+
(b - var(--_mp-grey-accent) + 0.0000001)
|
|
849
|
+
)
|
|
850
|
+
)
|
|
851
|
+
)
|
|
852
|
+
srgb-linear calc(var(--_mp-grey-accent) + alpha * (r - var(--_mp-grey-accent)))
|
|
853
|
+
calc(var(--_mp-grey-accent) + alpha * (g - var(--_mp-grey-accent)))
|
|
854
|
+
calc(var(--_mp-grey-accent) + alpha * (b - var(--_mp-grey-accent))) / 1
|
|
444
855
|
)
|
|
445
856
|
)
|
|
446
857
|
);
|
|
@@ -448,9 +859,55 @@
|
|
|
448
859
|
--mp-sys-color-on-secondary,
|
|
449
860
|
var(
|
|
450
861
|
--md-sys-color-on-secondary,
|
|
451
|
-
|
|
452
|
-
from
|
|
453
|
-
|
|
862
|
+
color(
|
|
863
|
+
from
|
|
864
|
+
color(
|
|
865
|
+
from
|
|
866
|
+
oklab(
|
|
867
|
+
from
|
|
868
|
+
color(
|
|
869
|
+
from
|
|
870
|
+
oklch(
|
|
871
|
+
from var(--mp-source-color) var(--_mp-tone-on-accent)
|
|
872
|
+
calc(c * var(--_mp-palette-secondary)) h
|
|
873
|
+
)
|
|
874
|
+
srgb-linear r g b /
|
|
875
|
+
min(
|
|
876
|
+
calc(
|
|
877
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
878
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
879
|
+
),
|
|
880
|
+
calc(
|
|
881
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
882
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
883
|
+
),
|
|
884
|
+
calc(
|
|
885
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
886
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
887
|
+
)
|
|
888
|
+
)
|
|
889
|
+
)
|
|
890
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
891
|
+
)
|
|
892
|
+
srgb-linear r g b /
|
|
893
|
+
min(
|
|
894
|
+
calc(
|
|
895
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
896
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
897
|
+
),
|
|
898
|
+
calc(
|
|
899
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
900
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
901
|
+
),
|
|
902
|
+
calc(
|
|
903
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
904
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
905
|
+
)
|
|
906
|
+
)
|
|
907
|
+
)
|
|
908
|
+
srgb-linear calc(var(--_mp-grey-on-accent) + alpha * (r - var(--_mp-grey-on-accent)))
|
|
909
|
+
calc(var(--_mp-grey-on-accent) + alpha * (g - var(--_mp-grey-on-accent)))
|
|
910
|
+
calc(var(--_mp-grey-on-accent) + alpha * (b - var(--_mp-grey-on-accent))) / 1
|
|
454
911
|
)
|
|
455
912
|
)
|
|
456
913
|
);
|
|
@@ -458,9 +915,59 @@
|
|
|
458
915
|
--mp-sys-color-secondary-container,
|
|
459
916
|
var(
|
|
460
917
|
--md-sys-color-secondary-container,
|
|
461
|
-
|
|
462
|
-
from
|
|
463
|
-
|
|
918
|
+
color(
|
|
919
|
+
from
|
|
920
|
+
color(
|
|
921
|
+
from
|
|
922
|
+
oklab(
|
|
923
|
+
from
|
|
924
|
+
color(
|
|
925
|
+
from
|
|
926
|
+
oklch(
|
|
927
|
+
from var(--mp-source-color) var(--_mp-tone-accent-container)
|
|
928
|
+
calc(c * var(--_mp-palette-secondary)) h
|
|
929
|
+
)
|
|
930
|
+
srgb-linear r g b /
|
|
931
|
+
min(
|
|
932
|
+
calc(
|
|
933
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
934
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
935
|
+
),
|
|
936
|
+
calc(
|
|
937
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
938
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
939
|
+
),
|
|
940
|
+
calc(
|
|
941
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
942
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
943
|
+
)
|
|
944
|
+
)
|
|
945
|
+
)
|
|
946
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
947
|
+
)
|
|
948
|
+
srgb-linear r g b /
|
|
949
|
+
min(
|
|
950
|
+
calc(
|
|
951
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
952
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
953
|
+
),
|
|
954
|
+
calc(
|
|
955
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
956
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
957
|
+
),
|
|
958
|
+
calc(
|
|
959
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
960
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
961
|
+
)
|
|
962
|
+
)
|
|
963
|
+
)
|
|
964
|
+
srgb-linear
|
|
965
|
+
calc(var(--_mp-grey-accent-container) + alpha * (r - var(--_mp-grey-accent-container)))
|
|
966
|
+
calc(var(--_mp-grey-accent-container) + alpha * (g - var(--_mp-grey-accent-container)))
|
|
967
|
+
calc(
|
|
968
|
+
var(--_mp-grey-accent-container) + alpha * (b - var(--_mp-grey-accent-container))
|
|
969
|
+
) /
|
|
970
|
+
1
|
|
464
971
|
)
|
|
465
972
|
)
|
|
466
973
|
);
|
|
@@ -468,9 +975,66 @@
|
|
|
468
975
|
--mp-sys-color-on-secondary-container,
|
|
469
976
|
var(
|
|
470
977
|
--md-sys-color-on-secondary-container,
|
|
471
|
-
|
|
472
|
-
from
|
|
473
|
-
|
|
978
|
+
color(
|
|
979
|
+
from
|
|
980
|
+
color(
|
|
981
|
+
from
|
|
982
|
+
oklab(
|
|
983
|
+
from
|
|
984
|
+
color(
|
|
985
|
+
from
|
|
986
|
+
oklch(
|
|
987
|
+
from var(--mp-source-color) var(--_mp-tone-on-accent-container)
|
|
988
|
+
calc(c * var(--_mp-palette-secondary)) h
|
|
989
|
+
)
|
|
990
|
+
srgb-linear r g b /
|
|
991
|
+
min(
|
|
992
|
+
calc(
|
|
993
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
994
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
995
|
+
),
|
|
996
|
+
calc(
|
|
997
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
998
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
999
|
+
),
|
|
1000
|
+
calc(
|
|
1001
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1002
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1003
|
+
)
|
|
1004
|
+
)
|
|
1005
|
+
)
|
|
1006
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1007
|
+
)
|
|
1008
|
+
srgb-linear r g b /
|
|
1009
|
+
min(
|
|
1010
|
+
calc(
|
|
1011
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1012
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1013
|
+
),
|
|
1014
|
+
calc(
|
|
1015
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1016
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1017
|
+
),
|
|
1018
|
+
calc(
|
|
1019
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1020
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1021
|
+
)
|
|
1022
|
+
)
|
|
1023
|
+
)
|
|
1024
|
+
srgb-linear
|
|
1025
|
+
calc(
|
|
1026
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1027
|
+
(r - var(--_mp-grey-on-accent-container))
|
|
1028
|
+
)
|
|
1029
|
+
calc(
|
|
1030
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1031
|
+
(g - var(--_mp-grey-on-accent-container))
|
|
1032
|
+
)
|
|
1033
|
+
calc(
|
|
1034
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1035
|
+
(b - var(--_mp-grey-on-accent-container))
|
|
1036
|
+
) /
|
|
1037
|
+
1
|
|
474
1038
|
)
|
|
475
1039
|
)
|
|
476
1040
|
);
|
|
@@ -480,9 +1044,55 @@
|
|
|
480
1044
|
--mp-sys-color-tertiary,
|
|
481
1045
|
var(
|
|
482
1046
|
--md-sys-color-tertiary,
|
|
483
|
-
|
|
484
|
-
from
|
|
485
|
-
|
|
1047
|
+
color(
|
|
1048
|
+
from
|
|
1049
|
+
color(
|
|
1050
|
+
from
|
|
1051
|
+
oklab(
|
|
1052
|
+
from
|
|
1053
|
+
color(
|
|
1054
|
+
from
|
|
1055
|
+
oklch(
|
|
1056
|
+
from var(--mp-source-color) var(--_mp-tone-accent)
|
|
1057
|
+
calc(c * var(--_mp-chroma-tertiary)) calc(h + var(--_mp-hue-tertiary))
|
|
1058
|
+
)
|
|
1059
|
+
srgb-linear r g b /
|
|
1060
|
+
min(
|
|
1061
|
+
calc(
|
|
1062
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
1063
|
+
(r - var(--_mp-grey-accent) + 0.0000001)
|
|
1064
|
+
),
|
|
1065
|
+
calc(
|
|
1066
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
1067
|
+
(g - var(--_mp-grey-accent) + 0.0000001)
|
|
1068
|
+
),
|
|
1069
|
+
calc(
|
|
1070
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
1071
|
+
(b - var(--_mp-grey-accent) + 0.0000001)
|
|
1072
|
+
)
|
|
1073
|
+
)
|
|
1074
|
+
)
|
|
1075
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1076
|
+
)
|
|
1077
|
+
srgb-linear r g b /
|
|
1078
|
+
min(
|
|
1079
|
+
calc(
|
|
1080
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
1081
|
+
(r - var(--_mp-grey-accent) + 0.0000001)
|
|
1082
|
+
),
|
|
1083
|
+
calc(
|
|
1084
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
1085
|
+
(g - var(--_mp-grey-accent) + 0.0000001)
|
|
1086
|
+
),
|
|
1087
|
+
calc(
|
|
1088
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent) + 0.0000001) /
|
|
1089
|
+
(b - var(--_mp-grey-accent) + 0.0000001)
|
|
1090
|
+
)
|
|
1091
|
+
)
|
|
1092
|
+
)
|
|
1093
|
+
srgb-linear calc(var(--_mp-grey-accent) + alpha * (r - var(--_mp-grey-accent)))
|
|
1094
|
+
calc(var(--_mp-grey-accent) + alpha * (g - var(--_mp-grey-accent)))
|
|
1095
|
+
calc(var(--_mp-grey-accent) + alpha * (b - var(--_mp-grey-accent))) / 1
|
|
486
1096
|
)
|
|
487
1097
|
)
|
|
488
1098
|
);
|
|
@@ -490,9 +1100,55 @@
|
|
|
490
1100
|
--mp-sys-color-on-tertiary,
|
|
491
1101
|
var(
|
|
492
1102
|
--md-sys-color-on-tertiary,
|
|
493
|
-
|
|
494
|
-
from
|
|
495
|
-
|
|
1103
|
+
color(
|
|
1104
|
+
from
|
|
1105
|
+
color(
|
|
1106
|
+
from
|
|
1107
|
+
oklab(
|
|
1108
|
+
from
|
|
1109
|
+
color(
|
|
1110
|
+
from
|
|
1111
|
+
oklch(
|
|
1112
|
+
from var(--mp-source-color) var(--_mp-tone-on-accent)
|
|
1113
|
+
calc(c * var(--_mp-palette-tertiary)) calc(h + var(--_mp-hue-tertiary))
|
|
1114
|
+
)
|
|
1115
|
+
srgb-linear r g b /
|
|
1116
|
+
min(
|
|
1117
|
+
calc(
|
|
1118
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1119
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1120
|
+
),
|
|
1121
|
+
calc(
|
|
1122
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1123
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1124
|
+
),
|
|
1125
|
+
calc(
|
|
1126
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1127
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1128
|
+
)
|
|
1129
|
+
)
|
|
1130
|
+
)
|
|
1131
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1132
|
+
)
|
|
1133
|
+
srgb-linear r g b /
|
|
1134
|
+
min(
|
|
1135
|
+
calc(
|
|
1136
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1137
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1138
|
+
),
|
|
1139
|
+
calc(
|
|
1140
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1141
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1142
|
+
),
|
|
1143
|
+
calc(
|
|
1144
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1145
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1146
|
+
)
|
|
1147
|
+
)
|
|
1148
|
+
)
|
|
1149
|
+
srgb-linear calc(var(--_mp-grey-on-accent) + alpha * (r - var(--_mp-grey-on-accent)))
|
|
1150
|
+
calc(var(--_mp-grey-on-accent) + alpha * (g - var(--_mp-grey-on-accent)))
|
|
1151
|
+
calc(var(--_mp-grey-on-accent) + alpha * (b - var(--_mp-grey-on-accent))) / 1
|
|
496
1152
|
)
|
|
497
1153
|
)
|
|
498
1154
|
);
|
|
@@ -500,9 +1156,59 @@
|
|
|
500
1156
|
--mp-sys-color-tertiary-container,
|
|
501
1157
|
var(
|
|
502
1158
|
--md-sys-color-tertiary-container,
|
|
503
|
-
|
|
504
|
-
from
|
|
505
|
-
|
|
1159
|
+
color(
|
|
1160
|
+
from
|
|
1161
|
+
color(
|
|
1162
|
+
from
|
|
1163
|
+
oklab(
|
|
1164
|
+
from
|
|
1165
|
+
color(
|
|
1166
|
+
from
|
|
1167
|
+
oklch(
|
|
1168
|
+
from var(--mp-source-color) var(--_mp-tone-accent-container)
|
|
1169
|
+
calc(c * var(--_mp-palette-tertiary)) calc(h + var(--_mp-hue-tertiary))
|
|
1170
|
+
)
|
|
1171
|
+
srgb-linear r g b /
|
|
1172
|
+
min(
|
|
1173
|
+
calc(
|
|
1174
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1175
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1176
|
+
),
|
|
1177
|
+
calc(
|
|
1178
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1179
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1180
|
+
),
|
|
1181
|
+
calc(
|
|
1182
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1183
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1184
|
+
)
|
|
1185
|
+
)
|
|
1186
|
+
)
|
|
1187
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1188
|
+
)
|
|
1189
|
+
srgb-linear r g b /
|
|
1190
|
+
min(
|
|
1191
|
+
calc(
|
|
1192
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1193
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1194
|
+
),
|
|
1195
|
+
calc(
|
|
1196
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1197
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1198
|
+
),
|
|
1199
|
+
calc(
|
|
1200
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1201
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1202
|
+
)
|
|
1203
|
+
)
|
|
1204
|
+
)
|
|
1205
|
+
srgb-linear
|
|
1206
|
+
calc(var(--_mp-grey-accent-container) + alpha * (r - var(--_mp-grey-accent-container)))
|
|
1207
|
+
calc(var(--_mp-grey-accent-container) + alpha * (g - var(--_mp-grey-accent-container)))
|
|
1208
|
+
calc(
|
|
1209
|
+
var(--_mp-grey-accent-container) + alpha * (b - var(--_mp-grey-accent-container))
|
|
1210
|
+
) /
|
|
1211
|
+
1
|
|
506
1212
|
)
|
|
507
1213
|
)
|
|
508
1214
|
);
|
|
@@ -510,9 +1216,66 @@
|
|
|
510
1216
|
--mp-sys-color-on-tertiary-container,
|
|
511
1217
|
var(
|
|
512
1218
|
--md-sys-color-on-tertiary-container,
|
|
513
|
-
|
|
514
|
-
from
|
|
515
|
-
|
|
1219
|
+
color(
|
|
1220
|
+
from
|
|
1221
|
+
color(
|
|
1222
|
+
from
|
|
1223
|
+
oklab(
|
|
1224
|
+
from
|
|
1225
|
+
color(
|
|
1226
|
+
from
|
|
1227
|
+
oklch(
|
|
1228
|
+
from var(--mp-source-color) var(--_mp-tone-on-accent-container)
|
|
1229
|
+
calc(c * var(--_mp-palette-tertiary)) calc(h + var(--_mp-hue-tertiary))
|
|
1230
|
+
)
|
|
1231
|
+
srgb-linear r g b /
|
|
1232
|
+
min(
|
|
1233
|
+
calc(
|
|
1234
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1235
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1236
|
+
),
|
|
1237
|
+
calc(
|
|
1238
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1239
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1240
|
+
),
|
|
1241
|
+
calc(
|
|
1242
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1243
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1244
|
+
)
|
|
1245
|
+
)
|
|
1246
|
+
)
|
|
1247
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1248
|
+
)
|
|
1249
|
+
srgb-linear r g b /
|
|
1250
|
+
min(
|
|
1251
|
+
calc(
|
|
1252
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1253
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1254
|
+
),
|
|
1255
|
+
calc(
|
|
1256
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1257
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1258
|
+
),
|
|
1259
|
+
calc(
|
|
1260
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1261
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1262
|
+
)
|
|
1263
|
+
)
|
|
1264
|
+
)
|
|
1265
|
+
srgb-linear
|
|
1266
|
+
calc(
|
|
1267
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1268
|
+
(r - var(--_mp-grey-on-accent-container))
|
|
1269
|
+
)
|
|
1270
|
+
calc(
|
|
1271
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1272
|
+
(g - var(--_mp-grey-on-accent-container))
|
|
1273
|
+
)
|
|
1274
|
+
calc(
|
|
1275
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1276
|
+
(b - var(--_mp-grey-on-accent-container))
|
|
1277
|
+
) /
|
|
1278
|
+
1
|
|
516
1279
|
)
|
|
517
1280
|
)
|
|
518
1281
|
);
|
|
@@ -599,9 +1362,56 @@
|
|
|
599
1362
|
--mp-sys-color-inverse-primary,
|
|
600
1363
|
var(
|
|
601
1364
|
--md-sys-color-inverse-primary,
|
|
602
|
-
|
|
603
|
-
from
|
|
604
|
-
|
|
1365
|
+
color(
|
|
1366
|
+
from
|
|
1367
|
+
color(
|
|
1368
|
+
from
|
|
1369
|
+
oklab(
|
|
1370
|
+
from
|
|
1371
|
+
color(
|
|
1372
|
+
from
|
|
1373
|
+
oklch(
|
|
1374
|
+
from var(--mp-source-color) var(--_mp-tone-inverse-accent)
|
|
1375
|
+
calc(c * var(--_mp-chroma-inverse-primary)) h
|
|
1376
|
+
)
|
|
1377
|
+
srgb-linear r g b /
|
|
1378
|
+
min(
|
|
1379
|
+
calc(
|
|
1380
|
+
(clamp(0, r, 1) - var(--_mp-grey-inverse-accent) + 0.0000001) /
|
|
1381
|
+
(r - var(--_mp-grey-inverse-accent) + 0.0000001)
|
|
1382
|
+
),
|
|
1383
|
+
calc(
|
|
1384
|
+
(clamp(0, g, 1) - var(--_mp-grey-inverse-accent) + 0.0000001) /
|
|
1385
|
+
(g - var(--_mp-grey-inverse-accent) + 0.0000001)
|
|
1386
|
+
),
|
|
1387
|
+
calc(
|
|
1388
|
+
(clamp(0, b, 1) - var(--_mp-grey-inverse-accent) + 0.0000001) /
|
|
1389
|
+
(b - var(--_mp-grey-inverse-accent) + 0.0000001)
|
|
1390
|
+
)
|
|
1391
|
+
)
|
|
1392
|
+
)
|
|
1393
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1394
|
+
)
|
|
1395
|
+
srgb-linear r g b /
|
|
1396
|
+
min(
|
|
1397
|
+
calc(
|
|
1398
|
+
(clamp(0, r, 1) - var(--_mp-grey-inverse-accent) + 0.0000001) /
|
|
1399
|
+
(r - var(--_mp-grey-inverse-accent) + 0.0000001)
|
|
1400
|
+
),
|
|
1401
|
+
calc(
|
|
1402
|
+
(clamp(0, g, 1) - var(--_mp-grey-inverse-accent) + 0.0000001) /
|
|
1403
|
+
(g - var(--_mp-grey-inverse-accent) + 0.0000001)
|
|
1404
|
+
),
|
|
1405
|
+
calc(
|
|
1406
|
+
(clamp(0, b, 1) - var(--_mp-grey-inverse-accent) + 0.0000001) /
|
|
1407
|
+
(b - var(--_mp-grey-inverse-accent) + 0.0000001)
|
|
1408
|
+
)
|
|
1409
|
+
)
|
|
1410
|
+
)
|
|
1411
|
+
srgb-linear
|
|
1412
|
+
calc(var(--_mp-grey-inverse-accent) + alpha * (r - var(--_mp-grey-inverse-accent)))
|
|
1413
|
+
calc(var(--_mp-grey-inverse-accent) + alpha * (g - var(--_mp-grey-inverse-accent)))
|
|
1414
|
+
calc(var(--_mp-grey-inverse-accent) + alpha * (b - var(--_mp-grey-inverse-accent))) / 1
|
|
605
1415
|
)
|
|
606
1416
|
)
|
|
607
1417
|
);
|
|
@@ -656,6 +1466,85 @@
|
|
|
656
1466
|
*/
|
|
657
1467
|
--_mp-color-scrim: var(--mp-sys-color-scrim, var(--md-sys-color-scrim, #000000));
|
|
658
1468
|
|
|
1469
|
+
/*
|
|
1470
|
+
* The chart ramp: eight slots a series is handed in order.
|
|
1471
|
+
*
|
|
1472
|
+
* ## Why these are not derived from the source colour
|
|
1473
|
+
*
|
|
1474
|
+
* They were, first. Rotating eight hues off `--mp-source-color` is the
|
|
1475
|
+
* obvious answer — it themes for free and it is one line per slot — and it
|
|
1476
|
+
* does not survive being measured. Colour-vision deficiency collapses the
|
|
1477
|
+
* red-green axis at *absolute* hues, so a ramp whose adjacent pairs are
|
|
1478
|
+
* clear of that axis puts a different pair straight onto it the moment the
|
|
1479
|
+
* whole thing is rotated. Fitted to the default seed and then re-checked
|
|
1480
|
+
* against five others, the rotated ramp failed the protan/deutan separation
|
|
1481
|
+
* for four of the five.
|
|
1482
|
+
*
|
|
1483
|
+
* So the hues are fixed and only the lightness follows the scheme. Slot one
|
|
1484
|
+
* happens to be the default seed's own blue, which is why an untouched theme
|
|
1485
|
+
* looks of a piece; that is where the resemblance ends, and it is on purpose.
|
|
1486
|
+
* A series colour is an identity code rather than brand — nothing here is
|
|
1487
|
+
* ever the background of a label, and `--_mp-color-on-surface` is what the
|
|
1488
|
+
* text beside a mark wears.
|
|
1489
|
+
*
|
|
1490
|
+
* ## What "fitted" means
|
|
1491
|
+
*
|
|
1492
|
+
* Eight hues at least 30° apart, a chroma of 0.15 (browser-clamped per hue
|
|
1493
|
+
* to whatever sRGB has), and a lightness per slot per scheme, searched until
|
|
1494
|
+
* every one of these holds in both schemes:
|
|
1495
|
+
*
|
|
1496
|
+
* - lightness inside the readable band, chroma at or above 0.10, so a slot
|
|
1497
|
+
* never reads as grey;
|
|
1498
|
+
* - every **adjacent** pair at ΔE 8 or better under protanopia and
|
|
1499
|
+
* deuteranopia — the fit clears 16.2 light and 13.7 dark;
|
|
1500
|
+
* - every adjacent pair at ΔE 15 or better under ordinary vision, so the
|
|
1501
|
+
* ones a reader compares most are the easiest to tell apart — 26.5 and
|
|
1502
|
+
* 20.6;
|
|
1503
|
+
* - and 3:1 against the surface for all eight in both schemes.
|
|
1504
|
+
*
|
|
1505
|
+
* **Three is the cap where any two marks can touch** — a scatter, a bubble
|
|
1506
|
+
* chart, a heatmap. Eight slots are pairwise-separable only to the third,
|
|
1507
|
+
* and no ordering of eight can do better; that is a property of the colour
|
|
1508
|
+
* space rather than of this palette. Past three, fold the tail into one
|
|
1509
|
+
* "other" series or draw a second chart.
|
|
1510
|
+
*
|
|
1511
|
+
* A consumer overrides one with `--mp-chart-3`, exactly as they would a
|
|
1512
|
+
* colour role — and owns the checks for it from that point.
|
|
1513
|
+
*/
|
|
1514
|
+
--_mp-chart-1: var(--mp-chart-1, oklch(var(--_mp-tone-chart-1) 0.15 245));
|
|
1515
|
+
--_mp-chart-2: var(--mp-chart-2, oklch(var(--_mp-tone-chart-2) 0.15 55));
|
|
1516
|
+
--_mp-chart-3: var(--mp-chart-3, oklch(var(--_mp-tone-chart-3) 0.15 180));
|
|
1517
|
+
--_mp-chart-4: var(--mp-chart-4, oklch(var(--_mp-tone-chart-4) 0.15 280));
|
|
1518
|
+
--_mp-chart-5: var(--mp-chart-5, oklch(var(--_mp-tone-chart-5) 0.15 0));
|
|
1519
|
+
--_mp-chart-6: var(--mp-chart-6, oklch(var(--_mp-tone-chart-6) 0.15 120));
|
|
1520
|
+
--_mp-chart-7: var(--mp-chart-7, oklch(var(--_mp-tone-chart-7) 0.15 315));
|
|
1521
|
+
--_mp-chart-8: var(--mp-chart-8, oklch(var(--_mp-tone-chart-8) 0.15 150));
|
|
1522
|
+
|
|
1523
|
+
/* The sequential ramp, on slot one's hue so a chart using both reads as one
|
|
1524
|
+
family. Each step takes its own chroma as well as its own lightness: a
|
|
1525
|
+
ramp at one chroma throughout goes grey at the pale end and muddy at the
|
|
1526
|
+
deep one. */
|
|
1527
|
+
--_mp-chart-scale-1: var(
|
|
1528
|
+
--mp-chart-scale-1,
|
|
1529
|
+
oklch(var(--_mp-tone-chart-scale-1) var(--_mp-chroma-chart-scale-1) 245)
|
|
1530
|
+
);
|
|
1531
|
+
--_mp-chart-scale-2: var(
|
|
1532
|
+
--mp-chart-scale-2,
|
|
1533
|
+
oklch(var(--_mp-tone-chart-scale-2) var(--_mp-chroma-chart-scale-2) 245)
|
|
1534
|
+
);
|
|
1535
|
+
--_mp-chart-scale-3: var(
|
|
1536
|
+
--mp-chart-scale-3,
|
|
1537
|
+
oklch(var(--_mp-tone-chart-scale-3) var(--_mp-chroma-chart-scale-3) 245)
|
|
1538
|
+
);
|
|
1539
|
+
--_mp-chart-scale-4: var(
|
|
1540
|
+
--mp-chart-scale-4,
|
|
1541
|
+
oklch(var(--_mp-tone-chart-scale-4) var(--_mp-chroma-chart-scale-4) 245)
|
|
1542
|
+
);
|
|
1543
|
+
--_mp-chart-scale-5: var(
|
|
1544
|
+
--mp-chart-scale-5,
|
|
1545
|
+
oklch(var(--_mp-tone-chart-scale-5) var(--_mp-chroma-chart-scale-5) 245)
|
|
1546
|
+
);
|
|
1547
|
+
|
|
659
1548
|
/* Not derived from the source colour. MD3's error palette is a fixed red
|
|
660
1549
|
regardless of the seed — an error that shifted hue with the brand would
|
|
661
1550
|
stop reading as an error. It still tracks the scheme, so it belongs here
|
|
@@ -664,28 +1553,234 @@
|
|
|
664
1553
|
--mp-sys-color-error,
|
|
665
1554
|
var(
|
|
666
1555
|
--md-sys-color-error,
|
|
667
|
-
|
|
1556
|
+
color(
|
|
1557
|
+
from
|
|
1558
|
+
color(
|
|
1559
|
+
from
|
|
1560
|
+
oklab(
|
|
1561
|
+
from
|
|
1562
|
+
color(
|
|
1563
|
+
from oklch(var(--_mp-tone-error) var(--_mp-chroma-error) var(--_mp-hue-error))
|
|
1564
|
+
srgb-linear r g b /
|
|
1565
|
+
min(
|
|
1566
|
+
calc(
|
|
1567
|
+
(clamp(0, r, 1) - var(--_mp-grey-error) + 0.0000001) /
|
|
1568
|
+
(r - var(--_mp-grey-error) + 0.0000001)
|
|
1569
|
+
),
|
|
1570
|
+
calc(
|
|
1571
|
+
(clamp(0, g, 1) - var(--_mp-grey-error) + 0.0000001) /
|
|
1572
|
+
(g - var(--_mp-grey-error) + 0.0000001)
|
|
1573
|
+
),
|
|
1574
|
+
calc(
|
|
1575
|
+
(clamp(0, b, 1) - var(--_mp-grey-error) + 0.0000001) /
|
|
1576
|
+
(b - var(--_mp-grey-error) + 0.0000001)
|
|
1577
|
+
)
|
|
1578
|
+
)
|
|
1579
|
+
)
|
|
1580
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1581
|
+
)
|
|
1582
|
+
srgb-linear r g b /
|
|
1583
|
+
min(
|
|
1584
|
+
calc(
|
|
1585
|
+
(clamp(0, r, 1) - var(--_mp-grey-error) + 0.0000001) /
|
|
1586
|
+
(r - var(--_mp-grey-error) + 0.0000001)
|
|
1587
|
+
),
|
|
1588
|
+
calc(
|
|
1589
|
+
(clamp(0, g, 1) - var(--_mp-grey-error) + 0.0000001) /
|
|
1590
|
+
(g - var(--_mp-grey-error) + 0.0000001)
|
|
1591
|
+
),
|
|
1592
|
+
calc(
|
|
1593
|
+
(clamp(0, b, 1) - var(--_mp-grey-error) + 0.0000001) /
|
|
1594
|
+
(b - var(--_mp-grey-error) + 0.0000001)
|
|
1595
|
+
)
|
|
1596
|
+
)
|
|
1597
|
+
)
|
|
1598
|
+
srgb-linear calc(var(--_mp-grey-error) + alpha * (r - var(--_mp-grey-error)))
|
|
1599
|
+
calc(var(--_mp-grey-error) + alpha * (g - var(--_mp-grey-error)))
|
|
1600
|
+
calc(var(--_mp-grey-error) + alpha * (b - var(--_mp-grey-error))) / 1
|
|
1601
|
+
)
|
|
668
1602
|
)
|
|
669
1603
|
);
|
|
670
1604
|
--_mp-color-on-error: var(
|
|
671
1605
|
--mp-sys-color-on-error,
|
|
672
1606
|
var(
|
|
673
1607
|
--md-sys-color-on-error,
|
|
674
|
-
|
|
1608
|
+
color(
|
|
1609
|
+
from
|
|
1610
|
+
color(
|
|
1611
|
+
from
|
|
1612
|
+
oklab(
|
|
1613
|
+
from
|
|
1614
|
+
color(
|
|
1615
|
+
from
|
|
1616
|
+
oklch(
|
|
1617
|
+
var(--_mp-tone-on-accent) var(--_mp-palette-error) var(--_mp-hue-error)
|
|
1618
|
+
)
|
|
1619
|
+
srgb-linear r g b /
|
|
1620
|
+
min(
|
|
1621
|
+
calc(
|
|
1622
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1623
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1624
|
+
),
|
|
1625
|
+
calc(
|
|
1626
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1627
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1628
|
+
),
|
|
1629
|
+
calc(
|
|
1630
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1631
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1632
|
+
)
|
|
1633
|
+
)
|
|
1634
|
+
)
|
|
1635
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1636
|
+
)
|
|
1637
|
+
srgb-linear r g b /
|
|
1638
|
+
min(
|
|
1639
|
+
calc(
|
|
1640
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1641
|
+
(r - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1642
|
+
),
|
|
1643
|
+
calc(
|
|
1644
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1645
|
+
(g - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1646
|
+
),
|
|
1647
|
+
calc(
|
|
1648
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent) + 0.0000001) /
|
|
1649
|
+
(b - var(--_mp-grey-on-accent) + 0.0000001)
|
|
1650
|
+
)
|
|
1651
|
+
)
|
|
1652
|
+
)
|
|
1653
|
+
srgb-linear calc(var(--_mp-grey-on-accent) + alpha * (r - var(--_mp-grey-on-accent)))
|
|
1654
|
+
calc(var(--_mp-grey-on-accent) + alpha * (g - var(--_mp-grey-on-accent)))
|
|
1655
|
+
calc(var(--_mp-grey-on-accent) + alpha * (b - var(--_mp-grey-on-accent))) / 1
|
|
1656
|
+
)
|
|
675
1657
|
)
|
|
676
1658
|
);
|
|
677
1659
|
--_mp-color-error-container: var(
|
|
678
1660
|
--mp-sys-color-error-container,
|
|
679
1661
|
var(
|
|
680
1662
|
--md-sys-color-error-container,
|
|
681
|
-
|
|
1663
|
+
color(
|
|
1664
|
+
from
|
|
1665
|
+
color(
|
|
1666
|
+
from
|
|
1667
|
+
oklab(
|
|
1668
|
+
from
|
|
1669
|
+
color(
|
|
1670
|
+
from
|
|
1671
|
+
oklch(
|
|
1672
|
+
var(--_mp-tone-accent-container) var(--_mp-palette-error)
|
|
1673
|
+
var(--_mp-hue-error)
|
|
1674
|
+
)
|
|
1675
|
+
srgb-linear r g b /
|
|
1676
|
+
min(
|
|
1677
|
+
calc(
|
|
1678
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1679
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1680
|
+
),
|
|
1681
|
+
calc(
|
|
1682
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1683
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1684
|
+
),
|
|
1685
|
+
calc(
|
|
1686
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1687
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1688
|
+
)
|
|
1689
|
+
)
|
|
1690
|
+
)
|
|
1691
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1692
|
+
)
|
|
1693
|
+
srgb-linear r g b /
|
|
1694
|
+
min(
|
|
1695
|
+
calc(
|
|
1696
|
+
(clamp(0, r, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1697
|
+
(r - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1698
|
+
),
|
|
1699
|
+
calc(
|
|
1700
|
+
(clamp(0, g, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1701
|
+
(g - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1702
|
+
),
|
|
1703
|
+
calc(
|
|
1704
|
+
(clamp(0, b, 1) - var(--_mp-grey-accent-container) + 0.0000001) /
|
|
1705
|
+
(b - var(--_mp-grey-accent-container) + 0.0000001)
|
|
1706
|
+
)
|
|
1707
|
+
)
|
|
1708
|
+
)
|
|
1709
|
+
srgb-linear
|
|
1710
|
+
calc(var(--_mp-grey-accent-container) + alpha * (r - var(--_mp-grey-accent-container)))
|
|
1711
|
+
calc(var(--_mp-grey-accent-container) + alpha * (g - var(--_mp-grey-accent-container)))
|
|
1712
|
+
calc(
|
|
1713
|
+
var(--_mp-grey-accent-container) + alpha * (b - var(--_mp-grey-accent-container))
|
|
1714
|
+
) /
|
|
1715
|
+
1
|
|
1716
|
+
)
|
|
682
1717
|
)
|
|
683
1718
|
);
|
|
684
1719
|
--_mp-color-on-error-container: var(
|
|
685
1720
|
--mp-sys-color-on-error-container,
|
|
686
1721
|
var(
|
|
687
1722
|
--md-sys-color-on-error-container,
|
|
688
|
-
|
|
1723
|
+
color(
|
|
1724
|
+
from
|
|
1725
|
+
color(
|
|
1726
|
+
from
|
|
1727
|
+
oklab(
|
|
1728
|
+
from
|
|
1729
|
+
color(
|
|
1730
|
+
from
|
|
1731
|
+
oklch(
|
|
1732
|
+
var(--_mp-tone-on-accent-container) var(--_mp-palette-error)
|
|
1733
|
+
var(--_mp-hue-error)
|
|
1734
|
+
)
|
|
1735
|
+
srgb-linear r g b /
|
|
1736
|
+
min(
|
|
1737
|
+
calc(
|
|
1738
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1739
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1740
|
+
),
|
|
1741
|
+
calc(
|
|
1742
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1743
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1744
|
+
),
|
|
1745
|
+
calc(
|
|
1746
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1747
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1748
|
+
)
|
|
1749
|
+
)
|
|
1750
|
+
)
|
|
1751
|
+
l calc(a * alpha) calc(b * alpha) / 1
|
|
1752
|
+
)
|
|
1753
|
+
srgb-linear r g b /
|
|
1754
|
+
min(
|
|
1755
|
+
calc(
|
|
1756
|
+
(clamp(0, r, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1757
|
+
(r - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1758
|
+
),
|
|
1759
|
+
calc(
|
|
1760
|
+
(clamp(0, g, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1761
|
+
(g - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1762
|
+
),
|
|
1763
|
+
calc(
|
|
1764
|
+
(clamp(0, b, 1) - var(--_mp-grey-on-accent-container) + 0.0000001) /
|
|
1765
|
+
(b - var(--_mp-grey-on-accent-container) + 0.0000001)
|
|
1766
|
+
)
|
|
1767
|
+
)
|
|
1768
|
+
)
|
|
1769
|
+
srgb-linear
|
|
1770
|
+
calc(
|
|
1771
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1772
|
+
(r - var(--_mp-grey-on-accent-container))
|
|
1773
|
+
)
|
|
1774
|
+
calc(
|
|
1775
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1776
|
+
(g - var(--_mp-grey-on-accent-container))
|
|
1777
|
+
)
|
|
1778
|
+
calc(
|
|
1779
|
+
var(--_mp-grey-on-accent-container) + alpha *
|
|
1780
|
+
(b - var(--_mp-grey-on-accent-container))
|
|
1781
|
+
) /
|
|
1782
|
+
1
|
|
1783
|
+
)
|
|
689
1784
|
)
|
|
690
1785
|
);
|
|
691
1786
|
|
|
@@ -812,10 +1907,262 @@
|
|
|
812
1907
|
--shadow-mp-1: var(--mp-sys-elevation-level1);
|
|
813
1908
|
--shadow-mp-2: var(--mp-sys-elevation-level2);
|
|
814
1909
|
--shadow-mp-3: var(--mp-sys-elevation-level3);
|
|
1910
|
+
--shadow-mp-4: var(--mp-sys-elevation-level4);
|
|
1911
|
+
--shadow-mp-5: var(--mp-sys-elevation-level5);
|
|
815
1912
|
|
|
816
1913
|
--ease-mp-standard: var(--mp-sys-motion-easing-standard);
|
|
817
1914
|
}
|
|
818
1915
|
|
|
1916
|
+
/*
|
|
1917
|
+
* The colour roles again, for a browser that cannot compute them.
|
|
1918
|
+
*
|
|
1919
|
+
* The roles above need relative colour syntax, and the gamut step inside the
|
|
1920
|
+
* accent and error roles needs `clamp()` and `min()` on a channel, which is
|
|
1921
|
+
* newer still. A role a browser cannot compute does not fail loudly: it is
|
|
1922
|
+
* invalid at computed-value time, so every property that reads it falls back
|
|
1923
|
+
* to its initial value — a filled button with no fill, a dialog with no sheet
|
|
1924
|
+
* behind its text. The block below keeps the colours in the browsers without
|
|
1925
|
+
* that syntax, Chrome and Edge before 119, Firefox before 128 and Safari
|
|
1926
|
+
* before 18, and every browser that has it skips the block.
|
|
1927
|
+
*
|
|
1928
|
+
* What those browsers get is the default scheme, light and dark, written out
|
|
1929
|
+
* as the colours a current browser draws for the default `--mp-source-color`.
|
|
1930
|
+
* A `--mp-source-color` set by a consumer changes nothing there, because
|
|
1931
|
+
* reading a hue out of a colour is exactly what they cannot do. A role set
|
|
1932
|
+
* through `--mp-sys-color-*` or `--md-sys-color-*` still wins, as it does
|
|
1933
|
+
* everywhere.
|
|
1934
|
+
*
|
|
1935
|
+
* The condition asks for the syntax the roles are written in rather than
|
|
1936
|
+
* naming a browser. The origin is a literal `red` and not `var()`, because any
|
|
1937
|
+
* declaration containing `var()` passes `@supports` unparsed. Safari 16.4 to
|
|
1938
|
+
* 17.6 implement an earlier draft of relative colour syntax, in which hue
|
|
1939
|
+
* arithmetic needs a unit and a channel cannot go inside `clamp()`, and both
|
|
1940
|
+
* halves of the condition turn them away. Measured in WebKit 16.4 and 17.4.
|
|
1941
|
+
*
|
|
1942
|
+
* `test/styles/relative-colour.test.tsx` holds every value below to the colour
|
|
1943
|
+
* the roles above draw, in both schemes, and names the new value when a tone
|
|
1944
|
+
* stop moves.
|
|
1945
|
+
*/
|
|
1946
|
+
@supports not (
|
|
1947
|
+
(color: oklch(from red l c calc(h + 1))) and
|
|
1948
|
+
(color: color(from red srgb-linear clamp(0, r, 1) g b / min(1, r)))
|
|
1949
|
+
) {
|
|
1950
|
+
:root,
|
|
1951
|
+
[data-mp-scheme='light'] {
|
|
1952
|
+
--_mp-fallback-primary: #0a67a0;
|
|
1953
|
+
--_mp-fallback-on-primary: #ffffff;
|
|
1954
|
+
--_mp-fallback-primary-container: #cfe8fd;
|
|
1955
|
+
--_mp-fallback-on-primary-container: #00213b;
|
|
1956
|
+
--_mp-fallback-secondary: #536574;
|
|
1957
|
+
--_mp-fallback-on-secondary: #ffffff;
|
|
1958
|
+
--_mp-fallback-secondary-container: #d2e7f8;
|
|
1959
|
+
--_mp-fallback-on-secondary-container: #12212e;
|
|
1960
|
+
--_mp-fallback-tertiary: #6b5a7a;
|
|
1961
|
+
--_mp-fallback-on-tertiary: #ffffff;
|
|
1962
|
+
--_mp-fallback-tertiary-container: #eedbff;
|
|
1963
|
+
--_mp-fallback-on-tertiary-container: #271833;
|
|
1964
|
+
--_mp-fallback-surface: #f3fbff;
|
|
1965
|
+
--_mp-fallback-surface-container-low: #eef5fc;
|
|
1966
|
+
--_mp-fallback-surface-container: #e8f1f9;
|
|
1967
|
+
--_mp-fallback-surface-container-high: #e1eaf2;
|
|
1968
|
+
--_mp-fallback-surface-container-highest: #dbe4eb;
|
|
1969
|
+
--_mp-fallback-inverse-surface: #2c3237;
|
|
1970
|
+
--_mp-fallback-inverse-on-surface: #ebf3f9;
|
|
1971
|
+
--_mp-fallback-inverse-primary: #99d0fd;
|
|
1972
|
+
--_mp-fallback-on-surface: #181d21;
|
|
1973
|
+
--_mp-fallback-on-surface-variant: #3f4850;
|
|
1974
|
+
--_mp-fallback-outline: #6f7880;
|
|
1975
|
+
--_mp-fallback-outline-variant: #bec9d2;
|
|
1976
|
+
--_mp-fallback-error: #b3261e;
|
|
1977
|
+
--_mp-fallback-on-error: #ffffff;
|
|
1978
|
+
--_mp-fallback-error-container: #fddbd5;
|
|
1979
|
+
--_mp-fallback-on-error-container: #400705;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
@media (prefers-color-scheme: dark) {
|
|
1983
|
+
:root:not([data-mp-scheme='light']) {
|
|
1984
|
+
--_mp-fallback-primary: #99d0fd;
|
|
1985
|
+
--_mp-fallback-on-primary: #00375b;
|
|
1986
|
+
--_mp-fallback-primary-container: #004e7d;
|
|
1987
|
+
--_mp-fallback-on-primary-container: #cfe8fd;
|
|
1988
|
+
--_mp-fallback-secondary: #b7ccde;
|
|
1989
|
+
--_mp-fallback-on-secondary: #263644;
|
|
1990
|
+
--_mp-fallback-secondary-container: #3b4d5b;
|
|
1991
|
+
--_mp-fallback-on-secondary-container: #d2e7f8;
|
|
1992
|
+
--_mp-fallback-tertiary: #d5bfe7;
|
|
1993
|
+
--_mp-fallback-on-tertiary: #3d2c49;
|
|
1994
|
+
--_mp-fallback-tertiary-container: #534261;
|
|
1995
|
+
--_mp-fallback-on-tertiary-container: #eedbff;
|
|
1996
|
+
--_mp-fallback-surface: #0e1418;
|
|
1997
|
+
--_mp-fallback-surface-container-low: #181d21;
|
|
1998
|
+
--_mp-fallback-surface-container: #1b2126;
|
|
1999
|
+
--_mp-fallback-surface-container-high: #252b30;
|
|
2000
|
+
--_mp-fallback-surface-container-highest: #30363b;
|
|
2001
|
+
--_mp-fallback-inverse-surface: #dbe4eb;
|
|
2002
|
+
--_mp-fallback-inverse-on-surface: #2c3237;
|
|
2003
|
+
--_mp-fallback-inverse-primary: #0a67a0;
|
|
2004
|
+
--_mp-fallback-on-surface: #dbe4eb;
|
|
2005
|
+
--_mp-fallback-on-surface-variant: #bec9d2;
|
|
2006
|
+
--_mp-fallback-outline: #8a939a;
|
|
2007
|
+
--_mp-fallback-outline-variant: #3f4850;
|
|
2008
|
+
--_mp-fallback-error: #f2b8b5;
|
|
2009
|
+
--_mp-fallback-on-error: #650714;
|
|
2010
|
+
--_mp-fallback-error-container: #8e031d;
|
|
2011
|
+
--_mp-fallback-on-error-container: #fedad8;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
[data-mp-scheme='dark'],
|
|
2016
|
+
.dark {
|
|
2017
|
+
--_mp-fallback-primary: #99d0fd;
|
|
2018
|
+
--_mp-fallback-on-primary: #00375b;
|
|
2019
|
+
--_mp-fallback-primary-container: #004e7d;
|
|
2020
|
+
--_mp-fallback-on-primary-container: #cfe8fd;
|
|
2021
|
+
--_mp-fallback-secondary: #b7ccde;
|
|
2022
|
+
--_mp-fallback-on-secondary: #263644;
|
|
2023
|
+
--_mp-fallback-secondary-container: #3b4d5b;
|
|
2024
|
+
--_mp-fallback-on-secondary-container: #d2e7f8;
|
|
2025
|
+
--_mp-fallback-tertiary: #d5bfe7;
|
|
2026
|
+
--_mp-fallback-on-tertiary: #3d2c49;
|
|
2027
|
+
--_mp-fallback-tertiary-container: #534261;
|
|
2028
|
+
--_mp-fallback-on-tertiary-container: #eedbff;
|
|
2029
|
+
--_mp-fallback-surface: #0e1418;
|
|
2030
|
+
--_mp-fallback-surface-container-low: #181d21;
|
|
2031
|
+
--_mp-fallback-surface-container: #1b2126;
|
|
2032
|
+
--_mp-fallback-surface-container-high: #252b30;
|
|
2033
|
+
--_mp-fallback-surface-container-highest: #30363b;
|
|
2034
|
+
--_mp-fallback-inverse-surface: #dbe4eb;
|
|
2035
|
+
--_mp-fallback-inverse-on-surface: #2c3237;
|
|
2036
|
+
--_mp-fallback-inverse-primary: #0a67a0;
|
|
2037
|
+
--_mp-fallback-on-surface: #dbe4eb;
|
|
2038
|
+
--_mp-fallback-on-surface-variant: #bec9d2;
|
|
2039
|
+
--_mp-fallback-outline: #8a939a;
|
|
2040
|
+
--_mp-fallback-outline-variant: #3f4850;
|
|
2041
|
+
--_mp-fallback-error: #f2b8b5;
|
|
2042
|
+
--_mp-fallback-on-error: #650714;
|
|
2043
|
+
--_mp-fallback-error-container: #8e031d;
|
|
2044
|
+
--_mp-fallback-on-error-container: #fedad8;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
*,
|
|
2048
|
+
::before,
|
|
2049
|
+
::after,
|
|
2050
|
+
::backdrop {
|
|
2051
|
+
--_mp-color-primary: var(
|
|
2052
|
+
--mp-sys-color-primary,
|
|
2053
|
+
var(--md-sys-color-primary, var(--_mp-fallback-primary))
|
|
2054
|
+
);
|
|
2055
|
+
--_mp-color-on-primary: var(
|
|
2056
|
+
--mp-sys-color-on-primary,
|
|
2057
|
+
var(--md-sys-color-on-primary, var(--_mp-fallback-on-primary))
|
|
2058
|
+
);
|
|
2059
|
+
--_mp-color-primary-container: var(
|
|
2060
|
+
--mp-sys-color-primary-container,
|
|
2061
|
+
var(--md-sys-color-primary-container, var(--_mp-fallback-primary-container))
|
|
2062
|
+
);
|
|
2063
|
+
--_mp-color-on-primary-container: var(
|
|
2064
|
+
--mp-sys-color-on-primary-container,
|
|
2065
|
+
var(--md-sys-color-on-primary-container, var(--_mp-fallback-on-primary-container))
|
|
2066
|
+
);
|
|
2067
|
+
--_mp-color-secondary: var(
|
|
2068
|
+
--mp-sys-color-secondary,
|
|
2069
|
+
var(--md-sys-color-secondary, var(--_mp-fallback-secondary))
|
|
2070
|
+
);
|
|
2071
|
+
--_mp-color-on-secondary: var(
|
|
2072
|
+
--mp-sys-color-on-secondary,
|
|
2073
|
+
var(--md-sys-color-on-secondary, var(--_mp-fallback-on-secondary))
|
|
2074
|
+
);
|
|
2075
|
+
--_mp-color-secondary-container: var(
|
|
2076
|
+
--mp-sys-color-secondary-container,
|
|
2077
|
+
var(--md-sys-color-secondary-container, var(--_mp-fallback-secondary-container))
|
|
2078
|
+
);
|
|
2079
|
+
--_mp-color-on-secondary-container: var(
|
|
2080
|
+
--mp-sys-color-on-secondary-container,
|
|
2081
|
+
var(--md-sys-color-on-secondary-container, var(--_mp-fallback-on-secondary-container))
|
|
2082
|
+
);
|
|
2083
|
+
--_mp-color-tertiary: var(
|
|
2084
|
+
--mp-sys-color-tertiary,
|
|
2085
|
+
var(--md-sys-color-tertiary, var(--_mp-fallback-tertiary))
|
|
2086
|
+
);
|
|
2087
|
+
--_mp-color-on-tertiary: var(
|
|
2088
|
+
--mp-sys-color-on-tertiary,
|
|
2089
|
+
var(--md-sys-color-on-tertiary, var(--_mp-fallback-on-tertiary))
|
|
2090
|
+
);
|
|
2091
|
+
--_mp-color-tertiary-container: var(
|
|
2092
|
+
--mp-sys-color-tertiary-container,
|
|
2093
|
+
var(--md-sys-color-tertiary-container, var(--_mp-fallback-tertiary-container))
|
|
2094
|
+
);
|
|
2095
|
+
--_mp-color-on-tertiary-container: var(
|
|
2096
|
+
--mp-sys-color-on-tertiary-container,
|
|
2097
|
+
var(--md-sys-color-on-tertiary-container, var(--_mp-fallback-on-tertiary-container))
|
|
2098
|
+
);
|
|
2099
|
+
--_mp-color-surface: var(
|
|
2100
|
+
--mp-sys-color-surface,
|
|
2101
|
+
var(--md-sys-color-surface, var(--_mp-fallback-surface))
|
|
2102
|
+
);
|
|
2103
|
+
--_mp-color-surface-container-low: var(
|
|
2104
|
+
--mp-sys-color-surface-container-low,
|
|
2105
|
+
var(--md-sys-color-surface-container-low, var(--_mp-fallback-surface-container-low))
|
|
2106
|
+
);
|
|
2107
|
+
--_mp-color-surface-container: var(
|
|
2108
|
+
--mp-sys-color-surface-container,
|
|
2109
|
+
var(--md-sys-color-surface-container, var(--_mp-fallback-surface-container))
|
|
2110
|
+
);
|
|
2111
|
+
--_mp-color-surface-container-high: var(
|
|
2112
|
+
--mp-sys-color-surface-container-high,
|
|
2113
|
+
var(--md-sys-color-surface-container-high, var(--_mp-fallback-surface-container-high))
|
|
2114
|
+
);
|
|
2115
|
+
--_mp-color-surface-container-highest: var(
|
|
2116
|
+
--mp-sys-color-surface-container-highest,
|
|
2117
|
+
var(--md-sys-color-surface-container-highest, var(--_mp-fallback-surface-container-highest))
|
|
2118
|
+
);
|
|
2119
|
+
--_mp-color-inverse-surface: var(
|
|
2120
|
+
--mp-sys-color-inverse-surface,
|
|
2121
|
+
var(--md-sys-color-inverse-surface, var(--_mp-fallback-inverse-surface))
|
|
2122
|
+
);
|
|
2123
|
+
--_mp-color-inverse-on-surface: var(
|
|
2124
|
+
--mp-sys-color-inverse-on-surface,
|
|
2125
|
+
var(--md-sys-color-inverse-on-surface, var(--_mp-fallback-inverse-on-surface))
|
|
2126
|
+
);
|
|
2127
|
+
--_mp-color-inverse-primary: var(
|
|
2128
|
+
--mp-sys-color-inverse-primary,
|
|
2129
|
+
var(--md-sys-color-inverse-primary, var(--_mp-fallback-inverse-primary))
|
|
2130
|
+
);
|
|
2131
|
+
--_mp-color-on-surface: var(
|
|
2132
|
+
--mp-sys-color-on-surface,
|
|
2133
|
+
var(--md-sys-color-on-surface, var(--_mp-fallback-on-surface))
|
|
2134
|
+
);
|
|
2135
|
+
--_mp-color-on-surface-variant: var(
|
|
2136
|
+
--mp-sys-color-on-surface-variant,
|
|
2137
|
+
var(--md-sys-color-on-surface-variant, var(--_mp-fallback-on-surface-variant))
|
|
2138
|
+
);
|
|
2139
|
+
--_mp-color-outline: var(
|
|
2140
|
+
--mp-sys-color-outline,
|
|
2141
|
+
var(--md-sys-color-outline, var(--_mp-fallback-outline))
|
|
2142
|
+
);
|
|
2143
|
+
--_mp-color-outline-variant: var(
|
|
2144
|
+
--mp-sys-color-outline-variant,
|
|
2145
|
+
var(--md-sys-color-outline-variant, var(--_mp-fallback-outline-variant))
|
|
2146
|
+
);
|
|
2147
|
+
--_mp-color-error: var(
|
|
2148
|
+
--mp-sys-color-error,
|
|
2149
|
+
var(--md-sys-color-error, var(--_mp-fallback-error))
|
|
2150
|
+
);
|
|
2151
|
+
--_mp-color-on-error: var(
|
|
2152
|
+
--mp-sys-color-on-error,
|
|
2153
|
+
var(--md-sys-color-on-error, var(--_mp-fallback-on-error))
|
|
2154
|
+
);
|
|
2155
|
+
--_mp-color-error-container: var(
|
|
2156
|
+
--mp-sys-color-error-container,
|
|
2157
|
+
var(--md-sys-color-error-container, var(--_mp-fallback-error-container))
|
|
2158
|
+
);
|
|
2159
|
+
--_mp-color-on-error-container: var(
|
|
2160
|
+
--mp-sys-color-on-error-container,
|
|
2161
|
+
var(--md-sys-color-on-error-container, var(--_mp-fallback-on-error-container))
|
|
2162
|
+
);
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
|
|
819
2166
|
:root {
|
|
820
2167
|
/*
|
|
821
2168
|
* No state opacities here. The spec's disabled treatment — content at 38%,
|
|
@@ -962,18 +2309,26 @@
|
|
|
962
2309
|
--mp-sys-shape-corner-full: 9999px;
|
|
963
2310
|
|
|
964
2311
|
/*
|
|
965
|
-
* Elevation.
|
|
966
|
-
*
|
|
967
|
-
*
|
|
968
|
-
*
|
|
2312
|
+
* Elevation. MD3's five raised levels, all of them, because `elevation` is a
|
|
2313
|
+
* prop now and a caller who can name a level has to find it defined — a
|
|
2314
|
+
* ladder with holes in it is worse than no ladder. The first three are what
|
|
2315
|
+
* the components themselves read: an elevated button rests at 1 and rises to
|
|
2316
|
+
* 2 under the pointer, a menu floats at 2, and a dialog — which has taken
|
|
2317
|
+
* the page rather than merely covered part of it — sits at 3.
|
|
2318
|
+
*
|
|
2319
|
+
* Level 0 has no token because it is not a shadow. It is the absence of one,
|
|
2320
|
+
* which CSS already spells `none`.
|
|
969
2321
|
*
|
|
970
|
-
*
|
|
971
|
-
* ambient one — rather than one blurred box shadow. The pair is what
|
|
972
|
-
* raised surface read as lit from above instead of as a sticker with
|
|
2322
|
+
* Every one is the spec's own two-shadow recipe — a tight key shadow plus a
|
|
2323
|
+
* wider ambient one — rather than one blurred box shadow. The pair is what
|
|
2324
|
+
* makes a raised surface read as lit from above instead of as a sticker with
|
|
2325
|
+
* a halo.
|
|
973
2326
|
*/
|
|
974
2327
|
--mp-sys-elevation-level1: 0 1px 2px 0 rgb(0 0 0 / 0.3), 0 1px 3px 1px rgb(0 0 0 / 0.15);
|
|
975
2328
|
--mp-sys-elevation-level2: 0 1px 2px 0 rgb(0 0 0 / 0.3), 0 2px 6px 2px rgb(0 0 0 / 0.15);
|
|
976
2329
|
--mp-sys-elevation-level3: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 4px 8px 3px rgb(0 0 0 / 0.15);
|
|
2330
|
+
--mp-sys-elevation-level4: 0 2px 3px 0 rgb(0 0 0 / 0.3), 0 6px 10px 4px rgb(0 0 0 / 0.15);
|
|
2331
|
+
--mp-sys-elevation-level5: 0 4px 4px 0 rgb(0 0 0 / 0.3), 0 8px 12px 6px rgb(0 0 0 / 0.15);
|
|
977
2332
|
|
|
978
2333
|
/*
|
|
979
2334
|
* Motion.
|
|
@@ -1196,10 +2551,66 @@
|
|
|
1196
2551
|
--shadow-mp-1: var(--mp-sys-elevation-level1);
|
|
1197
2552
|
--shadow-mp-2: var(--mp-sys-elevation-level2);
|
|
1198
2553
|
--shadow-mp-3: var(--mp-sys-elevation-level3);
|
|
2554
|
+
--shadow-mp-4: var(--mp-sys-elevation-level4);
|
|
2555
|
+
--shadow-mp-5: var(--mp-sys-elevation-level5);
|
|
1199
2556
|
|
|
1200
2557
|
--ease-mp-standard: var(--mp-sys-motion-easing-standard);
|
|
1201
2558
|
}
|
|
1202
2559
|
|
|
2560
|
+
/* ---------------------------------------------------------------------------
|
|
2561
|
+
* The window size classes
|
|
2562
|
+
*
|
|
2563
|
+
* Material's five, as variants: `@variant mp-medium` is what every width-driven
|
|
2564
|
+
* rule in this file is written against, and `mp-medium:flex` is the same
|
|
2565
|
+
* boundary for a consumer's own utilities — which until now was a block of CSS
|
|
2566
|
+
* in the grid's documentation for a reader to copy into their own `@theme`.
|
|
2567
|
+
*
|
|
2568
|
+
* `compact` has no variant because its floor is nought. There is no window
|
|
2569
|
+
* narrower than no window, and `mp-below-compact` could never match at all.
|
|
2570
|
+
*
|
|
2571
|
+
* ## Why not `--breakpoint-mp-*` in `@theme`
|
|
2572
|
+
*
|
|
2573
|
+
* Because that namespace is not only a variant. Tailwind's own `.container`
|
|
2574
|
+
* utility is generated from every registered breakpoint, so four names there
|
|
2575
|
+
* would quietly add four `max-width` steps to a class the consumer wrote and
|
|
2576
|
+
* this library has nothing to do with — the same collision the `@theme` block
|
|
2577
|
+
* above prefixes every one of its names to avoid, arriving through a namespace
|
|
2578
|
+
* a prefix does not protect.
|
|
2579
|
+
*
|
|
2580
|
+
* A custom variant registers exactly one thing: the variant.
|
|
2581
|
+
*
|
|
2582
|
+
* ## Moving them
|
|
2583
|
+
*
|
|
2584
|
+
* A project that runs Tailwind itself can, by declaring the same name again
|
|
2585
|
+
* after importing this file — the later definition wins:
|
|
2586
|
+
*
|
|
2587
|
+
* @custom-variant mp-medium (@media (width >= 700px));
|
|
2588
|
+
* @custom-variant mp-below-medium (@media (width < 700px));
|
|
2589
|
+
*
|
|
2590
|
+
* Both halves, because the two are separate registrations rather than one
|
|
2591
|
+
* boundary Tailwind derives a pair from. That moves the grid, the measures and
|
|
2592
|
+
* the visibility rules together, and the application's own `mp-medium:` with
|
|
2593
|
+
* them. A project on the compiled `styles.css` cannot: that file is Tailwind's
|
|
2594
|
+
* output and the queries in it are already numbers.
|
|
2595
|
+
*
|
|
2596
|
+
* The JavaScript half of the same ladder is `WINDOW_MIN` in
|
|
2597
|
+
* `src/internal/window-class.ts`, and the two have to agree — a hook that says
|
|
2598
|
+
* `compact` where the stylesheet is laying out `medium` is a page arguing with
|
|
2599
|
+
* itself. `test/styles/breakpoints.test.tsx` reads both and fails if they ever
|
|
2600
|
+
* stop matching, and `MPConfigProvider`'s `breakpoints` is how an application
|
|
2601
|
+
* that moved one here tells the JavaScript side.
|
|
2602
|
+
* ------------------------------------------------------------------------- */
|
|
2603
|
+
|
|
2604
|
+
@custom-variant mp-medium (@media (width >= 600px));
|
|
2605
|
+
@custom-variant mp-expanded (@media (width >= 840px));
|
|
2606
|
+
@custom-variant mp-large (@media (width >= 1200px));
|
|
2607
|
+
@custom-variant mp-extra-large (@media (width >= 1600px));
|
|
2608
|
+
|
|
2609
|
+
@custom-variant mp-below-medium (@media (width < 600px));
|
|
2610
|
+
@custom-variant mp-below-expanded (@media (width < 840px));
|
|
2611
|
+
@custom-variant mp-below-large (@media (width < 1200px));
|
|
2612
|
+
@custom-variant mp-below-extra-large (@media (width < 1600px));
|
|
2613
|
+
|
|
1203
2614
|
/* ---------------------------------------------------------------------------
|
|
1204
2615
|
* The layout grid
|
|
1205
2616
|
*
|
|
@@ -1214,19 +2625,44 @@
|
|
|
1214
2625
|
* `min(span, columns)` is the clamp: `span={99}` fills its row instead of
|
|
1215
2626
|
* running off the page, which is what the caller meant.
|
|
1216
2627
|
*
|
|
1217
|
-
* `span="grow"`
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
*
|
|
2628
|
+
* `span="grow"` and `span="auto"` are the two widths that are not this
|
|
2629
|
+
* arithmetic, and they are the two ends of it. `'grow'` is the row's remainder,
|
|
2630
|
+
* which nothing here can compute — only the flex algorithm knows what is left
|
|
2631
|
+
* after the other items have been laid out — so a growing item is given a width
|
|
2632
|
+
* of nought and a `flex-grow` of one, and takes the rest. `'auto'` is the width
|
|
2633
|
+
* of what is inside the item, which is `width: auto` and a keyword no `calc()`
|
|
2634
|
+
* produces — so it arrives as the whole declaration rather than as a number
|
|
2635
|
+
* inside one, on the `--_mp-width-*` rung.
|
|
2636
|
+
*
|
|
2637
|
+
* ## The rungs
|
|
2638
|
+
*
|
|
2639
|
+
* A responsive prop writes only the classes the caller named — `span={{ expanded: 6 }}`
|
|
2640
|
+
* is one custom property and not five — which keeps the inline style on a grid
|
|
2641
|
+
* item down to what was asked for, and leaves the stylesheet to fill the gaps.
|
|
2642
|
+
* Every class therefore has to fall back through every class below it.
|
|
2643
|
+
*
|
|
2644
|
+
* Written as one `var()` chain per class that is five levels deep by
|
|
2645
|
+
* `extra-large` and repeated in full in every media block, which is a shape with
|
|
2646
|
+
* two problems: the reader cannot check it, and inserting a class means
|
|
2647
|
+
* rewriting every chain in the file.
|
|
2648
|
+
*
|
|
2649
|
+
* So the fallback is a **ladder**. `--_mp-cols-0` is what the compact slot says,
|
|
2650
|
+
* `--_mp-cols-1` is the medium slot *or the rung below it*, and a media query
|
|
2651
|
+
* moves exactly one rung. The index is the class's place in `WINDOW_CLASSES` —
|
|
2652
|
+
* `src/internal/window-class.ts` — so `-0` is compact and `-3` is large; the top
|
|
2653
|
+
* rung is `extra-large` and takes the plain name, because that is the one the
|
|
2654
|
+
* arithmetic reads and a fifth alias would be a rung to nowhere.
|
|
1221
2655
|
*
|
|
1222
|
-
* Every
|
|
1223
|
-
*
|
|
1224
|
-
* five
|
|
1225
|
-
* DOM lean, and it is paid once here rather than on every grid item in a
|
|
1226
|
-
* consumer's application.
|
|
2656
|
+
* Every fallback is then one level deep however high the ladder goes, and adding
|
|
2657
|
+
* a responsive prop anywhere in the library is this same shape again rather than
|
|
2658
|
+
* five chains of five.
|
|
1227
2659
|
*
|
|
1228
|
-
* The widths
|
|
1229
|
-
*
|
|
2660
|
+
* ## The widths
|
|
2661
|
+
*
|
|
2662
|
+
* `@variant mp-medium` rather than `@media (width >= 600px)`, so the four
|
|
2663
|
+
* boundaries are read from the `@theme` block above rather than written out here
|
|
2664
|
+
* a second time — and a project that runs Tailwind can move them. See the note
|
|
2665
|
+
* on the breakpoints for what that does and does not reach.
|
|
1230
2666
|
*
|
|
1231
2667
|
* Unlayered, like the two animation classes below and for the same reason: a
|
|
1232
2668
|
* layered rule loses to every unlayered one, and a consumer's own page styling
|
|
@@ -1234,28 +2670,177 @@
|
|
|
1234
2670
|
* an application's stylesheet is not a grid.
|
|
1235
2671
|
* ------------------------------------------------------------------------- */
|
|
1236
2672
|
|
|
2673
|
+
/*
|
|
2674
|
+
* The flex container's five axes, each of them resolved per window size class.
|
|
2675
|
+
*
|
|
2676
|
+
* The same four-step fallback the grid's slots use, and for the same reason: a
|
|
2677
|
+
* responsive prop writes only the classes a caller named, so each step falls
|
|
2678
|
+
* back to the one below it and the whole ladder falls back to the property's own
|
|
2679
|
+
* default. `direction={{ compact: 'column', medium: 'row' }}` is two slots, and
|
|
2680
|
+
* a window crossing 600dp changes the layout with nothing re-rendering.
|
|
2681
|
+
*
|
|
2682
|
+
* The `initial` block is the boundary a nested flex needs, exactly as a nested
|
|
2683
|
+
* grid does: these are inline custom properties and a custom property inherits,
|
|
2684
|
+
* so an inner flex that only declared `--_mp-flex-dir-compact` would otherwise
|
|
2685
|
+
* resolve its parent's `--_mp-flex-dir-large` at every class above compact — a
|
|
2686
|
+
* row that is told `row` and comes out a column on a laptop.
|
|
2687
|
+
*/
|
|
2688
|
+
.mp-flex {
|
|
2689
|
+
--_mp-flex-dir-0: var(--_mp-flex-dir-compact, row);
|
|
2690
|
+
--_mp-flex-dir-1: var(--_mp-flex-dir-0);
|
|
2691
|
+
--_mp-flex-dir-2: var(--_mp-flex-dir-1);
|
|
2692
|
+
--_mp-flex-dir-3: var(--_mp-flex-dir-2);
|
|
2693
|
+
--_mp-flex-dir: var(--_mp-flex-dir-3);
|
|
2694
|
+
|
|
2695
|
+
--_mp-flex-wrap-0: var(--_mp-flex-wrap-compact, nowrap);
|
|
2696
|
+
--_mp-flex-wrap-1: var(--_mp-flex-wrap-0);
|
|
2697
|
+
--_mp-flex-wrap-2: var(--_mp-flex-wrap-1);
|
|
2698
|
+
--_mp-flex-wrap-3: var(--_mp-flex-wrap-2);
|
|
2699
|
+
--_mp-flex-wrap: var(--_mp-flex-wrap-3);
|
|
2700
|
+
|
|
2701
|
+
--_mp-flex-justify-0: var(--_mp-flex-justify-compact, flex-start);
|
|
2702
|
+
--_mp-flex-justify-1: var(--_mp-flex-justify-0);
|
|
2703
|
+
--_mp-flex-justify-2: var(--_mp-flex-justify-1);
|
|
2704
|
+
--_mp-flex-justify-3: var(--_mp-flex-justify-2);
|
|
2705
|
+
--_mp-flex-justify: var(--_mp-flex-justify-3);
|
|
2706
|
+
|
|
2707
|
+
--_mp-flex-align-0: var(--_mp-flex-align-compact, stretch);
|
|
2708
|
+
--_mp-flex-align-1: var(--_mp-flex-align-0);
|
|
2709
|
+
--_mp-flex-align-2: var(--_mp-flex-align-1);
|
|
2710
|
+
--_mp-flex-align-3: var(--_mp-flex-align-2);
|
|
2711
|
+
--_mp-flex-align: var(--_mp-flex-align-3);
|
|
2712
|
+
|
|
2713
|
+
--_mp-flex-gap-0: var(--_mp-flex-gap-compact, 0px);
|
|
2714
|
+
--_mp-flex-gap-1: var(--_mp-flex-gap-0);
|
|
2715
|
+
--_mp-flex-gap-2: var(--_mp-flex-gap-1);
|
|
2716
|
+
--_mp-flex-gap-3: var(--_mp-flex-gap-2);
|
|
2717
|
+
--_mp-flex-gap: var(--_mp-flex-gap-3);
|
|
2718
|
+
|
|
2719
|
+
--_mp-flex-dir-compact: initial;
|
|
2720
|
+
--_mp-flex-dir-medium: initial;
|
|
2721
|
+
--_mp-flex-dir-expanded: initial;
|
|
2722
|
+
--_mp-flex-dir-large: initial;
|
|
2723
|
+
--_mp-flex-dir-extra-large: initial;
|
|
2724
|
+
--_mp-flex-wrap-compact: initial;
|
|
2725
|
+
--_mp-flex-wrap-medium: initial;
|
|
2726
|
+
--_mp-flex-wrap-expanded: initial;
|
|
2727
|
+
--_mp-flex-wrap-large: initial;
|
|
2728
|
+
--_mp-flex-wrap-extra-large: initial;
|
|
2729
|
+
--_mp-flex-justify-compact: initial;
|
|
2730
|
+
--_mp-flex-justify-medium: initial;
|
|
2731
|
+
--_mp-flex-justify-expanded: initial;
|
|
2732
|
+
--_mp-flex-justify-large: initial;
|
|
2733
|
+
--_mp-flex-justify-extra-large: initial;
|
|
2734
|
+
--_mp-flex-align-compact: initial;
|
|
2735
|
+
--_mp-flex-align-medium: initial;
|
|
2736
|
+
--_mp-flex-align-expanded: initial;
|
|
2737
|
+
--_mp-flex-align-large: initial;
|
|
2738
|
+
--_mp-flex-align-extra-large: initial;
|
|
2739
|
+
--_mp-flex-gap-compact: initial;
|
|
2740
|
+
--_mp-flex-gap-medium: initial;
|
|
2741
|
+
--_mp-flex-gap-expanded: initial;
|
|
2742
|
+
--_mp-flex-gap-large: initial;
|
|
2743
|
+
--_mp-flex-gap-extra-large: initial;
|
|
2744
|
+
|
|
2745
|
+
flex-direction: var(--_mp-flex-dir);
|
|
2746
|
+
flex-wrap: var(--_mp-flex-wrap);
|
|
2747
|
+
justify-content: var(--_mp-flex-justify);
|
|
2748
|
+
align-items: var(--_mp-flex-align);
|
|
2749
|
+
gap: var(--_mp-flex-gap);
|
|
2750
|
+
|
|
2751
|
+
@variant mp-medium {
|
|
2752
|
+
--_mp-flex-dir-1: var(--_mp-flex-dir-medium, var(--_mp-flex-dir-0));
|
|
2753
|
+
--_mp-flex-wrap-1: var(--_mp-flex-wrap-medium, var(--_mp-flex-wrap-0));
|
|
2754
|
+
--_mp-flex-justify-1: var(--_mp-flex-justify-medium, var(--_mp-flex-justify-0));
|
|
2755
|
+
--_mp-flex-align-1: var(--_mp-flex-align-medium, var(--_mp-flex-align-0));
|
|
2756
|
+
--_mp-flex-gap-1: var(--_mp-flex-gap-medium, var(--_mp-flex-gap-0));
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
@variant mp-expanded {
|
|
2760
|
+
--_mp-flex-dir-2: var(--_mp-flex-dir-expanded, var(--_mp-flex-dir-1));
|
|
2761
|
+
--_mp-flex-wrap-2: var(--_mp-flex-wrap-expanded, var(--_mp-flex-wrap-1));
|
|
2762
|
+
--_mp-flex-justify-2: var(--_mp-flex-justify-expanded, var(--_mp-flex-justify-1));
|
|
2763
|
+
--_mp-flex-align-2: var(--_mp-flex-align-expanded, var(--_mp-flex-align-1));
|
|
2764
|
+
--_mp-flex-gap-2: var(--_mp-flex-gap-expanded, var(--_mp-flex-gap-1));
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
@variant mp-large {
|
|
2768
|
+
--_mp-flex-dir-3: var(--_mp-flex-dir-large, var(--_mp-flex-dir-2));
|
|
2769
|
+
--_mp-flex-wrap-3: var(--_mp-flex-wrap-large, var(--_mp-flex-wrap-2));
|
|
2770
|
+
--_mp-flex-justify-3: var(--_mp-flex-justify-large, var(--_mp-flex-justify-2));
|
|
2771
|
+
--_mp-flex-align-3: var(--_mp-flex-align-large, var(--_mp-flex-align-2));
|
|
2772
|
+
--_mp-flex-gap-3: var(--_mp-flex-gap-large, var(--_mp-flex-gap-2));
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
@variant mp-extra-large {
|
|
2776
|
+
--_mp-flex-dir: var(--_mp-flex-dir-extra-large, var(--_mp-flex-dir-3));
|
|
2777
|
+
--_mp-flex-wrap: var(--_mp-flex-wrap-extra-large, var(--_mp-flex-wrap-3));
|
|
2778
|
+
--_mp-flex-justify: var(--_mp-flex-justify-extra-large, var(--_mp-flex-justify-3));
|
|
2779
|
+
--_mp-flex-align: var(--_mp-flex-align-extra-large, var(--_mp-flex-align-3));
|
|
2780
|
+
--_mp-flex-gap: var(--_mp-flex-gap-extra-large, var(--_mp-flex-gap-3));
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
|
|
1237
2784
|
.mp-grid {
|
|
1238
|
-
--_mp-cols: var(--_mp-cols-compact, 12);
|
|
1239
|
-
--_mp-
|
|
1240
|
-
--_mp-
|
|
2785
|
+
--_mp-cols-0: var(--_mp-cols-compact, 12);
|
|
2786
|
+
--_mp-cols-1: var(--_mp-cols-0);
|
|
2787
|
+
--_mp-cols-2: var(--_mp-cols-1);
|
|
2788
|
+
--_mp-cols-3: var(--_mp-cols-2);
|
|
2789
|
+
--_mp-cols: var(--_mp-cols-3);
|
|
2790
|
+
|
|
2791
|
+
--_mp-gap-x-0: var(--_mp-gap-x-compact, 0px);
|
|
2792
|
+
--_mp-gap-x-1: var(--_mp-gap-x-0);
|
|
2793
|
+
--_mp-gap-x-2: var(--_mp-gap-x-1);
|
|
2794
|
+
--_mp-gap-x-3: var(--_mp-gap-x-2);
|
|
2795
|
+
--_mp-gap-x: var(--_mp-gap-x-3);
|
|
2796
|
+
|
|
2797
|
+
--_mp-gap-y-0: var(--_mp-gap-y-compact, 0px);
|
|
2798
|
+
--_mp-gap-y-1: var(--_mp-gap-y-0);
|
|
2799
|
+
--_mp-gap-y-2: var(--_mp-gap-y-1);
|
|
2800
|
+
--_mp-gap-y-3: var(--_mp-gap-y-2);
|
|
2801
|
+
--_mp-gap-y: var(--_mp-gap-y-3);
|
|
1241
2802
|
|
|
1242
2803
|
/* The boundary, and the reason it has to exist.
|
|
1243
2804
|
*
|
|
1244
|
-
*
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
2805
|
+
* The slots are inline custom properties, and a custom property *inherits*. So
|
|
2806
|
+
* a grid nested inside an item — which is how nesting is spelled — sits inside
|
|
2807
|
+
* that item's `--_mp-span-large`, and an inner item that only declared
|
|
2808
|
+
* `--_mp-span-compact` resolves the outer one at every class above compact:
|
|
2809
|
+
* `span={12}` comes out a sixth of the row it is actually in, and the card
|
|
2810
|
+
* whose title it holds wraps a letter at a time.
|
|
1250
2811
|
*
|
|
1251
2812
|
* A grid is where a span stops meaning anything, so a grid is where the slots
|
|
1252
2813
|
* are put back to nothing. `initial` on a custom property is the guaranteed-
|
|
1253
|
-
* invalid value, which is what makes the `var()` fallbacks
|
|
1254
|
-
* rather than a number from two levels up.
|
|
2814
|
+
* invalid value, which is what makes the `var()` fallbacks above take over
|
|
2815
|
+
* rather than a number from two levels up. Thirty-five declarations, once per
|
|
1255
2816
|
* grid, and the arithmetic under them is the same as it was.
|
|
1256
2817
|
*
|
|
2818
|
+
* The grid's own three are here for the same reason the item's three are, and
|
|
2819
|
+
* were missing: a responsive prop writes only the classes the caller named, so
|
|
2820
|
+
* `columns={6}` on an inner grid is one slot — and an outer
|
|
2821
|
+
* `columns={{ compact: 4, medium: 12 }}` was still being resolved by the inner
|
|
2822
|
+
* grid at every class above compact. Six columns on a phone and twelve on a
|
|
2823
|
+
* laptop, from a grid that was told six.
|
|
2824
|
+
*
|
|
1257
2825
|
* Written on `.mp-grid` rather than on `.mp-grid-item` because an item that
|
|
1258
|
-
* reset its own slots would be resetting the ones it had just been given.
|
|
2826
|
+
* reset its own slots would be resetting the ones it had just been given. The
|
|
2827
|
+
* grid resetting its own is not the same thing: the value it goes on to use
|
|
2828
|
+
* arrives in the `style` attribute, which beats a class either way. */
|
|
2829
|
+
--_mp-cols-compact: initial;
|
|
2830
|
+
--_mp-cols-medium: initial;
|
|
2831
|
+
--_mp-cols-expanded: initial;
|
|
2832
|
+
--_mp-cols-large: initial;
|
|
2833
|
+
--_mp-cols-extra-large: initial;
|
|
2834
|
+
--_mp-gap-x-compact: initial;
|
|
2835
|
+
--_mp-gap-x-medium: initial;
|
|
2836
|
+
--_mp-gap-x-expanded: initial;
|
|
2837
|
+
--_mp-gap-x-large: initial;
|
|
2838
|
+
--_mp-gap-x-extra-large: initial;
|
|
2839
|
+
--_mp-gap-y-compact: initial;
|
|
2840
|
+
--_mp-gap-y-medium: initial;
|
|
2841
|
+
--_mp-gap-y-expanded: initial;
|
|
2842
|
+
--_mp-gap-y-large: initial;
|
|
2843
|
+
--_mp-gap-y-extra-large: initial;
|
|
1259
2844
|
--_mp-span-compact: initial;
|
|
1260
2845
|
--_mp-span-medium: initial;
|
|
1261
2846
|
--_mp-span-expanded: initial;
|
|
@@ -1271,12 +2856,68 @@
|
|
|
1271
2856
|
--_mp-grow-expanded: initial;
|
|
1272
2857
|
--_mp-grow-large: initial;
|
|
1273
2858
|
--_mp-grow-extra-large: initial;
|
|
2859
|
+
--_mp-width-compact: initial;
|
|
2860
|
+
--_mp-width-medium: initial;
|
|
2861
|
+
--_mp-width-expanded: initial;
|
|
2862
|
+
--_mp-width-large: initial;
|
|
2863
|
+
--_mp-width-extra-large: initial;
|
|
2864
|
+
|
|
2865
|
+
@variant mp-medium {
|
|
2866
|
+
--_mp-cols-1: var(--_mp-cols-medium, var(--_mp-cols-0));
|
|
2867
|
+
--_mp-gap-x-1: var(--_mp-gap-x-medium, var(--_mp-gap-x-0));
|
|
2868
|
+
--_mp-gap-y-1: var(--_mp-gap-y-medium, var(--_mp-gap-y-0));
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
@variant mp-expanded {
|
|
2872
|
+
--_mp-cols-2: var(--_mp-cols-expanded, var(--_mp-cols-1));
|
|
2873
|
+
--_mp-gap-x-2: var(--_mp-gap-x-expanded, var(--_mp-gap-x-1));
|
|
2874
|
+
--_mp-gap-y-2: var(--_mp-gap-y-expanded, var(--_mp-gap-y-1));
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
@variant mp-large {
|
|
2878
|
+
--_mp-cols-3: var(--_mp-cols-large, var(--_mp-cols-2));
|
|
2879
|
+
--_mp-gap-x-3: var(--_mp-gap-x-large, var(--_mp-gap-x-2));
|
|
2880
|
+
--_mp-gap-y-3: var(--_mp-gap-y-large, var(--_mp-gap-y-2));
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
@variant mp-extra-large {
|
|
2884
|
+
--_mp-cols: var(--_mp-cols-extra-large, var(--_mp-cols-3));
|
|
2885
|
+
--_mp-gap-x: var(--_mp-gap-x-extra-large, var(--_mp-gap-x-3));
|
|
2886
|
+
--_mp-gap-y: var(--_mp-gap-y-extra-large, var(--_mp-gap-y-3));
|
|
2887
|
+
}
|
|
1274
2888
|
}
|
|
1275
2889
|
|
|
1276
2890
|
.mp-grid-item {
|
|
1277
|
-
--_mp-span: var(--_mp-span-compact, var(--_mp-cols, 12));
|
|
1278
|
-
--_mp-
|
|
1279
|
-
--_mp-
|
|
2891
|
+
--_mp-span-0: var(--_mp-span-compact, var(--_mp-cols, 12));
|
|
2892
|
+
--_mp-span-1: var(--_mp-span-0);
|
|
2893
|
+
--_mp-span-2: var(--_mp-span-1);
|
|
2894
|
+
--_mp-span-3: var(--_mp-span-2);
|
|
2895
|
+
--_mp-span: var(--_mp-span-3);
|
|
2896
|
+
|
|
2897
|
+
--_mp-offset-0: var(--_mp-offset-compact, 0);
|
|
2898
|
+
--_mp-offset-1: var(--_mp-offset-0);
|
|
2899
|
+
--_mp-offset-2: var(--_mp-offset-1);
|
|
2900
|
+
--_mp-offset-3: var(--_mp-offset-2);
|
|
2901
|
+
--_mp-offset: var(--_mp-offset-3);
|
|
2902
|
+
|
|
2903
|
+
--_mp-grow-0: var(--_mp-grow-compact, 0);
|
|
2904
|
+
--_mp-grow-1: var(--_mp-grow-0);
|
|
2905
|
+
--_mp-grow-2: var(--_mp-grow-1);
|
|
2906
|
+
--_mp-grow-3: var(--_mp-grow-2);
|
|
2907
|
+
--_mp-grow: var(--_mp-grow-3);
|
|
2908
|
+
|
|
2909
|
+
/* The one rung that carries a whole width rather than a number, because
|
|
2910
|
+
`span="auto"` is the width of what is inside the item and no arithmetic
|
|
2911
|
+
produces the keyword that says so. `MPGridItem` writes `auto` into the
|
|
2912
|
+
classes that asked for it and the columns below into the ones that did not,
|
|
2913
|
+
which is what stops an `auto` at `compact` reaching a number at `large` —
|
|
2914
|
+
the same job `--_mp-grow`'s explicit `0` does. A span that never mentions
|
|
2915
|
+
`auto` writes none of these and falls straight through to the columns. */
|
|
2916
|
+
--_mp-width-0: var(--_mp-width-compact, var(--_mp-span-width));
|
|
2917
|
+
--_mp-width-1: var(--_mp-width-0);
|
|
2918
|
+
--_mp-width-2: var(--_mp-width-1);
|
|
2919
|
+
--_mp-width-3: var(--_mp-width-2);
|
|
2920
|
+
--_mp-width: var(--_mp-width-3);
|
|
1280
2921
|
|
|
1281
2922
|
/* One column plus one gutter. `--_mp-cols` and `--_mp-gap-x` are inherited
|
|
1282
2923
|
from the grid, so this re-resolves on its own at every window class. */
|
|
@@ -1285,6 +2926,8 @@
|
|
|
1285
2926
|
/* Inseparable from the width under them: the three `flex` longhands stop the
|
|
1286
2927
|
row resizing the item, `min-width` stops a long unbroken word doing the
|
|
1287
2928
|
same, and `box-sizing` is what makes the percentage mean the whole item.
|
|
2929
|
+
`flex-basis: auto` is also the half of `span="auto"` that flex owns — the
|
|
2930
|
+
basis defers to `width`, and there `width` is the keyword itself.
|
|
1288
2931
|
|
|
1289
2932
|
Longhands rather than `flex: 0 0 auto` because `--_mp-grow` is the one part
|
|
1290
2933
|
of the shorthand that varies, and a shorthand cannot be half a variable. */
|
|
@@ -1294,137 +2937,141 @@
|
|
|
1294
2937
|
flex-basis: auto;
|
|
1295
2938
|
min-width: 0;
|
|
1296
2939
|
|
|
1297
|
-
/*
|
|
2940
|
+
/* What a span in columns comes to, and what the rung above falls back to when
|
|
2941
|
+
no class asked for `auto`.
|
|
2942
|
+
|
|
2943
|
+
`1 - grow` is the switch, and it is arithmetic rather than a second
|
|
1298
2944
|
declaration because a custom property cannot choose between two rules.
|
|
1299
2945
|
A growing item measures nought and is then handed the row's remainder by
|
|
1300
2946
|
`flex-grow`, which is the only place that remainder is known; every other
|
|
1301
2947
|
item multiplies its column count by one and is the width it always was. */
|
|
1302
|
-
width: calc(
|
|
2948
|
+
--_mp-span-width: calc(
|
|
1303
2949
|
(1 - var(--_mp-grow)) *
|
|
1304
2950
|
(var(--_mp-track) * min(var(--_mp-span), var(--_mp-cols, 12)) - var(--_mp-gap-x, 0px))
|
|
1305
2951
|
);
|
|
1306
|
-
margin-inline-start: calc(var(--_mp-track) * min(var(--_mp-offset), var(--_mp-cols, 12)));
|
|
1307
|
-
}
|
|
1308
2952
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
--_mp-
|
|
1313
|
-
--_mp-
|
|
2953
|
+
width: var(--_mp-width);
|
|
2954
|
+
|
|
2955
|
+
@variant mp-medium {
|
|
2956
|
+
--_mp-span-1: var(--_mp-span-medium, var(--_mp-span-0));
|
|
2957
|
+
--_mp-offset-1: var(--_mp-offset-medium, var(--_mp-offset-0));
|
|
2958
|
+
--_mp-grow-1: var(--_mp-grow-medium, var(--_mp-grow-0));
|
|
2959
|
+
--_mp-width-1: var(--_mp-width-medium, var(--_mp-width-0));
|
|
1314
2960
|
}
|
|
1315
2961
|
|
|
1316
|
-
|
|
1317
|
-
--_mp-span: var(--_mp-span-
|
|
1318
|
-
--_mp-offset: var(--_mp-offset-
|
|
1319
|
-
--_mp-grow: var(--_mp-grow-
|
|
2962
|
+
@variant mp-expanded {
|
|
2963
|
+
--_mp-span-2: var(--_mp-span-expanded, var(--_mp-span-1));
|
|
2964
|
+
--_mp-offset-2: var(--_mp-offset-expanded, var(--_mp-offset-1));
|
|
2965
|
+
--_mp-grow-2: var(--_mp-grow-expanded, var(--_mp-grow-1));
|
|
2966
|
+
--_mp-width-2: var(--_mp-width-expanded, var(--_mp-width-1));
|
|
1320
2967
|
}
|
|
1321
|
-
}
|
|
1322
2968
|
|
|
1323
|
-
@
|
|
1324
|
-
|
|
1325
|
-
--_mp-
|
|
1326
|
-
--_mp-
|
|
1327
|
-
--_mp-
|
|
2969
|
+
@variant mp-large {
|
|
2970
|
+
--_mp-span-3: var(--_mp-span-large, var(--_mp-span-2));
|
|
2971
|
+
--_mp-offset-3: var(--_mp-offset-large, var(--_mp-offset-2));
|
|
2972
|
+
--_mp-grow-3: var(--_mp-grow-large, var(--_mp-grow-2));
|
|
2973
|
+
--_mp-width-3: var(--_mp-width-large, var(--_mp-width-2));
|
|
1328
2974
|
}
|
|
1329
2975
|
|
|
1330
|
-
|
|
1331
|
-
--_mp-span: var(
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
);
|
|
1335
|
-
--_mp-offset: var(
|
|
1336
|
-
--_mp-offset-expanded,
|
|
1337
|
-
var(--_mp-offset-medium, var(--_mp-offset-compact, 0))
|
|
1338
|
-
);
|
|
1339
|
-
--_mp-grow: var(--_mp-grow-expanded, var(--_mp-grow-medium, var(--_mp-grow-compact, 0)));
|
|
2976
|
+
@variant mp-extra-large {
|
|
2977
|
+
--_mp-span: var(--_mp-span-extra-large, var(--_mp-span-3));
|
|
2978
|
+
--_mp-offset: var(--_mp-offset-extra-large, var(--_mp-offset-3));
|
|
2979
|
+
--_mp-grow: var(--_mp-grow-extra-large, var(--_mp-grow-3));
|
|
2980
|
+
--_mp-width: var(--_mp-width-extra-large, var(--_mp-width-3));
|
|
1340
2981
|
}
|
|
1341
2982
|
}
|
|
1342
2983
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
2984
|
+
/* The offset, on the items that asked for one and no others.
|
|
2985
|
+
`MPGridItem` writes the attribute when an `offset` was passed at all, an
|
|
2986
|
+
explicit `0` included.
|
|
2987
|
+
|
|
2988
|
+
Written unconditionally on `.mp-grid-item` this resolved to `0px` for
|
|
2989
|
+
everybody else — and a declaration of nought is still a declaration. These
|
|
2990
|
+
rules are unlayered, so it beat a caller's own `m-6`, on the inline-start side
|
|
2991
|
+
and on that side alone. Three quarters of a margin is about the hardest thing
|
|
2992
|
+
there is to look at and see. */
|
|
2993
|
+
.mp-grid-item[data-mp-offset] {
|
|
2994
|
+
margin-inline-start: calc(var(--_mp-track) * min(var(--_mp-offset), var(--_mp-cols, 12)));
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
/* ---------------------------------------------------------------------------
|
|
2998
|
+
* The measure
|
|
2999
|
+
*
|
|
3000
|
+
* How wide content is allowed to get, on `MPContainer`, `MPHeader` and
|
|
3001
|
+
* `MPFooter`. The same rungs the grid uses and for the same two reasons: the
|
|
3002
|
+
* value is a length a caller picks at runtime, which Tailwind cannot generate a
|
|
3003
|
+
* class for, and it changes at a window size class, which a media query resolves
|
|
3004
|
+
* without anything re-rendering.
|
|
3005
|
+
*
|
|
3006
|
+
* `none` is the base fallback rather than a width, so an element carrying this
|
|
3007
|
+
* class with nothing set is unbounded — which is what `max-width: none` means
|
|
3008
|
+
* and what a container with no `maxWidth` has always been.
|
|
3009
|
+
*
|
|
3010
|
+
* The slots are reset here for the reason `.mp-grid` resets its own: a container
|
|
3011
|
+
* inside a container, or a header inside either, is the ordinary shape of a page
|
|
3012
|
+
* and the slots inherit. An inner `maxWidth="sm"` writes one declaration, and
|
|
3013
|
+
* without the reset it would resolve the outer element's at every class above
|
|
3014
|
+
* compact — a card that is 600px wide on a phone and 1200 on a laptop, from a
|
|
3015
|
+
* component that was told 600.
|
|
3016
|
+
* ------------------------------------------------------------------------- */
|
|
3017
|
+
|
|
3018
|
+
.mp-measure {
|
|
3019
|
+
--_mp-measure-0: var(--_mp-measure-compact, none);
|
|
3020
|
+
--_mp-measure-1: var(--_mp-measure-0);
|
|
3021
|
+
--_mp-measure-2: var(--_mp-measure-1);
|
|
3022
|
+
--_mp-measure-3: var(--_mp-measure-2);
|
|
3023
|
+
--_mp-measure: var(--_mp-measure-3);
|
|
3024
|
+
|
|
3025
|
+
--_mp-measure-compact: initial;
|
|
3026
|
+
--_mp-measure-medium: initial;
|
|
3027
|
+
--_mp-measure-expanded: initial;
|
|
3028
|
+
--_mp-measure-large: initial;
|
|
3029
|
+
--_mp-measure-extra-large: initial;
|
|
3030
|
+
|
|
3031
|
+
max-width: var(--_mp-measure);
|
|
3032
|
+
|
|
3033
|
+
@variant mp-medium {
|
|
3034
|
+
--_mp-measure-1: var(--_mp-measure-medium, var(--_mp-measure-0));
|
|
1357
3035
|
}
|
|
1358
3036
|
|
|
1359
|
-
|
|
1360
|
-
--_mp-
|
|
1361
|
-
--_mp-span-large,
|
|
1362
|
-
var(--_mp-span-expanded, var(--_mp-span-medium, var(--_mp-span-compact, var(--_mp-cols, 12))))
|
|
1363
|
-
);
|
|
1364
|
-
--_mp-offset: var(
|
|
1365
|
-
--_mp-offset-large,
|
|
1366
|
-
var(--_mp-offset-expanded, var(--_mp-offset-medium, var(--_mp-offset-compact, 0)))
|
|
1367
|
-
);
|
|
1368
|
-
--_mp-grow: var(
|
|
1369
|
-
--_mp-grow-large,
|
|
1370
|
-
var(--_mp-grow-expanded, var(--_mp-grow-medium, var(--_mp-grow-compact, 0)))
|
|
1371
|
-
);
|
|
3037
|
+
@variant mp-expanded {
|
|
3038
|
+
--_mp-measure-2: var(--_mp-measure-expanded, var(--_mp-measure-1));
|
|
1372
3039
|
}
|
|
1373
|
-
}
|
|
1374
3040
|
|
|
1375
|
-
@
|
|
1376
|
-
|
|
1377
|
-
--_mp-cols: var(
|
|
1378
|
-
--_mp-cols-extra-large,
|
|
1379
|
-
var(
|
|
1380
|
-
--_mp-cols-large,
|
|
1381
|
-
var(--_mp-cols-expanded, var(--_mp-cols-medium, var(--_mp-cols-compact, 12)))
|
|
1382
|
-
)
|
|
1383
|
-
);
|
|
1384
|
-
--_mp-gap-x: var(
|
|
1385
|
-
--_mp-gap-x-extra-large,
|
|
1386
|
-
var(
|
|
1387
|
-
--_mp-gap-x-large,
|
|
1388
|
-
var(--_mp-gap-x-expanded, var(--_mp-gap-x-medium, var(--_mp-gap-x-compact, 0px)))
|
|
1389
|
-
)
|
|
1390
|
-
);
|
|
1391
|
-
--_mp-gap-y: var(
|
|
1392
|
-
--_mp-gap-y-extra-large,
|
|
1393
|
-
var(
|
|
1394
|
-
--_mp-gap-y-large,
|
|
1395
|
-
var(--_mp-gap-y-expanded, var(--_mp-gap-y-medium, var(--_mp-gap-y-compact, 0px)))
|
|
1396
|
-
)
|
|
1397
|
-
);
|
|
3041
|
+
@variant mp-large {
|
|
3042
|
+
--_mp-measure-3: var(--_mp-measure-large, var(--_mp-measure-2));
|
|
1398
3043
|
}
|
|
1399
3044
|
|
|
1400
|
-
|
|
1401
|
-
--_mp-
|
|
1402
|
-
--_mp-span-extra-large,
|
|
1403
|
-
var(
|
|
1404
|
-
--_mp-span-large,
|
|
1405
|
-
var(
|
|
1406
|
-
--_mp-span-expanded,
|
|
1407
|
-
var(--_mp-span-medium, var(--_mp-span-compact, var(--_mp-cols, 12)))
|
|
1408
|
-
)
|
|
1409
|
-
)
|
|
1410
|
-
);
|
|
1411
|
-
--_mp-offset: var(
|
|
1412
|
-
--_mp-offset-extra-large,
|
|
1413
|
-
var(
|
|
1414
|
-
--_mp-offset-large,
|
|
1415
|
-
var(--_mp-offset-expanded, var(--_mp-offset-medium, var(--_mp-offset-compact, 0)))
|
|
1416
|
-
)
|
|
1417
|
-
);
|
|
1418
|
-
--_mp-grow: var(
|
|
1419
|
-
--_mp-grow-extra-large,
|
|
1420
|
-
var(
|
|
1421
|
-
--_mp-grow-large,
|
|
1422
|
-
var(--_mp-grow-expanded, var(--_mp-grow-medium, var(--_mp-grow-compact, 0)))
|
|
1423
|
-
)
|
|
1424
|
-
);
|
|
3045
|
+
@variant mp-extra-large {
|
|
3046
|
+
--_mp-measure: var(--_mp-measure-extra-large, var(--_mp-measure-3));
|
|
1425
3047
|
}
|
|
1426
3048
|
}
|
|
1427
3049
|
|
|
3050
|
+
/* ---------------------------------------------------------------------------
|
|
3051
|
+
* Showing at some widths and not others
|
|
3052
|
+
*
|
|
3053
|
+
* The hiding itself is Tailwind's own `hidden` under the variants registered
|
|
3054
|
+
* above — `mp-below-medium:hidden` and its mirror — so there is nothing to write
|
|
3055
|
+
* here for it. `internal/visibility.ts` holds the ten class names, `MPShow` puts
|
|
3056
|
+
* them on, and a consumer can spell the same ones on an element of their own.
|
|
3057
|
+
*
|
|
3058
|
+
* What does need a rule is the wrapper, and only so that there is not one. An
|
|
3059
|
+
* `MPShow` has to be an element — a media query needs something to apply to —
|
|
3060
|
+
* and an element in the middle of a flex row is a flex item that its children
|
|
3061
|
+
* are not. `display: contents` is that element taking no part in the layout: the
|
|
3062
|
+
* children become the items, exactly as if the wrapper were not written.
|
|
3063
|
+
*
|
|
3064
|
+
* `:where()` is the whole of why this is safe to do. The declaration lands at
|
|
3065
|
+
* zero specificity, so a `className` of the caller's own that sets a display —
|
|
3066
|
+
* `flex`, `block`, anything — beats it without a fight, while `hidden`, which is
|
|
3067
|
+
* a real class, still beats both. A wrapper that insisted on `contents` would be
|
|
3068
|
+
* a component that quietly refused to be a box.
|
|
3069
|
+
* ------------------------------------------------------------------------- */
|
|
3070
|
+
|
|
3071
|
+
:where(.mp-show) {
|
|
3072
|
+
display: contents;
|
|
3073
|
+
}
|
|
3074
|
+
|
|
1428
3075
|
/* ---------------------------------------------------------------------------
|
|
1429
3076
|
* Keyframes
|
|
1430
3077
|
*
|
|
@@ -1656,6 +3303,218 @@
|
|
|
1656
3303
|
}
|
|
1657
3304
|
}
|
|
1658
3305
|
|
|
3306
|
+
/* ---------------------------------------------------------------------------
|
|
3307
|
+
* A row arriving in a list
|
|
3308
|
+
*
|
|
3309
|
+
* Two components put rows into a list the reader is already looking at.
|
|
3310
|
+
* `MPTransfer` moves them between its two panels; `MPFilePicker` adds them as
|
|
3311
|
+
* files are chosen or dropped. In both the row simply existed in the next
|
|
3312
|
+
* frame, which on a list of near-identical lines is the one change hardest to
|
|
3313
|
+
* see — a reader who dropped four files onto a list that already had six had
|
|
3314
|
+
* nothing telling them which four were new.
|
|
3315
|
+
*
|
|
3316
|
+
* A keyframe rather than a transition, for the reason the calendar's page turn
|
|
3317
|
+
* above is one: there are no two states to interpolate between. The row was not
|
|
3318
|
+
* there, and a transition needs something that was.
|
|
3319
|
+
*
|
|
3320
|
+
* ## It needs no bookkeeping to run once
|
|
3321
|
+
*
|
|
3322
|
+
* A CSS animation runs when the element it is on is inserted, so a class on
|
|
3323
|
+
* every row animates only the rows the browser has just created. What each
|
|
3324
|
+
* component still has to decide is which rows *count* as arriving: adding the
|
|
3325
|
+
* class to a row that is already on the page starts the animation on it, so a
|
|
3326
|
+
* class written unconditionally would replay the whole list the first time the
|
|
3327
|
+
* set changed. Both components keep the set of values that just landed and put
|
|
3328
|
+
* the class on those.
|
|
3329
|
+
*
|
|
3330
|
+
* ## Why it does not say which way the row came
|
|
3331
|
+
*
|
|
3332
|
+
* `MPTransfer`'s rows arrive from a panel that is physically to one side, and a
|
|
3333
|
+
* slide from that side would say so — the argument the calendar's page turn
|
|
3334
|
+
* makes about direction. It is not worth what it costs here: `translate` is
|
|
3335
|
+
* physical, so the sign has to be flipped under RTL by reading the computed
|
|
3336
|
+
* direction off the element, and it would be a slot `MPFilePicker` has no
|
|
3337
|
+
* answer for. A rise settles a row into a list in either writing direction and
|
|
3338
|
+
* says the one thing both components need said.
|
|
3339
|
+
*
|
|
3340
|
+
* Unlayered, like the keyframes above, and switched off for a reader who asked
|
|
3341
|
+
* for less motion. What is left then is the row appearing, which is where this
|
|
3342
|
+
* started.
|
|
3343
|
+
* ------------------------------------------------------------------------- */
|
|
3344
|
+
|
|
3345
|
+
@keyframes mp-row-arrive {
|
|
3346
|
+
from {
|
|
3347
|
+
opacity: 0;
|
|
3348
|
+
translate: 0 0.25rem;
|
|
3349
|
+
}
|
|
3350
|
+
}
|
|
3351
|
+
|
|
3352
|
+
.mp-row-arrive {
|
|
3353
|
+
animation: mp-row-arrive var(--mp-sys-motion-duration-short4)
|
|
3354
|
+
var(--mp-sys-motion-easing-emphasized-decelerate);
|
|
3355
|
+
}
|
|
3356
|
+
|
|
3357
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3358
|
+
.mp-row-arrive {
|
|
3359
|
+
animation: none;
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3363
|
+
/* ---------------------------------------------------------------------------
|
|
3364
|
+
* A field's supporting line
|
|
3365
|
+
*
|
|
3366
|
+
* The line under a control is drawn only when there is something to say, so a
|
|
3367
|
+
* field that turned invalid grew by a line of text between one frame and the
|
|
3368
|
+
* next — and everything under it on the page moved down by that much. On a form
|
|
3369
|
+
* validated on blur that is the whole page stepping as the reader tabs through
|
|
3370
|
+
* it, which is the layout shift a reader notices most and the one a component
|
|
3371
|
+
* library is in the best position to prevent.
|
|
3372
|
+
*
|
|
3373
|
+
* ## The row rather than a height
|
|
3374
|
+
*
|
|
3375
|
+
* A message is one line or three, depending on what it says and how wide the
|
|
3376
|
+
* field is, and neither this stylesheet nor the component knows which. `1fr` of
|
|
3377
|
+
* a single-row grid is exactly what the message needs and `0fr` is nothing at
|
|
3378
|
+
* all, so the two ends are the real heights rather than a guess big enough to
|
|
3379
|
+
* cover them — the same move `MPFloatingActionButton` makes across its label
|
|
3380
|
+
* and `MPAlert` makes on its way out.
|
|
3381
|
+
*
|
|
3382
|
+
* `overflow: hidden` because the row is smaller than its content for the whole
|
|
3383
|
+
* of the opening, and a message that spilled out of a zero-height row would be
|
|
3384
|
+
* drawn over the control it belongs to.
|
|
3385
|
+
*
|
|
3386
|
+
* ## Two keyframes, because there are two things that happen here
|
|
3387
|
+
*
|
|
3388
|
+
* A field with nothing to say and one with something to say differ by a line of
|
|
3389
|
+
* layout, and that is what `open` is for. A field whose description has been
|
|
3390
|
+
* replaced by an error differs by the words, and the space is already there —
|
|
3391
|
+
* so `swap` is a fade and nothing else. Opening a row that is already open
|
|
3392
|
+
* would collapse the line and re-open it, which is a flinch rather than a
|
|
3393
|
+
* change of message.
|
|
3394
|
+
*
|
|
3395
|
+
* ## Why an attribute rather than a class that is simply always on
|
|
3396
|
+
*
|
|
3397
|
+
* Because a page load is not a change. Every rule here is written against
|
|
3398
|
+
* `data-mp-reveal`, which `internal/SupportingText.tsx` sets only when it has
|
|
3399
|
+
* watched the message change — otherwise a server-rendered form would grow six
|
|
3400
|
+
* description lines out of nothing the moment it hydrated, which is a page
|
|
3401
|
+
* assembling itself in front of a reader who asked for a form.
|
|
3402
|
+
*
|
|
3403
|
+
* That is the same bargain `.mp-calendar__page[data-mp-paged]` makes, and the
|
|
3404
|
+
* component restarts these the same way: there is no rewinding a CSS animation
|
|
3405
|
+
* from React, so `animation-name` is cleared and put back.
|
|
3406
|
+
*
|
|
3407
|
+
* Unlayered, like the keyframes above, and switched off for a reader who asked
|
|
3408
|
+
* for less motion.
|
|
3409
|
+
* ------------------------------------------------------------------------- */
|
|
3410
|
+
|
|
3411
|
+
@keyframes mp-supporting-text-open {
|
|
3412
|
+
from {
|
|
3413
|
+
grid-template-rows: 0fr;
|
|
3414
|
+
opacity: 0;
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3418
|
+
@keyframes mp-supporting-text-swap {
|
|
3419
|
+
from {
|
|
3420
|
+
opacity: 0;
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
.mp-supporting-text__reveal {
|
|
3425
|
+
display: grid;
|
|
3426
|
+
grid-template-rows: 1fr;
|
|
3427
|
+
overflow: hidden;
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
.mp-supporting-text__reveal[data-mp-reveal='open'] {
|
|
3431
|
+
animation: mp-supporting-text-open var(--mp-sys-motion-duration-short4)
|
|
3432
|
+
var(--mp-sys-motion-easing-emphasized-decelerate);
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
.mp-supporting-text__reveal[data-mp-reveal='swap'] {
|
|
3436
|
+
animation: mp-supporting-text-swap var(--mp-sys-motion-duration-short4)
|
|
3437
|
+
var(--mp-sys-motion-easing-standard);
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3441
|
+
.mp-supporting-text__reveal[data-mp-reveal] {
|
|
3442
|
+
animation: none;
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
/* ---------------------------------------------------------------------------
|
|
3447
|
+
* The tab bar's ends
|
|
3448
|
+
*
|
|
3449
|
+
* A bar with more tabs than room has always scrolled — MD3's scrollable tabs,
|
|
3450
|
+
* and `overflow-x: auto` is the whole of it. What it had no way of saying was
|
|
3451
|
+
* that it was scrolling. macOS draws an overlay scrollbar that is not there
|
|
3452
|
+
* until it is used, so a bar with four tabs off the edge and a bar with none
|
|
3453
|
+
* are the same picture; Windows draws a real one, which is a signal and also
|
|
3454
|
+
* fifteen pixels of furniture under the tabs. `MPTabs` hides it on both and
|
|
3455
|
+
* fades the ends instead, which is one answer rather than two halves.
|
|
3456
|
+
*
|
|
3457
|
+
* Hand-written rather than a utility for the reason the grid arithmetic above
|
|
3458
|
+
* is: the gradient reads a value that only exists at run time, and Tailwind
|
|
3459
|
+
* generates classes from strings it can find in the source.
|
|
3460
|
+
*
|
|
3461
|
+
* ## Which end
|
|
3462
|
+
*
|
|
3463
|
+
* `data-mp-overflow` is written by the component from a measurement, and is
|
|
3464
|
+
* absent when everything fits — so a bar that does not overflow carries no mask
|
|
3465
|
+
* at all. Fading an end a reader has already reached would be a lie about
|
|
3466
|
+
* there being more that way, which is the same failure as saying nothing.
|
|
3467
|
+
*
|
|
3468
|
+
* ## Why there are two mask layers
|
|
3469
|
+
*
|
|
3470
|
+
* The divider is the bar's bottom border, and a mask applies to an element's
|
|
3471
|
+
* whole rendering — so a single horizontal gradient fades the hairline out at
|
|
3472
|
+
* both ends along with the tabs. The tabs running on is a fact about the bar;
|
|
3473
|
+
* the divider is the boundary between the bar and the panel under it, and it
|
|
3474
|
+
* runs the full width whatever the bar is doing.
|
|
3475
|
+
*
|
|
3476
|
+
* So the fade is sized to everything *above* the last pixel, and a second,
|
|
3477
|
+
* fully opaque layer covers that pixel. Multiple mask layers composite as
|
|
3478
|
+
* `add` by default, which is what makes this two declarations rather than a
|
|
3479
|
+
* `mask-composite` nobody would guess was load-bearing. `no-repeat` is not
|
|
3480
|
+
* optional: a 1px layer left to tile would run the opaque strip up the whole
|
|
3481
|
+
* bar and there would be no fade at all.
|
|
3482
|
+
* ------------------------------------------------------------------------- */
|
|
3483
|
+
|
|
3484
|
+
.mp-tabs__list[data-mp-overflow] {
|
|
3485
|
+
/* A tab's own inline padding at `md`, so the fade is about one glyph wide —
|
|
3486
|
+
enough to read as an edge that continues, and not so much that the label it
|
|
3487
|
+
runs over stops being a word. */
|
|
3488
|
+
--_mp-tabs-fade: 1.5rem;
|
|
3489
|
+
|
|
3490
|
+
mask-image:
|
|
3491
|
+
linear-gradient(
|
|
3492
|
+
to right,
|
|
3493
|
+
transparent 0,
|
|
3494
|
+
#000 var(--_mp-tabs-fade-left, 0px),
|
|
3495
|
+
#000 calc(100% - var(--_mp-tabs-fade-right, 0px)),
|
|
3496
|
+
transparent 100%
|
|
3497
|
+
),
|
|
3498
|
+
linear-gradient(#000, #000);
|
|
3499
|
+
mask-size:
|
|
3500
|
+
100% calc(100% - 1px),
|
|
3501
|
+
100% 1px;
|
|
3502
|
+
mask-position:
|
|
3503
|
+
top left,
|
|
3504
|
+
bottom left;
|
|
3505
|
+
mask-repeat: no-repeat;
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
.mp-tabs__list[data-mp-overflow='left'],
|
|
3509
|
+
.mp-tabs__list[data-mp-overflow='both'] {
|
|
3510
|
+
--_mp-tabs-fade-left: var(--_mp-tabs-fade);
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
.mp-tabs__list[data-mp-overflow='right'],
|
|
3514
|
+
.mp-tabs__list[data-mp-overflow='both'] {
|
|
3515
|
+
--_mp-tabs-fade-right: var(--_mp-tabs-fade);
|
|
3516
|
+
}
|
|
3517
|
+
|
|
1659
3518
|
/* ---------------------------------------------------------------------------
|
|
1660
3519
|
* Animation
|
|
1661
3520
|
*
|
|
@@ -1704,6 +3563,31 @@
|
|
|
1704
3563
|
animation-play-state: var(--_mp-anim-state, running);
|
|
1705
3564
|
}
|
|
1706
3565
|
|
|
3566
|
+
/*
|
|
3567
|
+
* And the same effects, driven by the reader instead of by a clock.
|
|
3568
|
+
*
|
|
3569
|
+
* Two declarations, and every keyframe below gains a scroll-driven mode. That
|
|
3570
|
+
* is the whole of `timeline="view"`: there is no second set of keyframes and no
|
|
3571
|
+
* component of its own, because a fade tied to a scroll position is not a
|
|
3572
|
+
* different effect from a fade — it is the same one on a different clock.
|
|
3573
|
+
*
|
|
3574
|
+
* The slots are filled only when a caller asks for `view`. `auto` and `normal`
|
|
3575
|
+
* are what this rule already says, so writing them out per instance would be a
|
|
3576
|
+
* hundred and thirty components each carrying the answer nobody changed.
|
|
3577
|
+
*
|
|
3578
|
+
* `@supports` is not optional, and the reason is not the browsers that have
|
|
3579
|
+
* none of this. It is that `animation-timeline` and `animation-range` are two
|
|
3580
|
+
* properties: a browser that took the first and not the second would give an
|
|
3581
|
+
* animation a timeline and no range to run over. Asking for `view()` itself is
|
|
3582
|
+
* asking for the pair.
|
|
3583
|
+
*/
|
|
3584
|
+
@supports (animation-timeline: view()) {
|
|
3585
|
+
.mp-anim {
|
|
3586
|
+
animation-timeline: var(--_mp-anim-timeline, auto);
|
|
3587
|
+
animation-range: var(--_mp-anim-range, normal);
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
|
|
1707
3591
|
@keyframes mp-anim-fade {
|
|
1708
3592
|
from {
|
|
1709
3593
|
opacity: var(--_mp-anim-opacity, 0);
|
|
@@ -1770,6 +3654,42 @@
|
|
|
1770
3654
|
animation-name: mp-anim-rotate;
|
|
1771
3655
|
}
|
|
1772
3656
|
|
|
3657
|
+
/*
|
|
3658
|
+
* Reveal: the content disclosed rather than brought in.
|
|
3659
|
+
*
|
|
3660
|
+
* The only entrance in the set where nothing moves and no colour changes. The
|
|
3661
|
+
* element is where it will be from the first frame and at the ink it will end
|
|
3662
|
+
* at; what changes is how much of it has been uncovered. That is what a title,
|
|
3663
|
+
* a rule or a chart's plot area needs, because for those the *position* is part
|
|
3664
|
+
* of what is being said and an entrance that travels says something else.
|
|
3665
|
+
*
|
|
3666
|
+
* `clip-path` rather than a mask, and rather than a wrapper with `overflow`.
|
|
3667
|
+
* A mask needs a gradient per direction and a second one to undo itself; a
|
|
3668
|
+
* wrapper puts an element into the layout that was not there before, which for
|
|
3669
|
+
* something inside a grid or a flex row changes what it is a child of.
|
|
3670
|
+
* `inset(0)` is already the spelling of "nothing is clipped", so the to-state
|
|
3671
|
+
* needs no slot at all.
|
|
3672
|
+
*
|
|
3673
|
+
* The opacity slot defaults to 1 rather than to 0. A reveal is not a fade, and
|
|
3674
|
+
* the two together read as a much weaker version of either; the components that
|
|
3675
|
+
* want both lower it deliberately.
|
|
3676
|
+
*/
|
|
3677
|
+
@keyframes mp-anim-reveal {
|
|
3678
|
+
from {
|
|
3679
|
+
opacity: var(--_mp-anim-opacity, 1);
|
|
3680
|
+
clip-path: var(--_mp-anim-clip, inset(0 100% 0 0));
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
to {
|
|
3684
|
+
opacity: 1;
|
|
3685
|
+
clip-path: inset(0);
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
.mp-anim-reveal {
|
|
3690
|
+
animation-name: mp-anim-reveal;
|
|
3691
|
+
}
|
|
3692
|
+
|
|
1773
3693
|
/* Symmetric on purpose: a blink that ended anywhere but where it started would
|
|
1774
3694
|
leave the element half drawn whenever the count ran out. */
|
|
1775
3695
|
@keyframes mp-anim-blink {
|
|
@@ -1787,6 +3707,131 @@
|
|
|
1787
3707
|
animation-name: mp-anim-blink;
|
|
1788
3708
|
}
|
|
1789
3709
|
|
|
3710
|
+
/*
|
|
3711
|
+
* Float: the two effects that are not arrivals, and keep their keyframes here
|
|
3712
|
+
* rather than in the shared table.
|
|
3713
|
+
*
|
|
3714
|
+
* `MPAnimation` is what everything with an *entrance* shares, and a shared
|
|
3715
|
+
* lookup table is a tax on everything that imports it — an object literal is
|
|
3716
|
+
* not tree-shaken key by key, so a component reading one pays for the rows it
|
|
3717
|
+
* will never use. Neither of the two below is an arrival: a drift has no
|
|
3718
|
+
* destination and a refusal is an answer rather than a state, so they borrow
|
|
3719
|
+
* the machinery and bring their own frames.
|
|
3720
|
+
*
|
|
3721
|
+
* A drift is four points around the origin rather than one axis, because one
|
|
3722
|
+
* axis is a bob and a bob is a loading indicator. Every keyframe returns
|
|
3723
|
+
* through nothing at 0% and 100%, so an interrupted float leaves the element
|
|
3724
|
+
* where the page put it.
|
|
3725
|
+
*/
|
|
3726
|
+
@keyframes mp-anim-float {
|
|
3727
|
+
0%,
|
|
3728
|
+
100% {
|
|
3729
|
+
translate: 0 0;
|
|
3730
|
+
rotate: 0deg;
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
25% {
|
|
3734
|
+
translate: var(--_mp-anim-x, 0.375rem) calc(-1 * var(--_mp-anim-y, 0.625rem));
|
|
3735
|
+
rotate: var(--_mp-anim-angle, 0deg);
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
50% {
|
|
3739
|
+
translate: 0 calc(-1.5 * var(--_mp-anim-y, 0.625rem));
|
|
3740
|
+
rotate: 0deg;
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3743
|
+
75% {
|
|
3744
|
+
translate: calc(-1 * var(--_mp-anim-x, 0.375rem)) calc(-1 * var(--_mp-anim-y, 0.625rem));
|
|
3745
|
+
rotate: calc(-1 * var(--_mp-anim-angle, 0deg));
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
.mp-anim-float {
|
|
3750
|
+
animation-name: mp-anim-float;
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3753
|
+
/*
|
|
3754
|
+
* Shake: the answer to something that did not work.
|
|
3755
|
+
*
|
|
3756
|
+
* The library's rule is that a **control** never moves, and it holds — but that
|
|
3757
|
+
* rule is about a control's resting states, where movement is a stand-in for
|
|
3758
|
+
* something colour says better. This is not a state. It is a one-off answer to
|
|
3759
|
+
* what the reader just did, it is over in four hundred milliseconds, and there
|
|
3760
|
+
* is no colour that says *that was refused* as plainly.
|
|
3761
|
+
*
|
|
3762
|
+
* Two details it lives or dies by. **Nought and a hundred are home**, so an
|
|
3763
|
+
* interrupted shake does not leave the element sitting to one side of where it
|
|
3764
|
+
* belongs. And the **second half is smaller than the first** — 55% of the
|
|
3765
|
+
* amplitude — because a shake that ends as hard as it started reads as a loop
|
|
3766
|
+
* that was cut off rather than as an answer that finished.
|
|
3767
|
+
*/
|
|
3768
|
+
@keyframes mp-anim-shake {
|
|
3769
|
+
0%,
|
|
3770
|
+
100% {
|
|
3771
|
+
translate: 0 0;
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
20% {
|
|
3775
|
+
translate: calc(-1 * var(--_mp-anim-x, 0.5rem)) 0;
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
40% {
|
|
3779
|
+
translate: var(--_mp-anim-x, 0.5rem) 0;
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
60% {
|
|
3783
|
+
translate: calc(-0.55 * var(--_mp-anim-x, 0.5rem)) 0;
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
80% {
|
|
3787
|
+
translate: calc(0.55 * var(--_mp-anim-x, 0.5rem)) 0;
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
.mp-anim-shake {
|
|
3792
|
+
animation-name: mp-anim-shake;
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
/*
|
|
3796
|
+
* Counter: a number, animated by CSS and only *read* by JavaScript.
|
|
3797
|
+
*
|
|
3798
|
+
* A count up cannot be a keyframe on its own, because text is not an animatable
|
|
3799
|
+
* property — every frame needs a fresh interpolation put through a formatter.
|
|
3800
|
+
* The obvious answer is a `requestAnimationFrame` loop with its own clock, its
|
|
3801
|
+
* own easing and its own idea of what "paused" means, which is three things
|
|
3802
|
+
* that have to be kept in step with the six effects above and will not be.
|
|
3803
|
+
*
|
|
3804
|
+
* So the animation is a real CSS animation over a **registered custom
|
|
3805
|
+
* property**, and the component's rAF loop does nothing but read the value and
|
|
3806
|
+
* format it. The duration, the delay, the easing token, the play state, the
|
|
3807
|
+
* trigger, `prefers-reduced-motion` and `timeline="view"` are then all the same
|
|
3808
|
+
* machinery every other effect uses, rather than a second implementation of
|
|
3809
|
+
* each — and the untriggered state is the first frame for free, because a
|
|
3810
|
+
* paused animation with `fill-mode: both` is sitting on `from`.
|
|
3811
|
+
*
|
|
3812
|
+
* `@property` is what makes it interpolate at all: without a registered syntax
|
|
3813
|
+
* a custom property is a string, and a string animates by swapping at 50%.
|
|
3814
|
+
*/
|
|
3815
|
+
@property --mp-count {
|
|
3816
|
+
syntax: '<number>';
|
|
3817
|
+
initial-value: 0;
|
|
3818
|
+
inherits: false;
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
@keyframes mp-anim-count {
|
|
3822
|
+
from {
|
|
3823
|
+
--mp-count: var(--_mp-anim-from, 0);
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
to {
|
|
3827
|
+
--mp-count: var(--_mp-anim-to, 0);
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
|
|
3831
|
+
.mp-anim-count {
|
|
3832
|
+
animation-name: mp-anim-count;
|
|
3833
|
+
}
|
|
3834
|
+
|
|
1790
3835
|
@media (prefers-reduced-motion: reduce) {
|
|
1791
3836
|
/*
|
|
1792
3837
|
* The Animate components go the other way from the indicators above, and the
|
|
@@ -2048,3 +4093,379 @@
|
|
|
2048
4093
|
animation: none;
|
|
2049
4094
|
}
|
|
2050
4095
|
}
|
|
4096
|
+
|
|
4097
|
+
/* ---------------------------------------------------------------------------
|
|
4098
|
+
* Code blocks
|
|
4099
|
+
*
|
|
4100
|
+
* An MPCodeBlock is the one surface in this library that does **not** take the
|
|
4101
|
+
* page's colour roles, and that is a decision rather than an oversight. Code is
|
|
4102
|
+
* read against a ground chosen for code, and the twelve hues it needs to keep a
|
|
4103
|
+
* keyword apart from a string apart from a number are not the four accent
|
|
4104
|
+
* families MD3 has. A block dyed with `primary` would be a block whose colours
|
|
4105
|
+
* carry no information.
|
|
4106
|
+
*
|
|
4107
|
+
* So the sheet carries slots of its own, `theme` picks which set fills them,
|
|
4108
|
+
* and `auto` — the default — is the one that follows the page's light and dark
|
|
4109
|
+
* the way every other surface here does.
|
|
4110
|
+
*
|
|
4111
|
+
* They are custom properties on the block rather than a stylesheet per theme,
|
|
4112
|
+
* for the reason `internal/animate-core.ts` gives about the effect tables:
|
|
4113
|
+
* nothing here is generated, the component only fills slots, and a fifth theme
|
|
4114
|
+
* is a block of declarations rather than a second copy of the map below. That
|
|
4115
|
+
* is also why `theme` accepts any string — a consumer who writes
|
|
4116
|
+
* `[data-mp-code-theme='ours']` in their own CSS has a theme, with nothing to
|
|
4117
|
+
* register and nothing to import.
|
|
4118
|
+
*
|
|
4119
|
+
* **Five of the slots are derived and are never written per theme.** `dim`,
|
|
4120
|
+
* `rule` and `hover` are a fixed mix of the ground and the ink, and `mark` and
|
|
4121
|
+
* `mark-edge` are the same for a marked line. A custom property resolves its
|
|
4122
|
+
* `var()`s on the element that declares it, and every theme below declares its
|
|
4123
|
+
* `fg` and `bg` on that same element — so the derived five follow whichever
|
|
4124
|
+
* theme won without being restated five times.
|
|
4125
|
+
*
|
|
4126
|
+
* The dark palette is written twice on purpose: once for the pinned `dark`
|
|
4127
|
+
* theme together with `auto` under an explicitly dark page, and once for `auto`
|
|
4128
|
+
* under `prefers-color-scheme`. A media query and a selector list cannot be
|
|
4129
|
+
* folded into one rule, which is the same repetition the scheme block at the
|
|
4130
|
+
* top of this file makes and says so about.
|
|
4131
|
+
*
|
|
4132
|
+
* Every hue is solved against its own ground rather than flipped: the light set
|
|
4133
|
+
* runs dark and saturated on near-white, the dark set light and desaturated on
|
|
4134
|
+
* near-black. The pairs held furthest apart are the ones that sit next to each
|
|
4135
|
+
* other in real code — a string beside a number, a type beside a function name.
|
|
4136
|
+
*
|
|
4137
|
+
* No third-party palettes ship here. One Dark, Dracula, Nord and the rest are
|
|
4138
|
+
* other projects' published work under their own licences, and porting them
|
|
4139
|
+
* into this package would be shipping somebody else's design under this one's
|
|
4140
|
+
* name. The open string above is how to bring the one you read in all day.
|
|
4141
|
+
* ------------------------------------------------------------------------- */
|
|
4142
|
+
|
|
4143
|
+
.mp-code {
|
|
4144
|
+
/* The light set, which is also where `auto` starts. */
|
|
4145
|
+
--mp-code-bg: oklch(98.4% 0.003 262);
|
|
4146
|
+
--mp-code-fg: oklch(30% 0.016 262);
|
|
4147
|
+
|
|
4148
|
+
--mp-code-comment: oklch(58% 0.022 262);
|
|
4149
|
+
--mp-code-keyword: oklch(48% 0.19 322);
|
|
4150
|
+
--mp-code-string: oklch(46% 0.12 148);
|
|
4151
|
+
--mp-code-number: oklch(50% 0.14 48);
|
|
4152
|
+
--mp-code-function: oklch(48% 0.17 264);
|
|
4153
|
+
--mp-code-type: oklch(45% 0.1 214);
|
|
4154
|
+
--mp-code-variable: oklch(45% 0.12 28);
|
|
4155
|
+
--mp-code-tag: oklch(48% 0.18 22);
|
|
4156
|
+
--mp-code-attr: oklch(47% 0.13 82);
|
|
4157
|
+
--mp-code-meta: oklch(52% 0.05 262);
|
|
4158
|
+
--mp-code-add: oklch(45% 0.14 152);
|
|
4159
|
+
--mp-code-del: oklch(48% 0.18 25);
|
|
4160
|
+
|
|
4161
|
+
/* The derived five. Declared once here and never in a theme: they are a mix
|
|
4162
|
+
of that theme's own ground and ink, which resolves on this element. */
|
|
4163
|
+
--mp-code-dim: color-mix(in oklab, var(--mp-code-fg) 58%, var(--mp-code-bg));
|
|
4164
|
+
--mp-code-rule: color-mix(in oklab, var(--mp-code-fg) 14%, transparent);
|
|
4165
|
+
--mp-code-hover: color-mix(in oklab, var(--mp-code-fg) 9%, transparent);
|
|
4166
|
+
|
|
4167
|
+
/* A marked line is neutral rather than dyed with the page's accent family:
|
|
4168
|
+
the block has deliberately refused the page's palette, and a primary wash
|
|
4169
|
+
over it would be the one colour on it that nobody chose. Mixed from the
|
|
4170
|
+
theme's own ink, it is legible on all of them. */
|
|
4171
|
+
--mp-code-mark: color-mix(in oklab, var(--mp-code-fg) 10%, transparent);
|
|
4172
|
+
--mp-code-mark-edge: color-mix(in oklab, var(--mp-code-fg) 45%, transparent);
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4175
|
+
.mp-code[data-mp-code-theme='dark'],
|
|
4176
|
+
:where([data-mp-scheme='dark'], .dark) .mp-code[data-mp-code-theme='auto'] {
|
|
4177
|
+
--mp-code-bg: oklch(19.5% 0.014 262);
|
|
4178
|
+
--mp-code-fg: oklch(90% 0.012 262);
|
|
4179
|
+
|
|
4180
|
+
--mp-code-comment: oklch(60% 0.024 262);
|
|
4181
|
+
--mp-code-keyword: oklch(76% 0.13 324);
|
|
4182
|
+
--mp-code-string: oklch(80% 0.13 148);
|
|
4183
|
+
--mp-code-number: oklch(81% 0.12 62);
|
|
4184
|
+
--mp-code-function: oklch(78% 0.12 258);
|
|
4185
|
+
--mp-code-type: oklch(82% 0.1 210);
|
|
4186
|
+
--mp-code-variable: oklch(82% 0.09 32);
|
|
4187
|
+
--mp-code-tag: oklch(77% 0.13 22);
|
|
4188
|
+
--mp-code-attr: oklch(85% 0.11 92);
|
|
4189
|
+
--mp-code-meta: oklch(70% 0.05 262);
|
|
4190
|
+
--mp-code-add: oklch(80% 0.14 152);
|
|
4191
|
+
--mp-code-del: oklch(75% 0.15 25);
|
|
4192
|
+
}
|
|
4193
|
+
|
|
4194
|
+
@media (prefers-color-scheme: dark) {
|
|
4195
|
+
:root:not([data-mp-scheme='light']) .mp-code[data-mp-code-theme='auto'] {
|
|
4196
|
+
--mp-code-bg: oklch(19.5% 0.014 262);
|
|
4197
|
+
--mp-code-fg: oklch(90% 0.012 262);
|
|
4198
|
+
|
|
4199
|
+
--mp-code-comment: oklch(60% 0.024 262);
|
|
4200
|
+
--mp-code-keyword: oklch(76% 0.13 324);
|
|
4201
|
+
--mp-code-string: oklch(80% 0.13 148);
|
|
4202
|
+
--mp-code-number: oklch(81% 0.12 62);
|
|
4203
|
+
--mp-code-function: oklch(78% 0.12 258);
|
|
4204
|
+
--mp-code-type: oklch(82% 0.1 210);
|
|
4205
|
+
--mp-code-variable: oklch(82% 0.09 32);
|
|
4206
|
+
--mp-code-tag: oklch(77% 0.13 22);
|
|
4207
|
+
--mp-code-attr: oklch(85% 0.11 92);
|
|
4208
|
+
--mp-code-meta: oklch(70% 0.05 262);
|
|
4209
|
+
--mp-code-add: oklch(80% 0.14 152);
|
|
4210
|
+
--mp-code-del: oklch(75% 0.15 25);
|
|
4211
|
+
}
|
|
4212
|
+
}
|
|
4213
|
+
|
|
4214
|
+
/*
|
|
4215
|
+
* `mono` is the one theme built out of the page's own colours, and the only one
|
|
4216
|
+
* with no hue in it at all: the structure is carried by weight and by how far a
|
|
4217
|
+
* run is muted. It is what a block printed on paper, or read by somebody who
|
|
4218
|
+
* cannot separate the hues above, is left with — so it has to stand on its own
|
|
4219
|
+
* rather than read as a degraded copy of a colour theme.
|
|
4220
|
+
*/
|
|
4221
|
+
/*
|
|
4222
|
+
* The `--_mp-color-*` indirections rather than the `--mp-sys-color-*` roles a
|
|
4223
|
+
* consumer sets. The roles are the *input* — undefined unless somebody wrote
|
|
4224
|
+
* one — and the indirections are what the sheet derives from the source colour
|
|
4225
|
+
* when nobody did. A rule that read the role directly would draw nothing at all
|
|
4226
|
+
* on a page that had not overridden it, which is most pages.
|
|
4227
|
+
*/
|
|
4228
|
+
.mp-code[data-mp-code-theme='mono'] {
|
|
4229
|
+
--mp-code-bg: var(--_mp-color-surface-container);
|
|
4230
|
+
--mp-code-fg: var(--_mp-color-on-surface);
|
|
4231
|
+
|
|
4232
|
+
--mp-code-comment: var(--_mp-color-on-surface-variant);
|
|
4233
|
+
--mp-code-keyword: var(--_mp-color-on-surface);
|
|
4234
|
+
--mp-code-string: var(--_mp-color-on-surface-variant);
|
|
4235
|
+
--mp-code-number: var(--_mp-color-on-surface-variant);
|
|
4236
|
+
--mp-code-function: var(--_mp-color-on-surface);
|
|
4237
|
+
--mp-code-type: var(--_mp-color-on-surface);
|
|
4238
|
+
--mp-code-variable: var(--_mp-color-on-surface);
|
|
4239
|
+
--mp-code-tag: var(--_mp-color-on-surface);
|
|
4240
|
+
--mp-code-attr: var(--_mp-color-on-surface-variant);
|
|
4241
|
+
--mp-code-meta: var(--_mp-color-on-surface-variant);
|
|
4242
|
+
--mp-code-add: var(--_mp-color-on-surface);
|
|
4243
|
+
--mp-code-del: var(--_mp-color-on-surface-variant);
|
|
4244
|
+
}
|
|
4245
|
+
|
|
4246
|
+
.mp-code[data-mp-code-theme='mono'] .hljs-keyword,
|
|
4247
|
+
.mp-code[data-mp-code-theme='mono'] .hljs-selector-tag,
|
|
4248
|
+
.mp-code[data-mp-code-theme='mono'] .hljs-title,
|
|
4249
|
+
.mp-code[data-mp-code-theme='mono'] .hljs-tag,
|
|
4250
|
+
.mp-code[data-mp-code-theme='mono'] .hljs-type,
|
|
4251
|
+
.mp-code[data-mp-code-theme='mono'] .hljs-built_in {
|
|
4252
|
+
font-weight: 600;
|
|
4253
|
+
}
|
|
4254
|
+
|
|
4255
|
+
/*
|
|
4256
|
+
* One line.
|
|
4257
|
+
*
|
|
4258
|
+
* A flex row rather than a block, because the number and the prompt are
|
|
4259
|
+
* pseudo-elements that have to sit *before* the code and hold their own width.
|
|
4260
|
+
* `order` is what lets one of them come before the other and both before the
|
|
4261
|
+
* code, since `::after` would otherwise draw last.
|
|
4262
|
+
*
|
|
4263
|
+
* `min-height` keeps a blank line a line high. A flex row with nothing in it is
|
|
4264
|
+
* zero pixels tall, and a block that closed up its own paragraph breaks would
|
|
4265
|
+
* be reflowing the reader's file.
|
|
4266
|
+
*/
|
|
4267
|
+
.mp-code-line {
|
|
4268
|
+
display: flex;
|
|
4269
|
+
min-height: 1.5em;
|
|
4270
|
+
min-height: 1lh;
|
|
4271
|
+
/* Transparent on every line, coloured on a marked one. A border rather than
|
|
4272
|
+
an inset `box-shadow` because `box-shadow` has no logical form and this one
|
|
4273
|
+
has to sit on the *start* edge in both writing directions; drawn on all of
|
|
4274
|
+
them so marking a line does not shift its text two pixels sideways. */
|
|
4275
|
+
border-inline-start: 2px solid transparent;
|
|
4276
|
+
}
|
|
4277
|
+
|
|
4278
|
+
/*
|
|
4279
|
+
* A marked line, and the reason the horizontal padding is on the line rather
|
|
4280
|
+
* than on the box that scrolls it.
|
|
4281
|
+
*
|
|
4282
|
+
* A tint that stopped at the padding would be a stripe floating inside the
|
|
4283
|
+
* block instead of a marked row. With the padding here the line box *is* the
|
|
4284
|
+
* row, so it reaches both edges — and because the lines sit in a
|
|
4285
|
+
* `w-max min-w-full` block, every one of them reaches the same edge whether the
|
|
4286
|
+
* code is narrower than the block or scrolled sideways within it.
|
|
4287
|
+
*/
|
|
4288
|
+
.mp-code-line[data-mark] {
|
|
4289
|
+
background: var(--mp-code-mark);
|
|
4290
|
+
border-inline-start-color: var(--mp-code-mark-edge);
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4293
|
+
.mp-code-line[data-line]::before {
|
|
4294
|
+
content: attr(data-line);
|
|
4295
|
+
order: 0;
|
|
4296
|
+
flex: none;
|
|
4297
|
+
width: var(--mp-code-gutter, 2ch);
|
|
4298
|
+
margin-inline-end: 1.25em;
|
|
4299
|
+
text-align: end;
|
|
4300
|
+
color: var(--mp-code-dim);
|
|
4301
|
+
-webkit-user-select: none;
|
|
4302
|
+
user-select: none;
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
.mp-code-line[data-prompt]::after {
|
|
4306
|
+
content: attr(data-prompt);
|
|
4307
|
+
order: 1;
|
|
4308
|
+
flex: none;
|
|
4309
|
+
margin-inline-end: 0.75em;
|
|
4310
|
+
color: var(--mp-code-dim);
|
|
4311
|
+
-webkit-user-select: none;
|
|
4312
|
+
user-select: none;
|
|
4313
|
+
}
|
|
4314
|
+
|
|
4315
|
+
.mp-code-line > code {
|
|
4316
|
+
order: 2;
|
|
4317
|
+
min-width: 0;
|
|
4318
|
+
font: inherit;
|
|
4319
|
+
background: none;
|
|
4320
|
+
padding: 0;
|
|
4321
|
+
white-space: pre;
|
|
4322
|
+
}
|
|
4323
|
+
|
|
4324
|
+
.mp-code[data-mp-code-wrap='true'] .mp-code-line > code {
|
|
4325
|
+
white-space: pre-wrap;
|
|
4326
|
+
overflow-wrap: anywhere;
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4329
|
+
/*
|
|
4330
|
+
* highlight.js's scopes, mapped onto the twelve slots.
|
|
4331
|
+
*
|
|
4332
|
+
* Grouped by what a run *is* rather than by what highlight.js calls it, because
|
|
4333
|
+
* those names are the union of a hundred and ninety grammars and half of them
|
|
4334
|
+
* are one language's word for another language's idea — `selector-tag`, `tag`
|
|
4335
|
+
* and `name` are all "the thing being declared". The point of the mapping is
|
|
4336
|
+
* that the same idea gets the same colour whatever file it turns up in.
|
|
4337
|
+
*/
|
|
4338
|
+
.mp-code .hljs-comment,
|
|
4339
|
+
.mp-code .hljs-quote {
|
|
4340
|
+
color: var(--mp-code-comment);
|
|
4341
|
+
font-style: italic;
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
.mp-code .hljs-keyword,
|
|
4345
|
+
.mp-code .hljs-literal,
|
|
4346
|
+
.mp-code .hljs-selector-tag,
|
|
4347
|
+
.mp-code .hljs-operator,
|
|
4348
|
+
.mp-code .hljs-doctag,
|
|
4349
|
+
.mp-code .hljs-formula {
|
|
4350
|
+
color: var(--mp-code-keyword);
|
|
4351
|
+
}
|
|
4352
|
+
|
|
4353
|
+
.mp-code .hljs-string,
|
|
4354
|
+
.mp-code .hljs-regexp,
|
|
4355
|
+
.mp-code .hljs-char,
|
|
4356
|
+
.mp-code .hljs-link {
|
|
4357
|
+
color: var(--mp-code-string);
|
|
4358
|
+
}
|
|
4359
|
+
|
|
4360
|
+
.mp-code .hljs-number,
|
|
4361
|
+
.mp-code .hljs-symbol,
|
|
4362
|
+
.mp-code .hljs-bullet {
|
|
4363
|
+
color: var(--mp-code-number);
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4366
|
+
.mp-code .hljs-title,
|
|
4367
|
+
.mp-code .hljs-section,
|
|
4368
|
+
.mp-code .hljs-name,
|
|
4369
|
+
.mp-code .hljs-selector-id,
|
|
4370
|
+
.mp-code .hljs-selector-class {
|
|
4371
|
+
color: var(--mp-code-function);
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4374
|
+
.mp-code .hljs-type,
|
|
4375
|
+
.mp-code .hljs-built_in,
|
|
4376
|
+
.mp-code .hljs-class {
|
|
4377
|
+
color: var(--mp-code-type);
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
.mp-code .hljs-variable,
|
|
4381
|
+
.mp-code .hljs-template-variable,
|
|
4382
|
+
.mp-code .hljs-params,
|
|
4383
|
+
.mp-code .hljs-subst {
|
|
4384
|
+
color: var(--mp-code-variable);
|
|
4385
|
+
}
|
|
4386
|
+
|
|
4387
|
+
.mp-code .hljs-tag,
|
|
4388
|
+
.mp-code .hljs-template-tag {
|
|
4389
|
+
color: var(--mp-code-tag);
|
|
4390
|
+
}
|
|
4391
|
+
|
|
4392
|
+
.mp-code .hljs-attr,
|
|
4393
|
+
.mp-code .hljs-attribute,
|
|
4394
|
+
.mp-code .hljs-property,
|
|
4395
|
+
.mp-code .hljs-selector-attr,
|
|
4396
|
+
.mp-code .hljs-selector-pseudo {
|
|
4397
|
+
color: var(--mp-code-attr);
|
|
4398
|
+
}
|
|
4399
|
+
|
|
4400
|
+
.mp-code .hljs-meta,
|
|
4401
|
+
.mp-code .hljs-punctuation {
|
|
4402
|
+
color: var(--mp-code-meta);
|
|
4403
|
+
}
|
|
4404
|
+
|
|
4405
|
+
.mp-code .hljs-addition {
|
|
4406
|
+
color: var(--mp-code-add);
|
|
4407
|
+
}
|
|
4408
|
+
|
|
4409
|
+
.mp-code .hljs-deletion {
|
|
4410
|
+
color: var(--mp-code-del);
|
|
4411
|
+
}
|
|
4412
|
+
|
|
4413
|
+
.mp-code .hljs-emphasis {
|
|
4414
|
+
font-style: italic;
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
.mp-code .hljs-strong {
|
|
4418
|
+
font-weight: 700;
|
|
4419
|
+
}
|
|
4420
|
+
|
|
4421
|
+
/* ---------------------------------------------------------------------------
|
|
4422
|
+
* The tree's guide lines
|
|
4423
|
+
*
|
|
4424
|
+
* A rail down each level and, in `folder`, an elbow into each row. Real CSS
|
|
4425
|
+
* rather than utilities for the reason the grid's breakpoints are: a rail is a
|
|
4426
|
+
* pseudo-element positioned half an indent *outside* the row it belongs to, and
|
|
4427
|
+
* the rail under a last child is a different height from the rest.
|
|
4428
|
+
* `[&:last-child]:[&::before]:…` is expressible and nobody would want to read
|
|
4429
|
+
* it.
|
|
4430
|
+
*
|
|
4431
|
+
* The two lengths come from the component as custom properties, because both
|
|
4432
|
+
* are on a ladder: the rail sits half an indent out, and the elbow crosses at
|
|
4433
|
+
* half a row's height. Written as numbers here they would be right at one rung
|
|
4434
|
+
* and wrong at the other four.
|
|
4435
|
+
*
|
|
4436
|
+
* `lines="none"` needs no rule at all, which is why there is no class for it.
|
|
4437
|
+
* ------------------------------------------------------------------------- */
|
|
4438
|
+
|
|
4439
|
+
.mp-tree--simple ul[role='group'] > li,
|
|
4440
|
+
.mp-tree--folder ul[role='group'] > li {
|
|
4441
|
+
position: relative;
|
|
4442
|
+
}
|
|
4443
|
+
|
|
4444
|
+
.mp-tree--simple ul[role='group'] > li::before,
|
|
4445
|
+
.mp-tree--folder ul[role='group'] > li::before {
|
|
4446
|
+
content: '';
|
|
4447
|
+
position: absolute;
|
|
4448
|
+
inset-block: 0;
|
|
4449
|
+
inset-inline-start: calc(var(--_mp-tree-indent) / -2);
|
|
4450
|
+
border-inline-start: 1px solid var(--_mp-color-outline-variant);
|
|
4451
|
+
}
|
|
4452
|
+
|
|
4453
|
+
/*
|
|
4454
|
+
* The rail under a last child stops at the row it points at rather than running
|
|
4455
|
+
* on into nothing. That is the whole difference between the two drawings: a
|
|
4456
|
+
* `simple` rail says "this level continues", and a `folder` one says where it
|
|
4457
|
+
* ends.
|
|
4458
|
+
*/
|
|
4459
|
+
.mp-tree--folder ul[role='group'] > li:last-child::before {
|
|
4460
|
+
inset-block-end: auto;
|
|
4461
|
+
block-size: calc(var(--_mp-tree-row) / 2);
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4464
|
+
.mp-tree--folder ul[role='group'] > li::after {
|
|
4465
|
+
content: '';
|
|
4466
|
+
position: absolute;
|
|
4467
|
+
inset-block-start: calc(var(--_mp-tree-row) / 2);
|
|
4468
|
+
inset-inline-start: calc(var(--_mp-tree-indent) / -2);
|
|
4469
|
+
inline-size: calc(var(--_mp-tree-indent) / 2 - 2px);
|
|
4470
|
+
border-block-start: 1px solid var(--_mp-color-outline-variant);
|
|
4471
|
+
}
|