plass-ui 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +668 -0
- package/README.md +1 -1
- package/dist/components/accordion/PlAccordion.js +1 -1
- package/dist/components/alert/PlAlert.js +1 -1
- package/dist/components/anchor/PlAnchor.d.ts +72 -0
- package/dist/components/anchor/PlAnchor.js +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/animate-appear/PlAnimateAppear.d.ts +10 -0
- package/dist/components/animate-appear/PlAnimateAppear.js +1 -1
- package/dist/components/animate-blink/PlAnimateBlink.d.ts +2 -2
- package/dist/components/animate-blink/PlAnimateBlink.js +1 -1
- package/dist/components/animate-counter/PlAnimateCounter.d.ts +83 -0
- package/dist/components/animate-counter/PlAnimateCounter.js +1 -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/PlAnimateFade.d.ts +2 -2
- package/dist/components/animate-fade/PlAnimateFade.js +1 -1
- package/dist/components/animate-float/PlAnimateFloat.d.ts +51 -0
- package/dist/components/animate-float/PlAnimateFloat.js +1 -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/PlAnimateGrow.d.ts +2 -2
- package/dist/components/animate-grow/PlAnimateGrow.js +1 -1
- package/dist/components/animate-headline/PlAnimateHeadline.js +1 -1
- package/dist/components/animate-lighting/PlAnimateLighting.js +1 -1
- package/dist/components/animate-reveal/PlAnimateReveal.d.ts +51 -0
- package/dist/components/animate-reveal/PlAnimateReveal.js +1 -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/PlAnimateRotate.d.ts +2 -2
- package/dist/components/animate-rotate/PlAnimateRotate.js +1 -1
- package/dist/components/animate-scramble/PlAnimateScramble.d.ts +75 -0
- package/dist/components/animate-scramble/PlAnimateScramble.js +1 -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/PlAnimateShake.d.ts +57 -0
- package/dist/components/animate-shake/PlAnimateShake.js +1 -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/PlAnimateSlide.d.ts +2 -2
- package/dist/components/animate-slide/PlAnimateSlide.js +1 -1
- package/dist/components/animate-split/PlAnimateSplit.d.ts +54 -0
- package/dist/components/animate-split/PlAnimateSplit.js +1 -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/PlAnimateTyping.js +1 -1
- package/dist/components/animate-zoom/PlAnimateZoom.d.ts +2 -2
- package/dist/components/animate-zoom/PlAnimateZoom.js +1 -1
- package/dist/components/app-logo/PlAppLogo.d.ts +78 -0
- package/dist/components/app-logo/PlAppLogo.js +1 -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/PlAreaChart.d.ts +54 -0
- package/dist/components/area-chart/PlAreaChart.js +1 -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/PlAspectRatio.js +1 -1
- package/dist/components/avatar/PlAvatar.js +1 -1
- package/dist/components/back-top/PlBackTop.d.ts +55 -0
- package/dist/components/back-top/PlBackTop.js +1 -0
- package/dist/components/back-top/index.d.ts +2 -0
- package/dist/components/back-top/index.js +1 -0
- package/dist/components/badge/PlBadge.js +1 -1
- package/dist/components/bar-chart/PlBarChart.d.ts +63 -0
- package/dist/components/bar-chart/PlBarChart.js +1 -0
- package/dist/components/bar-chart/index.d.ts +2 -0
- package/dist/components/bar-chart/index.js +1 -0
- package/dist/components/blockquote/PlBlockquote.js +1 -1
- package/dist/components/bottom-navigation/PlBottomNavigation.js +1 -1
- package/dist/components/box/PlBox.js +1 -1
- package/dist/components/breadcrumb/PlBreadcrumb.js +1 -1
- package/dist/components/button/PlButton.js +1 -1
- package/dist/components/button-group/PlButtonGroup.js +1 -1
- package/dist/components/calendar/PlCalendar.d.ts +104 -0
- package/dist/components/calendar/PlCalendar.js +1 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/card/PlCard.js +1 -1
- package/dist/components/carousel/PlCarousel.js +1 -1
- package/dist/components/chat-bubble/PlChatBubble.js +1 -1
- package/dist/components/checkbox/PlCheckbox.js +1 -1
- package/dist/components/chip/PlChip.js +1 -1
- package/dist/components/code-block/PlCodeBlock.d.ts +175 -0
- package/dist/components/code-block/PlCodeBlock.js +1 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/collapsible/PlCollapsible.js +1 -1
- package/dist/components/color-picker/PlColorPicker.js +1 -1
- package/dist/components/combobox/PlCombobox.d.ts +11 -2
- package/dist/components/combobox/PlCombobox.js +1 -1
- package/dist/components/command-palette/PlCommandPalette.d.ts +1 -1
- package/dist/components/command-palette/PlCommandPalette.js +1 -1
- package/dist/components/confirm/PlConfirmProvider.d.ts +100 -0
- package/dist/components/confirm/PlConfirmProvider.js +1 -0
- package/dist/components/confirm/index.d.ts +2 -0
- package/dist/components/confirm/index.js +1 -0
- package/dist/components/container/PlContainer.d.ts +22 -6
- package/dist/components/container/PlContainer.js +1 -1
- package/dist/components/data-list/PlDataList.d.ts +74 -0
- package/dist/components/data-list/PlDataList.js +1 -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/PlDataTable.d.ts +202 -0
- package/dist/components/data-table/PlDataTable.js +1 -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/PlDatePicker.d.ts +41 -2
- package/dist/components/date-picker/PlDatePicker.js +1 -1
- package/dist/components/date-range-picker/PlDateRangePicker.js +1 -1
- package/dist/components/date-time-picker/PlDateTimePicker.js +1 -1
- package/dist/components/divider/PlDivider.js +1 -1
- package/dist/components/drawer/PlDrawer.d.ts +1 -1
- package/dist/components/drawer/PlDrawer.js +1 -1
- package/dist/components/empty/PlEmpty.d.ts +47 -0
- package/dist/components/empty/PlEmpty.js +1 -0
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/file-picker/PlFilePicker.js +1 -1
- package/dist/components/flex/PlFlex.d.ts +83 -0
- package/dist/components/flex/PlFlex.js +1 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.js +1 -0
- package/dist/components/floating-action-button/PlFloatingActionButton.d.ts +81 -0
- package/dist/components/floating-action-button/PlFloatingActionButton.js +1 -0
- package/dist/components/floating-action-button/index.d.ts +2 -0
- package/dist/components/floating-action-button/index.js +1 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -1
- package/dist/components/footer/PlFooter.d.ts +4 -3
- package/dist/components/footer/PlFooter.js +1 -1
- package/dist/components/gallery/PlGallery.d.ts +154 -0
- package/dist/components/gallery/PlGallery.js +1 -0
- package/dist/components/gallery/PlGalleryViewer.d.ts +31 -0
- package/dist/components/gallery/PlGalleryViewer.js +1 -0
- package/dist/components/gallery/index.d.ts +2 -0
- package/dist/components/gallery/index.js +1 -0
- package/dist/components/gauge-chart/PlGaugeChart.d.ts +64 -0
- package/dist/components/gauge-chart/PlGaugeChart.js +1 -0
- package/dist/components/gauge-chart/index.d.ts +2 -0
- package/dist/components/gauge-chart/index.js +1 -0
- package/dist/components/grid/PlGrid.js +1 -1
- package/dist/components/grid/PlGridItem.js +1 -1
- package/dist/components/header/PlHeader.d.ts +4 -3
- package/dist/components/header/PlHeader.js +1 -1
- package/dist/components/heatmap-chart/PlHeatmapChart.d.ts +69 -0
- package/dist/components/heatmap-chart/PlHeatmapChart.js +1 -0
- package/dist/components/heatmap-chart/index.d.ts +2 -0
- package/dist/components/heatmap-chart/index.js +1 -0
- package/dist/components/highlight/PlHighlight.js +1 -1
- package/dist/components/hot-keys/PlHotKeys.js +1 -1
- package/dist/components/hover-card/PlHoverCard.d.ts +94 -0
- package/dist/components/hover-card/PlHoverCard.js +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/how-to-steps/PlHowToSteps.d.ts +87 -0
- package/dist/components/how-to-steps/PlHowToSteps.js +1 -0
- package/dist/components/how-to-steps/index.d.ts +2 -0
- package/dist/components/how-to-steps/index.js +1 -0
- package/dist/components/image/PlImage.d.ts +72 -0
- package/dist/components/image/PlImage.js +1 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/image/index.js +1 -0
- package/dist/components/line-chart/PlLineChart.d.ts +74 -0
- package/dist/components/line-chart/PlLineChart.js +1 -0
- package/dist/components/line-chart/index.d.ts +2 -0
- package/dist/components/line-chart/index.js +1 -0
- package/dist/components/list/PlList.js +1 -1
- package/dist/components/menu/PlMenu.d.ts +2 -2
- package/dist/components/menu/PlMenu.js +1 -1
- package/dist/components/menubar/PlMenubar.js +1 -1
- package/dist/components/meter/PlMeter.d.ts +83 -0
- package/dist/components/meter/PlMeter.js +1 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/index.js +1 -0
- package/dist/components/mockup/PlMockup.d.ts +146 -0
- package/dist/components/mockup/PlMockup.js +1 -0
- package/dist/components/mockup/index.d.ts +2 -0
- package/dist/components/mockup/index.js +1 -0
- package/dist/components/modal/PlModal.d.ts +1 -1
- package/dist/components/modal/PlModal.js +1 -1
- package/dist/components/navigation-menu/PlNavigationMenu.js +1 -1
- package/dist/components/number-field/PlNumberField.d.ts +11 -2
- package/dist/components/number-field/PlNumberField.js +1 -1
- package/dist/components/otp-field/PlOtpField.d.ts +10 -1
- package/dist/components/otp-field/PlOtpField.js +1 -1
- package/dist/components/overlay/PlOverlay.d.ts +1 -1
- package/dist/components/overlay/PlOverlay.js +1 -1
- package/dist/components/page-layout/PlPageLayout.js +1 -1
- package/dist/components/pagination/PlPagination.js +1 -1
- package/dist/components/panes/PlPanes.d.ts +2 -2
- package/dist/components/panes/PlPanes.js +1 -1
- package/dist/components/pie-chart/PlPieChart.d.ts +58 -0
- package/dist/components/pie-chart/PlPieChart.js +1 -0
- package/dist/components/pie-chart/index.d.ts +2 -0
- package/dist/components/pie-chart/index.js +1 -0
- package/dist/components/pill/PlPill.js +1 -1
- package/dist/components/popconfirm/PlPopconfirm.d.ts +61 -0
- package/dist/components/popconfirm/PlPopconfirm.js +1 -0
- package/dist/components/popconfirm/index.d.ts +2 -0
- package/dist/components/popconfirm/index.js +1 -0
- package/dist/components/popover/PlPopover.d.ts +1 -1
- package/dist/components/popover/PlPopover.js +1 -1
- package/dist/components/portal/PlPortal.d.ts +78 -0
- package/dist/components/portal/PlPortal.js +1 -0
- package/dist/components/portal/index.d.ts +2 -0
- package/dist/components/portal/index.js +1 -0
- package/dist/components/progress-box/PlProgressBox.js +1 -1
- package/dist/components/progress-circular/PlProgressCircular.js +1 -1
- package/dist/components/progress-linear/PlProgressLinear.js +1 -1
- package/dist/components/radio-group/PlRadioGroup.js +1 -1
- package/dist/components/rating/PlRating.js +1 -1
- package/dist/components/scatter-chart/PlScatterChart.d.ts +46 -0
- package/dist/components/scatter-chart/PlScatterChart.js +1 -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/PlScrollArea.d.ts +98 -0
- package/dist/components/scroll-area/PlScrollArea.js +1 -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/PlScrollZone.d.ts +9 -5
- package/dist/components/scroll-zone/PlScrollZone.js +1 -1
- package/dist/components/segmented-button/PlSegmentedButton.js +1 -1
- package/dist/components/select/PlSelect.d.ts +10 -1
- package/dist/components/select/PlSelect.js +1 -1
- package/dist/components/show/PlShow.d.ts +60 -0
- package/dist/components/show/PlShow.js +1 -0
- package/dist/components/show/index.d.ts +2 -0
- package/dist/components/show/index.js +1 -0
- package/dist/components/sidebar/PlSidebar.js +1 -1
- package/dist/components/skeleton/PlSkeleton.js +1 -1
- package/dist/components/slider/PlSlider.js +1 -1
- package/dist/components/sparkline/PlSparkline.d.ts +68 -0
- package/dist/components/sparkline/PlSparkline.js +1 -0
- package/dist/components/sparkline/index.d.ts +2 -0
- package/dist/components/sparkline/index.js +1 -0
- package/dist/components/spoiler/PlSpoiler.d.ts +8 -0
- package/dist/components/spoiler/PlSpoiler.js +1 -1
- package/dist/components/stack/PlStack.d.ts +114 -0
- package/dist/components/stack/PlStack.js +1 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/stat/PlStat.d.ts +66 -0
- package/dist/components/stat/PlStat.js +1 -0
- package/dist/components/stat/index.d.ts +2 -0
- package/dist/components/stat/index.js +1 -0
- package/dist/components/stepper/PlStepper.d.ts +86 -0
- package/dist/components/stepper/PlStepper.js +1 -0
- package/dist/components/stepper/index.d.ts +2 -0
- package/dist/components/stepper/index.js +1 -0
- package/dist/components/switch/PlSwitch.js +1 -1
- package/dist/components/table/PlTable.js +1 -1
- package/dist/components/tabs/PlTabs.d.ts +2 -2
- package/dist/components/tabs/PlTabs.js +1 -1
- package/dist/components/text-field/PlTextField.d.ts +10 -1
- package/dist/components/text-field/PlTextField.js +1 -1
- package/dist/components/text-link/PlTextLink.js +1 -1
- package/dist/components/time-picker/PlTimePicker.js +1 -1
- package/dist/components/timeline/PlTimeline.d.ts +7 -10
- package/dist/components/timeline/PlTimeline.js +1 -1
- package/dist/components/timeline-chart/PlTimelineChart.d.ts +44 -0
- package/dist/components/timeline-chart/PlTimelineChart.js +1 -0
- package/dist/components/timeline-chart/index.d.ts +2 -0
- package/dist/components/timeline-chart/index.js +1 -0
- package/dist/components/toast/PlToast.d.ts +1 -1
- package/dist/components/toast/PlToast.js +1 -1
- package/dist/components/toggle/PlToggle.js +1 -1
- package/dist/components/toggle/PlToggleGroup.js +1 -1
- package/dist/components/toolbar/PlToolbar.js +1 -1
- package/dist/components/tooltip/PlTooltip.d.ts +1 -1
- package/dist/components/tooltip/PlTooltip.js +1 -1
- package/dist/components/tour/PlTour.d.ts +134 -0
- package/dist/components/tour/PlTour.js +1 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/transfer/PlTransfer.js +1 -1
- package/dist/components/tree/PlTree.d.ts +67 -0
- package/dist/components/tree/PlTree.js +1 -0
- package/dist/components/tree/index.d.ts +2 -0
- package/dist/components/tree/index.js +1 -0
- package/dist/components/tree-select/PlTreeSelect.d.ts +99 -0
- package/dist/components/tree-select/PlTreeSelect.js +1 -0
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/index.js +1 -0
- package/dist/components/visually-hidden/PlVisuallyHidden.d.ts +46 -0
- package/dist/components/visually-hidden/PlVisuallyHidden.js +1 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/index.js +1 -0
- package/dist/components/window-pane/PlWindowPane.d.ts +179 -0
- package/dist/components/window-pane/PlWindowPane.js +1 -0
- package/dist/components/window-pane/index.d.ts +2 -0
- package/dist/components/window-pane/index.js +1 -0
- package/dist/css/anchor.css +2 -0
- package/dist/css/animate-counter.css +2 -0
- package/dist/css/animate-float.css +2 -0
- package/dist/css/animate-reveal.css +2 -0
- package/dist/css/animate-scramble.css +2 -0
- package/dist/css/animate-shake.css +2 -0
- package/dist/css/animate-split.css +2 -0
- package/dist/css/app-logo.css +2 -0
- package/dist/css/area-chart.css +2 -0
- package/dist/css/back-top.css +2 -0
- package/dist/css/bar-chart.css +2 -0
- package/dist/css/calendar.css +2 -0
- package/dist/css/code-block.css +2 -0
- package/dist/css/confirm.css +2 -0
- package/dist/css/data-list.css +2 -0
- package/dist/css/data-table.css +2 -0
- package/dist/css/empty.css +2 -0
- package/dist/css/flex.css +2 -0
- package/dist/css/floating-action-button.css +2 -0
- package/dist/css/gallery.css +2 -0
- package/dist/css/gauge-chart.css +2 -0
- package/dist/css/heatmap-chart.css +2 -0
- package/dist/css/hover-card.css +2 -0
- package/dist/css/how-to-steps.css +2 -0
- package/dist/css/image.css +2 -0
- package/dist/css/line-chart.css +2 -0
- package/dist/css/meter.css +2 -0
- package/dist/css/mockup.css +2 -0
- package/dist/css/pie-chart.css +2 -0
- package/dist/css/popconfirm.css +2 -0
- package/dist/css/portal.css +2 -0
- package/dist/css/scatter-chart.css +2 -0
- package/dist/css/scroll-area.css +2 -0
- package/dist/css/show.css +2 -0
- package/dist/css/sparkline.css +2 -0
- package/dist/css/stack.css +2 -0
- package/dist/css/stat.css +2 -0
- package/dist/css/stepper.css +2 -0
- package/dist/css/timeline-chart.css +2 -0
- package/dist/css/tour.css +2 -0
- package/dist/css/tree-select.css +2 -0
- package/dist/css/tree.css +2 -0
- package/dist/css/visually-hidden.css +2 -0
- package/dist/css/window-pane.css +2 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/usePlBreakpoint.d.ts +41 -0
- package/dist/hooks/usePlBreakpoint.js +1 -0
- package/dist/hooks/usePlColorScheme.d.ts +66 -0
- package/dist/hooks/usePlColorScheme.js +1 -0
- package/dist/hooks/usePlDisclosure.d.ts +44 -0
- package/dist/hooks/usePlDisclosure.js +1 -0
- package/dist/hooks/usePlElementSize.d.ts +31 -0
- package/dist/hooks/usePlElementSize.js +1 -0
- package/dist/hooks/usePlHotKeys.d.ts +81 -0
- package/dist/hooks/usePlHotKeys.js +1 -0
- package/dist/hooks/usePlMediaQuery.d.ts +22 -0
- package/dist/hooks/usePlMediaQuery.js +1 -0
- package/dist/hooks/usePlOnScreen.d.ts +50 -0
- package/dist/hooks/usePlOnScreen.js +1 -0
- package/dist/hooks/usePlReducedMotion.d.ts +22 -0
- package/dist/hooks/usePlReducedMotion.js +1 -0
- package/dist/index.d.ts +46 -1
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +91 -6
- package/dist/internal/animate.js +1 -1
- package/dist/internal/breakpoints.d.ts +31 -0
- package/dist/internal/breakpoints.js +1 -0
- package/dist/internal/button-group.d.ts +29 -2
- package/dist/internal/button-group.js +2 -2
- package/dist/internal/calendar.d.ts +33 -36
- package/dist/internal/calendar.js +1 -1
- package/dist/internal/chart-frame.d.ts +458 -0
- package/dist/internal/chart-frame.js +1 -0
- package/dist/internal/chart-line.d.ts +44 -0
- package/dist/internal/chart-line.js +1 -0
- package/dist/internal/chart.d.ts +473 -0
- package/dist/internal/chart.js +1 -0
- package/dist/internal/color-scheme.d.ts +23 -0
- package/dist/internal/color-scheme.js +1 -0
- package/dist/internal/data-table.d.ts +69 -0
- package/dist/internal/data-table.js +1 -0
- package/dist/internal/date.d.ts +21 -0
- package/dist/internal/date.js +1 -1
- package/dist/internal/defaults.d.ts +74 -0
- package/dist/internal/defaults.js +1 -0
- package/dist/internal/direction.d.ts +4 -0
- package/dist/internal/direction.js +1 -0
- package/dist/internal/drag.d.ts +49 -0
- package/dist/internal/drag.js +1 -0
- package/dist/internal/format.d.ts +2 -0
- package/dist/internal/format.js +1 -1
- package/dist/internal/gallery.d.ts +34 -0
- package/dist/internal/gallery.js +1 -0
- package/dist/internal/grid.d.ts +6 -25
- package/dist/internal/grid.js +1 -1
- package/dist/internal/highlight.d.ts +98 -0
- package/dist/internal/highlight.js +1 -0
- package/dist/internal/icons.d.ts +10 -0
- package/dist/internal/icons.js +1 -1
- package/dist/internal/keys.d.ts +93 -0
- package/dist/internal/keys.js +1 -0
- package/dist/internal/labels.d.ts +138 -0
- package/dist/internal/labels.js +1 -0
- package/dist/internal/media.d.ts +26 -0
- package/dist/internal/media.js +1 -0
- package/dist/internal/mockup.d.ts +193 -0
- package/dist/internal/mockup.js +1 -0
- package/dist/internal/page-layout.d.ts +6 -6
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/progress.d.ts +6 -0
- package/dist/internal/responsive.d.ts +108 -0
- package/dist/internal/responsive.js +1 -0
- package/dist/internal/scramble.d.ts +31 -0
- package/dist/internal/scramble.js +1 -0
- package/dist/internal/steps.d.ts +76 -0
- package/dist/internal/steps.js +1 -0
- package/dist/internal/styles.d.ts +15 -0
- package/dist/internal/styles.js +1 -1
- package/dist/internal/table.d.ts +86 -0
- package/dist/internal/table.js +1 -0
- package/dist/internal/threshold.d.ts +19 -0
- package/dist/internal/threshold.js +1 -0
- package/dist/internal/tour.d.ts +42 -0
- package/dist/internal/tour.js +1 -0
- package/dist/internal/window.d.ts +201 -0
- package/dist/internal/window.js +1 -0
- package/dist/locales/de.d.ts +3 -0
- package/dist/locales/de.js +1 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/es.d.ts +3 -0
- package/dist/locales/es.js +1 -0
- package/dist/locales/fr.d.ts +3 -0
- package/dist/locales/fr.js +1 -0
- package/dist/locales/index.d.ts +33 -0
- package/dist/locales/index.js +1 -0
- package/dist/locales/ja.d.ts +3 -0
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ko.d.ts +3 -0
- package/dist/locales/ko.js +1 -0
- package/dist/locales/zh-Hans.d.ts +3 -0
- package/dist/locales/zh-Hans.js +1 -0
- package/dist/provider/PlColorSchemeScript.d.ts +40 -0
- package/dist/provider/PlColorSchemeScript.js +1 -0
- package/dist/provider/PlassProvider.d.ts +39 -0
- package/dist/provider/PlassProvider.js +1 -0
- package/dist/provider/index.d.ts +6 -0
- package/dist/provider/index.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1133 -20
- package/dist/tokens.css +1133 -20
- package/dist/types.d.ts +398 -2
- package/package.json +30 -4
- package/dist/components/avatar-group/PlAvatarGroup.d.ts +0 -47
- package/dist/components/avatar-group/PlAvatarGroup.js +0 -1
- package/dist/components/avatar-group/index.d.ts +0 -2
- package/dist/components/avatar-group/index.js +0 -1
- package/dist/css/avatar-group.css +0 -2
- package/dist/internal/avatar-group.d.ts +0 -25
- package/dist/internal/avatar-group.js +0 -2
package/dist/tailwind.css
CHANGED
|
@@ -132,6 +132,43 @@
|
|
|
132
132
|
--plass-info-on-solid: #ffffff;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
/* ---------------------------------------------------------------------------
|
|
136
|
+
* The breakpoint ladder
|
|
137
|
+
*
|
|
138
|
+
* Four widths, and **one place they are written down**. Everything in this
|
|
139
|
+
* library that changes with the width of the window reads them: the grid's
|
|
140
|
+
* `@variant` blocks below, the classes that keep a sidebar off a narrow screen,
|
|
141
|
+
* and the `matchMedia` queries `usePlBreakpoint` asks.
|
|
142
|
+
*
|
|
143
|
+
* They are Tailwind's own, which is the whole point — a layout decided by a
|
|
144
|
+
* `md:` utility and a layout decided by this library have to change at the same
|
|
145
|
+
* moment, or a page has two answers about how wide it is. So the source is
|
|
146
|
+
* Tailwind's `--breakpoint-*` theme, and a project that moves one moves both:
|
|
147
|
+
*
|
|
148
|
+
* @theme { --breakpoint-md: 50rem; }
|
|
149
|
+
*
|
|
150
|
+
* A media query's *condition* cannot read a custom property — `@media (width >=
|
|
151
|
+
* var(--x))` is not valid CSS and never will be — so the CSS half cannot follow
|
|
152
|
+
* a value set at runtime. It follows the theme at build time instead, through
|
|
153
|
+
* the `@variant` blocks, and these four tokens are how the **JavaScript** half
|
|
154
|
+
* reads the same answer: it is a value rather than a condition there, so it can
|
|
155
|
+
* be read off the document.
|
|
156
|
+
*
|
|
157
|
+
* The fallback is what makes them safe to read before Tailwind has resolved
|
|
158
|
+
* anything at all — a consumer on the precompiled `plass-ui/styles.css` has our
|
|
159
|
+
* values baked in, and these say what they are.
|
|
160
|
+
*
|
|
161
|
+
* Setting a `--plass-breakpoint-*` directly moves the JavaScript half **and not
|
|
162
|
+
* the CSS half**, which is almost never what anybody wants. Set Tailwind's.
|
|
163
|
+
* ------------------------------------------------------------------------- */
|
|
164
|
+
|
|
165
|
+
:root {
|
|
166
|
+
--plass-breakpoint-sm: var(--breakpoint-sm, 40rem);
|
|
167
|
+
--plass-breakpoint-md: var(--breakpoint-md, 48rem);
|
|
168
|
+
--plass-breakpoint-lg: var(--breakpoint-lg, 64rem);
|
|
169
|
+
--plass-breakpoint-xl: var(--breakpoint-xl, 80rem);
|
|
170
|
+
}
|
|
171
|
+
|
|
135
172
|
/* ---------------------------------------------------------------------------
|
|
136
173
|
* Light theme (default)
|
|
137
174
|
*
|
|
@@ -146,6 +183,14 @@
|
|
|
146
183
|
:root,
|
|
147
184
|
.light,
|
|
148
185
|
[data-theme='light'] {
|
|
186
|
+
/* What the *browser* paints: scrollbars, the caret, a native `<select>`
|
|
187
|
+
popup, a date input's own calendar. None of those is ours to style and all
|
|
188
|
+
of them are white until this says otherwise — a page forced to dark with a
|
|
189
|
+
white scrollbar down the side is a page that looks broken rather than
|
|
190
|
+
themed. Each block states its own, so a forced theme on a nested element
|
|
191
|
+
switches the native furniture inside it too. */
|
|
192
|
+
color-scheme: light;
|
|
193
|
+
|
|
149
194
|
/* Neutral surfaces and content */
|
|
150
195
|
--plass-surface: #ffffff;
|
|
151
196
|
--plass-fg: #1b1e27;
|
|
@@ -257,6 +302,92 @@
|
|
|
257
302
|
--plass-warning-accent: #96600c;
|
|
258
303
|
--plass-danger-accent: #bb3339;
|
|
259
304
|
--plass-info-accent: #1668ae;
|
|
305
|
+
|
|
306
|
+
/* Eight hues in a fixed order, and the one place in the library where a
|
|
307
|
+
colour is not a semantic role.
|
|
308
|
+
|
|
309
|
+
A series is an *entity* — a region, a plan, a competitor — and nothing
|
|
310
|
+
about it says success or danger. What the colour has to do is stay the same
|
|
311
|
+
colour when the chart is filtered, and be tellable apart from its
|
|
312
|
+
neighbours by every reader. So these are not the six families reused: those
|
|
313
|
+
were picked to mean something on a control, they are only six, and two of
|
|
314
|
+
them (`secondary`, `info`) sit close enough in hue that adjacent series
|
|
315
|
+
would collapse.
|
|
316
|
+
|
|
317
|
+
What the eight satisfy, measured against this file's own grounds rather
|
|
318
|
+
than asserted:
|
|
319
|
+
|
|
320
|
+
- every slot at 4:1 or better on white and 4.9:1 or better on the dark
|
|
321
|
+
sheet, so a 2px line is a line;
|
|
322
|
+
- adjacent pairs at least 10.4 apart in OKLab (×100) under simulated
|
|
323
|
+
protanopia and deuteranopia, which is the pair that touches in a stack
|
|
324
|
+
or a legend;
|
|
325
|
+
- chroma at or above 0.10, below which a hue reads as grey and stops
|
|
326
|
+
carrying identity at all.
|
|
327
|
+
|
|
328
|
+
The order is the mechanism, not a preference: slots are handed out in
|
|
329
|
+
sequence and never cycled, which is what keeps the *adjacent* pairs the
|
|
330
|
+
ones that were checked. A ninth series is not a ninth colour; it is an
|
|
331
|
+
"Other" row, or a second chart.
|
|
332
|
+
|
|
333
|
+
Slot one is the page's own `primary`, not a solved hue like the rest — a
|
|
334
|
+
one-series chart should look like it belongs to the page it is on. It is
|
|
335
|
+
the one slot louder than its neighbours (4.9:1 against their 4:1), and
|
|
336
|
+
that is the price. */
|
|
337
|
+
--plass-chart-1: #3f63f2;
|
|
338
|
+
--plass-chart-2: #cf5c00;
|
|
339
|
+
--plass-chart-3: #e23895;
|
|
340
|
+
--plass-chart-4: #997b00;
|
|
341
|
+
--plass-chart-5: #0288b8;
|
|
342
|
+
--plass-chart-6: #039227;
|
|
343
|
+
--plass-chart-7: #a657ed;
|
|
344
|
+
--plass-chart-8: #058f80;
|
|
345
|
+
|
|
346
|
+
/* The sequential ramp — one hue, light to dark, for a mark whose colour is a
|
|
347
|
+
*magnitude* rather than an identity.
|
|
348
|
+
|
|
349
|
+
A different job from the eight above and so a different set, not a subset
|
|
350
|
+
of them. The eight are solved to be as far apart as possible, which is
|
|
351
|
+
exactly what a magnitude must not be: a heatmap coloured from a categorical
|
|
352
|
+
ramp says its cells are five unrelated things. Here the order is the whole
|
|
353
|
+
meaning, so what is solved for is the opposite — one hue throughout,
|
|
354
|
+
lightness strictly falling, and the palest step still at 2.07:1 on the
|
|
355
|
+
sheet, because below that the low end of the scale reads as empty rather
|
|
356
|
+
than as small.
|
|
357
|
+
|
|
358
|
+
Five steps and not a continuous gradient, because a reader cannot rank a
|
|
359
|
+
continuum by eye and can rank five steps against a legend. */
|
|
360
|
+
--plass-chart-seq-1: #95b5ee;
|
|
361
|
+
--plass-chart-seq-2: #6e9aec;
|
|
362
|
+
--plass-chart-seq-3: #477ee8;
|
|
363
|
+
--plass-chart-seq-4: #2763d7;
|
|
364
|
+
--plass-chart-seq-5: #1346ab;
|
|
365
|
+
|
|
366
|
+
/* And the diverging ramp, for a value with a **middle** — a change against
|
|
367
|
+
last quarter, a temperature against the average. Two hues away from a pale
|
|
368
|
+
neutral, so which side of zero a cell is on is the first thing read and how
|
|
369
|
+
far from it the second. The neutral is not white: a cell at zero is a
|
|
370
|
+
reading, and a white cell is a hole in the grid. */
|
|
371
|
+
--plass-chart-div-1: #055d7e;
|
|
372
|
+
--plass-chart-div-2: #2095c5;
|
|
373
|
+
--plass-chart-div-3: #b1b4b9;
|
|
374
|
+
--plass-chart-div-4: #d4614c;
|
|
375
|
+
--plass-chart-div-5: #9a210c;
|
|
376
|
+
|
|
377
|
+
/* What is legible written *on* a ramp step, which flips partway down both.
|
|
378
|
+
A heatmap that writes its numbers in the cells needs this and nothing else
|
|
379
|
+
does. */
|
|
380
|
+
--plass-chart-seq-on-1: var(--plass-fg);
|
|
381
|
+
--plass-chart-seq-on-2: var(--plass-fg);
|
|
382
|
+
--plass-chart-seq-on-3: var(--plass-fg);
|
|
383
|
+
--plass-chart-seq-on-4: var(--plass-surface);
|
|
384
|
+
--plass-chart-seq-on-5: var(--plass-surface);
|
|
385
|
+
|
|
386
|
+
--plass-chart-div-on-1: var(--plass-surface);
|
|
387
|
+
--plass-chart-div-on-2: var(--plass-fg);
|
|
388
|
+
--plass-chart-div-on-3: var(--plass-fg);
|
|
389
|
+
--plass-chart-div-on-4: var(--plass-fg);
|
|
390
|
+
--plass-chart-div-on-5: var(--plass-surface);
|
|
260
391
|
}
|
|
261
392
|
|
|
262
393
|
/* ---------------------------------------------------------------------------
|
|
@@ -270,6 +401,8 @@
|
|
|
270
401
|
|
|
271
402
|
@media (prefers-color-scheme: dark) {
|
|
272
403
|
:root:not(.light):not([data-theme='light']) {
|
|
404
|
+
color-scheme: dark;
|
|
405
|
+
|
|
273
406
|
--plass-surface: #141b30;
|
|
274
407
|
--plass-fg: #e7eaf3;
|
|
275
408
|
--plass-muted-fg: #99a2ba;
|
|
@@ -309,11 +442,46 @@
|
|
|
309
442
|
--plass-warning-accent: #f2b74e;
|
|
310
443
|
--plass-danger-accent: #ff8a8f;
|
|
311
444
|
--plass-info-accent: #5fb4ee;
|
|
445
|
+
|
|
446
|
+
--plass-chart-1: #93a8ff;
|
|
447
|
+
--plass-chart-2: #e66700;
|
|
448
|
+
--plass-chart-3: #ef45a0;
|
|
449
|
+
--plass-chart-4: #b08e05;
|
|
450
|
+
--plass-chart-5: #049fd6;
|
|
451
|
+
--plass-chart-6: #07b031;
|
|
452
|
+
--plass-chart-7: #b264fb;
|
|
453
|
+
--plass-chart-8: #02a998;
|
|
454
|
+
|
|
455
|
+
--plass-chart-seq-1: #294c91;
|
|
456
|
+
--plass-chart-seq-2: #3263c3;
|
|
457
|
+
--plass-chart-seq-3: #3f7cf3;
|
|
458
|
+
--plass-chart-seq-4: #6a9cfb;
|
|
459
|
+
--plass-chart-seq-5: #9ebef8;
|
|
460
|
+
|
|
461
|
+
--plass-chart-div-1: #066082;
|
|
462
|
+
--plass-chart-div-2: #0892c4;
|
|
463
|
+
--plass-chart-div-3: #aeb1b6;
|
|
464
|
+
--plass-chart-div-4: #d15e49;
|
|
465
|
+
--plass-chart-div-5: #9a2b19;
|
|
466
|
+
|
|
467
|
+
--plass-chart-seq-on-1: var(--plass-fg);
|
|
468
|
+
--plass-chart-seq-on-2: var(--plass-fg);
|
|
469
|
+
--plass-chart-seq-on-3: var(--plass-surface);
|
|
470
|
+
--plass-chart-seq-on-4: var(--plass-surface);
|
|
471
|
+
--plass-chart-seq-on-5: var(--plass-surface);
|
|
472
|
+
|
|
473
|
+
--plass-chart-div-on-1: var(--plass-fg);
|
|
474
|
+
--plass-chart-div-on-2: var(--plass-surface);
|
|
475
|
+
--plass-chart-div-on-3: var(--plass-surface);
|
|
476
|
+
--plass-chart-div-on-4: var(--plass-surface);
|
|
477
|
+
--plass-chart-div-on-5: var(--plass-fg);
|
|
312
478
|
}
|
|
313
479
|
}
|
|
314
480
|
|
|
315
481
|
.dark,
|
|
316
482
|
[data-theme='dark'] {
|
|
483
|
+
color-scheme: dark;
|
|
484
|
+
|
|
317
485
|
--plass-surface: #141b30;
|
|
318
486
|
--plass-fg: #e7eaf3;
|
|
319
487
|
--plass-muted-fg: #99a2ba;
|
|
@@ -351,6 +519,39 @@
|
|
|
351
519
|
--plass-warning-accent: #f2b74e;
|
|
352
520
|
--plass-danger-accent: #ff8a8f;
|
|
353
521
|
--plass-info-accent: #5fb4ee;
|
|
522
|
+
|
|
523
|
+
--plass-chart-1: #93a8ff;
|
|
524
|
+
--plass-chart-2: #e66700;
|
|
525
|
+
--plass-chart-3: #ef45a0;
|
|
526
|
+
--plass-chart-4: #b08e05;
|
|
527
|
+
--plass-chart-5: #049fd6;
|
|
528
|
+
--plass-chart-6: #07b031;
|
|
529
|
+
--plass-chart-7: #b264fb;
|
|
530
|
+
--plass-chart-8: #02a998;
|
|
531
|
+
|
|
532
|
+
--plass-chart-seq-1: #294c91;
|
|
533
|
+
--plass-chart-seq-2: #3263c3;
|
|
534
|
+
--plass-chart-seq-3: #3f7cf3;
|
|
535
|
+
--plass-chart-seq-4: #6a9cfb;
|
|
536
|
+
--plass-chart-seq-5: #9ebef8;
|
|
537
|
+
|
|
538
|
+
--plass-chart-div-1: #066082;
|
|
539
|
+
--plass-chart-div-2: #0892c4;
|
|
540
|
+
--plass-chart-div-3: #aeb1b6;
|
|
541
|
+
--plass-chart-div-4: #d15e49;
|
|
542
|
+
--plass-chart-div-5: #9a2b19;
|
|
543
|
+
|
|
544
|
+
--plass-chart-seq-on-1: var(--plass-fg);
|
|
545
|
+
--plass-chart-seq-on-2: var(--plass-fg);
|
|
546
|
+
--plass-chart-seq-on-3: var(--plass-surface);
|
|
547
|
+
--plass-chart-seq-on-4: var(--plass-surface);
|
|
548
|
+
--plass-chart-seq-on-5: var(--plass-surface);
|
|
549
|
+
|
|
550
|
+
--plass-chart-div-on-1: var(--plass-fg);
|
|
551
|
+
--plass-chart-div-on-2: var(--plass-surface);
|
|
552
|
+
--plass-chart-div-on-3: var(--plass-surface);
|
|
553
|
+
--plass-chart-div-on-4: var(--plass-surface);
|
|
554
|
+
--plass-chart-div-on-5: var(--plass-fg);
|
|
354
555
|
}
|
|
355
556
|
|
|
356
557
|
/* ---------------------------------------------------------------------------
|
|
@@ -493,6 +694,24 @@
|
|
|
493
694
|
--plass-info-line: color-mix(in srgb, var(--plass-info-accent) 30%, transparent);
|
|
494
695
|
--plass-info-line-hover: color-mix(in srgb, var(--plass-info-accent) 48%, transparent);
|
|
495
696
|
--plass-info-ring: color-mix(in srgb, var(--plass-info-solid) 55%, transparent);
|
|
697
|
+
/* The three greys a chart draws its frame with, derived so a project that
|
|
698
|
+
re-tones its border moves the grid with it.
|
|
699
|
+
|
|
700
|
+
The grid is the faintest thing on the plot on purpose: a gridline that
|
|
701
|
+
competes with a data line is a reader deciding which is which. The axis is
|
|
702
|
+
the border at full strength, because it is the edge of the picture rather
|
|
703
|
+
than a reading. And the baseline is allowed to be darker than either — it
|
|
704
|
+
is where a bar starts from and where zero is, which is a fact about the
|
|
705
|
+
data rather than furniture. */
|
|
706
|
+
--plass-chart-grid: color-mix(in srgb, var(--plass-border) 70%, transparent);
|
|
707
|
+
--plass-chart-axis: var(--plass-border);
|
|
708
|
+
--plass-chart-baseline: color-mix(in srgb, var(--plass-muted-fg) 35%, transparent);
|
|
709
|
+
/* And the sheet itself, for the 2px between two marks that touch — a
|
|
710
|
+
marker's ring, the seam between two stacked bands, the halo round a
|
|
711
|
+
scatter's dot. It is the surface and not a stroke, because a coloured line
|
|
712
|
+
drawn between two marks is ink that is not data; what separates them is the
|
|
713
|
+
page showing through. */
|
|
714
|
+
--plass-chart-gap: var(--plass-surface);
|
|
496
715
|
}
|
|
497
716
|
|
|
498
717
|
/* ---------------------------------------------------------------------------
|
|
@@ -788,7 +1007,152 @@
|
|
|
788
1007
|
}
|
|
789
1008
|
|
|
790
1009
|
/* ---------------------------------------------------------------------------
|
|
791
|
-
*
|
|
1010
|
+
* A strip that runs off the end of its own box
|
|
1011
|
+
*
|
|
1012
|
+
* A row that scrolls has to say so, and on a Mac it cannot: the scrollbar is an
|
|
1013
|
+
* overlay that appears while the strip is moving and is invisible the rest of
|
|
1014
|
+
* the time, which is every moment a reader is deciding whether there is
|
|
1015
|
+
* anything more to look at. On Windows the same bar is fifteen pixels of
|
|
1016
|
+
* permanent furniture under a row of tab labels. Neither is a signal, so both
|
|
1017
|
+
* are taken away and the ends are faded instead — and *only* the end that still
|
|
1018
|
+
* has something behind it, which is the part that makes it a signal rather than
|
|
1019
|
+
* a decoration.
|
|
1020
|
+
*
|
|
1021
|
+
* The fade is a `mask-image` rather than two gradient overlays because a bar
|
|
1022
|
+
* can sit on anything. An overlay has to be painted in the colour of whatever
|
|
1023
|
+
* is behind the strip, and a component does not know that: a `PlTabs` inside a
|
|
1024
|
+
* `PlCard` inside a tinted section has three candidate backgrounds and no way
|
|
1025
|
+
* to choose. A mask takes the pixels away instead, so whatever is behind shows
|
|
1026
|
+
* through and the answer is right on every surface.
|
|
1027
|
+
*
|
|
1028
|
+
* The two lengths are per-instance slots because *which* end fades is measured
|
|
1029
|
+
* rather than declared — it depends on how far along the strip is, which no
|
|
1030
|
+
* prop can know. `0px` on both ends is a gradient with no transition in it at
|
|
1031
|
+
* all, so a strip that fits is not paying for a mask it does not need.
|
|
1032
|
+
*
|
|
1033
|
+
* They are physical (`left`, `right`) while the state the component publishes
|
|
1034
|
+
* is logical, and the split is the same one `PlTabs` already makes for its
|
|
1035
|
+
* indicator: a CSS gradient runs in a physical direction and a reader runs in
|
|
1036
|
+
* a writing direction, so the measurement is turned round once, here, rather
|
|
1037
|
+
* than in four places that could disagree.
|
|
1038
|
+
*
|
|
1039
|
+
* The mask is dropped entirely while something inside holds a visible focus
|
|
1040
|
+
* ring. Focusing a tab scrolls it flush against the edge it came from, which is
|
|
1041
|
+
* exactly where the fade is strongest — so the one control whose outline has to
|
|
1042
|
+
* be legible would be the one drawn half transparent. `:focus-visible` and not
|
|
1043
|
+
* `:focus-within`: a tab that was clicked has the focus and no ring, and a bar
|
|
1044
|
+
* that stopped fading for the rest of the session because somebody pressed a
|
|
1045
|
+
* tab would have lost the signal at the first interaction.
|
|
1046
|
+
* ------------------------------------------------------------------------- */
|
|
1047
|
+
|
|
1048
|
+
.plass-fade-x {
|
|
1049
|
+
--p-fade: 1.5rem;
|
|
1050
|
+
|
|
1051
|
+
scrollbar-width: none;
|
|
1052
|
+
mask-image: linear-gradient(
|
|
1053
|
+
to right,
|
|
1054
|
+
transparent,
|
|
1055
|
+
#000 var(--p-fade-left, 0px),
|
|
1056
|
+
#000 calc(100% - var(--p-fade-right, 0px)),
|
|
1057
|
+
transparent
|
|
1058
|
+
);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.plass-fade-x::-webkit-scrollbar {
|
|
1062
|
+
display: none;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.plass-fade-x:has(:focus-visible) {
|
|
1066
|
+
mask-image: none;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/* ---------------------------------------------------------------------------
|
|
1070
|
+
* Showing something at some widths and not others
|
|
1071
|
+
*
|
|
1072
|
+
* `PlShow`, and the reason it is CSS rather than a `useMediaQuery` and a
|
|
1073
|
+
* ternary. A media query answered in JavaScript is `false` on a server and on
|
|
1074
|
+
* the first frame a browser renders, so a JavaScript gate draws the wrong half
|
|
1075
|
+
* and then throws it away — a flash on every page load rather than an edge
|
|
1076
|
+
* case. The stylesheet knows the width before React has been asked anything.
|
|
1077
|
+
*
|
|
1078
|
+
* `display: contents` while it is showing, so the element is **not a box**: its
|
|
1079
|
+
* children take part in the parent's layout exactly as they would have without
|
|
1080
|
+
* it, and a gate inside a flex row does not become a flex item. `display: none`
|
|
1081
|
+
* is what hides, which also takes the subtree off the accessibility tree — a
|
|
1082
|
+
* gate that only moved it off screen would leave a screen reader reading both
|
|
1083
|
+
* halves of a responsive layout.
|
|
1084
|
+
*
|
|
1085
|
+
* Attribute selectors rather than Tailwind's `max-md:hidden`, and that is not a
|
|
1086
|
+
* preference: the real classes in this file are emitted *after* the utilities so
|
|
1087
|
+
* they can outrank them, which would make a `display: contents` here beat the
|
|
1088
|
+
* very variant meant to hide it. Nine rules that only fight each other are
|
|
1089
|
+
* simpler than one that has to win a sort it does not control.
|
|
1090
|
+
*
|
|
1091
|
+
* Both bounds at once is `[data-from]` and `[data-until]` on one element, and
|
|
1092
|
+
* it resolves by source order: the `from` rules come first, so a rung at or
|
|
1093
|
+
* above `until` is hidden by the later rule whatever `from` said.
|
|
1094
|
+
* ------------------------------------------------------------------------- */
|
|
1095
|
+
|
|
1096
|
+
.plass-show {
|
|
1097
|
+
display: contents;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/* Below its floor, a gate with a `from` is closed. Each rung then opens it. */
|
|
1101
|
+
.plass-show[data-from] {
|
|
1102
|
+
display: none;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
@variant sm {
|
|
1106
|
+
.plass-show[data-from='sm'] {
|
|
1107
|
+
display: contents;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
@variant md {
|
|
1112
|
+
.plass-show[data-from='md'] {
|
|
1113
|
+
display: contents;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
@variant lg {
|
|
1118
|
+
.plass-show[data-from='lg'] {
|
|
1119
|
+
display: contents;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
@variant xl {
|
|
1124
|
+
.plass-show[data-from='xl'] {
|
|
1125
|
+
display: contents;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
/* And `until` closes it again from its own rung up. */
|
|
1130
|
+
@variant sm {
|
|
1131
|
+
.plass-show[data-until='sm'] {
|
|
1132
|
+
display: none;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
@variant md {
|
|
1137
|
+
.plass-show[data-until='md'] {
|
|
1138
|
+
display: none;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
@variant lg {
|
|
1143
|
+
.plass-show[data-until='lg'] {
|
|
1144
|
+
display: none;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
@variant xl {
|
|
1149
|
+
.plass-show[data-until='xl'] {
|
|
1150
|
+
display: none;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/* ---------------------------------------------------------------------------
|
|
1155
|
+
* The grid, and the responsive slots
|
|
792
1156
|
*
|
|
793
1157
|
* `PlGrid` is a flex row and `PlGridItem` is a width in it, which is the shape
|
|
794
1158
|
* a twelve-column grid has had since long before CSS had one of its own — and
|
|
@@ -810,16 +1174,49 @@
|
|
|
810
1174
|
* chains get long at `xl`; that is the cost of keeping the DOM lean, and it is
|
|
811
1175
|
* paid once here rather than on every grid item in a consumer's app.
|
|
812
1176
|
*
|
|
813
|
-
* The widths are Tailwind's own breakpoints
|
|
814
|
-
*
|
|
1177
|
+
* The widths are Tailwind's own breakpoints — `@variant` rather than a written
|
|
1178
|
+
* out `@media`, so a project that moves one in its theme moves this with it.
|
|
1179
|
+
* See "The breakpoint ladder" above.
|
|
1180
|
+
*
|
|
1181
|
+
* `.plass-container`'s measure and `.plass-flex`'s axis ride the same four
|
|
1182
|
+
* blocks, and any responsive prop added later should too. That is the whole
|
|
1183
|
+
* cost of one: a slot in `internal/responsive.ts` and four lines here. CSS has
|
|
1184
|
+
* no loop, so four lines is the floor — which is the reason to keep the number
|
|
1185
|
+
* of responsive props deliberate rather than to make every prop responsive
|
|
1186
|
+
* because it could be.
|
|
1187
|
+
*
|
|
1188
|
+
* The two gutters are declared for `.plass-grid` and `.plass-flex` together.
|
|
1189
|
+
* They are one question asked by two components — the space *between* the
|
|
1190
|
+
* things in a box — and a second copy of the chain is a second place for it to
|
|
1191
|
+
* drift.
|
|
815
1192
|
* ------------------------------------------------------------------------- */
|
|
816
1193
|
|
|
817
|
-
.plass-grid
|
|
818
|
-
|
|
1194
|
+
.plass-grid,
|
|
1195
|
+
.plass-flex {
|
|
819
1196
|
--p-gap-x: var(--p-gap-x-xs, 0px);
|
|
820
1197
|
--p-gap-y: var(--p-gap-y-xs, 0px);
|
|
821
1198
|
}
|
|
822
1199
|
|
|
1200
|
+
.plass-grid {
|
|
1201
|
+
--p-cols: var(--p-cols-xs, 12);
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
.plass-gallery {
|
|
1205
|
+
--p-cols: var(--p-cols-xs, 2);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
/*
|
|
1209
|
+
* `PlFlex`'s axis. One slot rather than two, because `reverse` is not
|
|
1210
|
+
* responsive and the direction is: the component folds the two into the four
|
|
1211
|
+
* values `flex-direction` takes, so a breakpoint changes the axis without
|
|
1212
|
+
* having to restate which end it starts from.
|
|
1213
|
+
*/
|
|
1214
|
+
.plass-flex {
|
|
1215
|
+
--p-dir: var(--p-dir-xs, row);
|
|
1216
|
+
|
|
1217
|
+
flex-direction: var(--p-dir);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
823
1220
|
.plass-grid-item {
|
|
824
1221
|
--p-span: var(--p-span-xs, var(--p-cols, 12));
|
|
825
1222
|
--p-offset: var(--p-offset-xs, 0);
|
|
@@ -838,39 +1235,102 @@
|
|
|
838
1235
|
margin-inline-start: calc(var(--p-track) * min(var(--p-offset), var(--p-cols, 12)));
|
|
839
1236
|
}
|
|
840
1237
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
1238
|
+
/*
|
|
1239
|
+
* The measure, and the one thing a container draws.
|
|
1240
|
+
*
|
|
1241
|
+
* A slot rather than five `max-w-*` classes, because a responsive measure would
|
|
1242
|
+
* otherwise be five classes times five rungs. It also takes any length a caller
|
|
1243
|
+
* writes, which the class ladder could not: `maxWidth="72ch"` is a measure in
|
|
1244
|
+
* characters, and a measure in characters is the one a paragraph actually
|
|
1245
|
+
* wants.
|
|
1246
|
+
*/
|
|
1247
|
+
.plass-container {
|
|
1248
|
+
--p-maxw: var(--p-maxw-xs, none);
|
|
1249
|
+
|
|
1250
|
+
max-width: var(--p-maxw);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
@variant sm {
|
|
1254
|
+
.plass-container {
|
|
1255
|
+
--p-maxw: var(--p-maxw-sm, var(--p-maxw-xs, none));
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.plass-grid,
|
|
1259
|
+
.plass-flex {
|
|
844
1260
|
--p-gap-x: var(--p-gap-x-sm, var(--p-gap-x-xs, 0px));
|
|
845
1261
|
--p-gap-y: var(--p-gap-y-sm, var(--p-gap-y-xs, 0px));
|
|
846
1262
|
}
|
|
847
1263
|
|
|
1264
|
+
.plass-grid {
|
|
1265
|
+
--p-cols: var(--p-cols-sm, var(--p-cols-xs, 12));
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
.plass-gallery {
|
|
1269
|
+
--p-cols: var(--p-cols-sm, var(--p-cols-xs, 2));
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
.plass-flex {
|
|
1273
|
+
--p-dir: var(--p-dir-sm, var(--p-dir-xs, row));
|
|
1274
|
+
}
|
|
1275
|
+
|
|
848
1276
|
.plass-grid-item {
|
|
849
1277
|
--p-span: var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12)));
|
|
850
1278
|
--p-offset: var(--p-offset-sm, var(--p-offset-xs, 0));
|
|
851
1279
|
}
|
|
852
1280
|
}
|
|
853
1281
|
|
|
854
|
-
@
|
|
855
|
-
.plass-
|
|
856
|
-
--p-
|
|
1282
|
+
@variant md {
|
|
1283
|
+
.plass-container {
|
|
1284
|
+
--p-maxw: var(--p-maxw-md, var(--p-maxw-sm, var(--p-maxw-xs, none)));
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
.plass-grid,
|
|
1288
|
+
.plass-flex {
|
|
857
1289
|
--p-gap-x: var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px)));
|
|
858
1290
|
--p-gap-y: var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px)));
|
|
859
1291
|
}
|
|
860
1292
|
|
|
1293
|
+
.plass-grid {
|
|
1294
|
+
--p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12)));
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.plass-gallery {
|
|
1298
|
+
--p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2)));
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.plass-flex {
|
|
1302
|
+
--p-dir: var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row)));
|
|
1303
|
+
}
|
|
1304
|
+
|
|
861
1305
|
.plass-grid-item {
|
|
862
1306
|
--p-span: var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12))));
|
|
863
1307
|
--p-offset: var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0)));
|
|
864
1308
|
}
|
|
865
1309
|
}
|
|
866
1310
|
|
|
867
|
-
@
|
|
868
|
-
.plass-
|
|
869
|
-
--p-
|
|
1311
|
+
@variant lg {
|
|
1312
|
+
.plass-container {
|
|
1313
|
+
--p-maxw: var(--p-maxw-lg, var(--p-maxw-md, var(--p-maxw-sm, var(--p-maxw-xs, none))));
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
.plass-grid,
|
|
1317
|
+
.plass-flex {
|
|
870
1318
|
--p-gap-x: var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))));
|
|
871
1319
|
--p-gap-y: var(--p-gap-y-lg, var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px))));
|
|
872
1320
|
}
|
|
873
1321
|
|
|
1322
|
+
.plass-grid {
|
|
1323
|
+
--p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))));
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.plass-gallery {
|
|
1327
|
+
--p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2))));
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
.plass-flex {
|
|
1331
|
+
--p-dir: var(--p-dir-lg, var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row))));
|
|
1332
|
+
}
|
|
1333
|
+
|
|
874
1334
|
.plass-grid-item {
|
|
875
1335
|
--p-span: var(
|
|
876
1336
|
--p-span-lg,
|
|
@@ -880,12 +1340,16 @@
|
|
|
880
1340
|
}
|
|
881
1341
|
}
|
|
882
1342
|
|
|
883
|
-
@
|
|
884
|
-
.plass-
|
|
885
|
-
--p-
|
|
886
|
-
--p-
|
|
887
|
-
var(--p-
|
|
1343
|
+
@variant xl {
|
|
1344
|
+
.plass-container {
|
|
1345
|
+
--p-maxw: var(
|
|
1346
|
+
--p-maxw-xl,
|
|
1347
|
+
var(--p-maxw-lg, var(--p-maxw-md, var(--p-maxw-sm, var(--p-maxw-xs, none))))
|
|
888
1348
|
);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.plass-grid,
|
|
1352
|
+
.plass-flex {
|
|
889
1353
|
--p-gap-x: var(
|
|
890
1354
|
--p-gap-x-xl,
|
|
891
1355
|
var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))))
|
|
@@ -896,6 +1360,27 @@
|
|
|
896
1360
|
);
|
|
897
1361
|
}
|
|
898
1362
|
|
|
1363
|
+
.plass-grid {
|
|
1364
|
+
--p-cols: var(
|
|
1365
|
+
--p-cols-xl,
|
|
1366
|
+
var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))))
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.plass-gallery {
|
|
1371
|
+
--p-cols: var(
|
|
1372
|
+
--p-cols-xl,
|
|
1373
|
+
var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2))))
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
.plass-flex {
|
|
1378
|
+
--p-dir: var(
|
|
1379
|
+
--p-dir-xl,
|
|
1380
|
+
var(--p-dir-lg, var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row))))
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
899
1384
|
.plass-grid-item {
|
|
900
1385
|
--p-span: var(
|
|
901
1386
|
--p-span-xl,
|
|
@@ -945,6 +1430,34 @@
|
|
|
945
1430
|
animation-play-state: var(--p-anim-state, running);
|
|
946
1431
|
}
|
|
947
1432
|
|
|
1433
|
+
/*
|
|
1434
|
+
* `timeline="view"`, and the whole of it.
|
|
1435
|
+
*
|
|
1436
|
+
* Two declarations give **every** keyframe in this file a scroll-linked mode:
|
|
1437
|
+
* the effect stops being a thing that happens at a moment and becomes a thing
|
|
1438
|
+
* that tracks where the element is in the scrollport. There is no component for
|
|
1439
|
+
* it and there should not be, because there is nothing a component would add —
|
|
1440
|
+
* an effect already knows what it draws, and this only changes what advances
|
|
1441
|
+
* it.
|
|
1442
|
+
*
|
|
1443
|
+
* `@supports` is not optional. `animation-timeline` is progressively enhanced
|
|
1444
|
+
* and an engine that does not know the property would drop these two lines but
|
|
1445
|
+
* keep the `animation-duration` above, which is the *right* fallback: a clock
|
|
1446
|
+
* plays the effect once and the content arrives. Handing an unsupported browser
|
|
1447
|
+
* a timeline it cannot resolve is what would leave a blank page. Degraded is
|
|
1448
|
+
* allowed; blank is not.
|
|
1449
|
+
*
|
|
1450
|
+
* The slots are only filled when a caller asks for `view`, so the default costs
|
|
1451
|
+
* nothing at all: `auto` is what the property already resolves to, and writing
|
|
1452
|
+
* it into a hundred inline styles would be a hundred copies of the same answer.
|
|
1453
|
+
*/
|
|
1454
|
+
@supports (animation-timeline: view()) {
|
|
1455
|
+
.plass-anim {
|
|
1456
|
+
animation-timeline: var(--p-anim-timeline, auto);
|
|
1457
|
+
animation-range: var(--p-anim-range, normal);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
|
|
948
1461
|
@keyframes plass-anim-fade {
|
|
949
1462
|
from {
|
|
950
1463
|
opacity: var(--p-anim-opacity, 0);
|
|
@@ -975,6 +1488,36 @@
|
|
|
975
1488
|
animation-name: plass-anim-scale;
|
|
976
1489
|
}
|
|
977
1490
|
|
|
1491
|
+
/*
|
|
1492
|
+
* The one entrance that moves nothing and changes no colour.
|
|
1493
|
+
*
|
|
1494
|
+
* `clip-path` rather than a mask or an `overflow` box, and the choice is worth
|
|
1495
|
+
* writing down because the alternatives look equivalent. A mask needs a
|
|
1496
|
+
* gradient that has to be kept in step with the direction; an `overflow`
|
|
1497
|
+
* wrapper puts a second element into the layout, which is exactly what an
|
|
1498
|
+
* effect for something whose *position* is the information must not do. And
|
|
1499
|
+
* `inset(0)` already means "nothing is cut off", so the to-state is the
|
|
1500
|
+
* element's own natural one rather than a number that has to be chosen.
|
|
1501
|
+
*
|
|
1502
|
+
* The opacity slot defaults to `1` here and to `0` everywhere else in this
|
|
1503
|
+
* file. A reveal is not a fade — the whole reason to reach for it is that the
|
|
1504
|
+
* ink does not change — so fading is opt-in rather than something to turn off.
|
|
1505
|
+
*/
|
|
1506
|
+
@keyframes plass-anim-reveal {
|
|
1507
|
+
from {
|
|
1508
|
+
opacity: var(--p-anim-opacity, 1);
|
|
1509
|
+
clip-path: var(--p-anim-clip, inset(0 100% 0 0));
|
|
1510
|
+
}
|
|
1511
|
+
to {
|
|
1512
|
+
opacity: 1;
|
|
1513
|
+
clip-path: inset(0);
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.plass-anim-reveal {
|
|
1518
|
+
animation-name: plass-anim-reveal;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
978
1521
|
@keyframes plass-anim-slide {
|
|
979
1522
|
from {
|
|
980
1523
|
opacity: var(--p-anim-opacity, 0);
|
|
@@ -1023,6 +1566,67 @@
|
|
|
1023
1566
|
animation-name: plass-anim-blink;
|
|
1024
1567
|
}
|
|
1025
1568
|
|
|
1569
|
+
/*
|
|
1570
|
+
* A refusal.
|
|
1571
|
+
*
|
|
1572
|
+
* Three shudders either side of home and back to nothing, so an element that
|
|
1573
|
+
* has been shaken is exactly where it was — this is the one effect in the file
|
|
1574
|
+
* that a caller will run over content that is still being typed into, and a
|
|
1575
|
+
* field left a few pixels off its label would be worse than the error it was
|
|
1576
|
+
* reporting.
|
|
1577
|
+
*
|
|
1578
|
+
* Not one of the entrances, and not in `PlassAnimation`, for `plass-anim-float`'s
|
|
1579
|
+
* reason: that union is the set of ways content can *arrive*, and a response to
|
|
1580
|
+
* something a reader did is not an arrival.
|
|
1581
|
+
*/
|
|
1582
|
+
@keyframes plass-anim-shake {
|
|
1583
|
+
0%,
|
|
1584
|
+
100% {
|
|
1585
|
+
translate: 0 0;
|
|
1586
|
+
}
|
|
1587
|
+
15%,
|
|
1588
|
+
45%,
|
|
1589
|
+
75% {
|
|
1590
|
+
translate: calc(var(--p-anim-x, 6px) * -1) 0;
|
|
1591
|
+
}
|
|
1592
|
+
30%,
|
|
1593
|
+
60%,
|
|
1594
|
+
90% {
|
|
1595
|
+
translate: var(--p-anim-x, 6px) 0;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
.plass-anim-shake {
|
|
1600
|
+
animation-name: plass-anim-shake;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/*
|
|
1604
|
+
* An endless drift.
|
|
1605
|
+
*
|
|
1606
|
+
* Symmetric like the blink above and for the same reason: however many times it
|
|
1607
|
+
* runs it ends where it started, so a float that was stopped mid-cycle does not
|
|
1608
|
+
* leave the element permanently a few pixels out of place.
|
|
1609
|
+
*
|
|
1610
|
+
* It is **not** one of the entrances, and it is not in `PlassAnimation` either.
|
|
1611
|
+
* That union is the set of ways content can *arrive*, and every component
|
|
1612
|
+
* importing the map that backs it pays for each row whether it uses it or not;
|
|
1613
|
+
* a drift that never finishes is not an arrival and would be a row nothing else
|
|
1614
|
+
* could ever want.
|
|
1615
|
+
*/
|
|
1616
|
+
@keyframes plass-anim-float {
|
|
1617
|
+
0%,
|
|
1618
|
+
100% {
|
|
1619
|
+
translate: 0 0;
|
|
1620
|
+
}
|
|
1621
|
+
50% {
|
|
1622
|
+
translate: var(--p-anim-x, 0) var(--p-anim-y, 0);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
.plass-anim-float {
|
|
1627
|
+
animation-name: plass-anim-float;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1026
1630
|
/*
|
|
1027
1631
|
* The light travelling around the outside of something.
|
|
1028
1632
|
*
|
|
@@ -1095,7 +1699,7 @@
|
|
|
1095
1699
|
translate: 0 0;
|
|
1096
1700
|
}
|
|
1097
1701
|
to {
|
|
1098
|
-
translate: calc(-100% - var(--p-anim-gap, 0px)) 0;
|
|
1702
|
+
translate: calc((-100% - var(--p-anim-gap, 0px)) * var(--p-anim-along, 1)) 0;
|
|
1099
1703
|
}
|
|
1100
1704
|
}
|
|
1101
1705
|
|
|
@@ -1140,6 +1744,22 @@
|
|
|
1140
1744
|
animation-name: plass-anim-marquee-y;
|
|
1141
1745
|
}
|
|
1142
1746
|
|
|
1747
|
+
/*
|
|
1748
|
+
* A strip travels *towards* the reader's start: in English it enters on the
|
|
1749
|
+
* right and leaves on the left, and in Arabic it does the opposite, or the
|
|
1750
|
+
* words arrive backwards.
|
|
1751
|
+
*
|
|
1752
|
+
* There is no logical `translate`, so the sign is flipped by hand. The flex
|
|
1753
|
+
* track has already reversed on its own, which is what puts the overflow on the
|
|
1754
|
+
* other side for the translate to bring in. Written against the attribute as
|
|
1755
|
+
* well as `:dir()` because `:dir()` is newer than the rest of this sheet's
|
|
1756
|
+
* floor; the two agree on every page that set `dir`.
|
|
1757
|
+
*/
|
|
1758
|
+
[dir='rtl'] .plass-marquee-track,
|
|
1759
|
+
.plass-marquee-track:dir(rtl) {
|
|
1760
|
+
--p-anim-along: -1;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1143
1763
|
.plass-marquee[data-pause-on-hover]:hover .plass-marquee-track {
|
|
1144
1764
|
animation-play-state: paused;
|
|
1145
1765
|
}
|
|
@@ -1218,6 +1838,499 @@
|
|
|
1218
1838
|
animation: plass-anim-caret 1s step-end infinite;
|
|
1219
1839
|
}
|
|
1220
1840
|
|
|
1841
|
+
/* ---------------------------------------------------------------------------
|
|
1842
|
+
* Code blocks
|
|
1843
|
+
*
|
|
1844
|
+
* A `PlCodeBlock` is the one surface in the library that does **not** take the
|
|
1845
|
+
* page's palette. Code is read against a background that was chosen for code,
|
|
1846
|
+
* and a block that turned white because the page did would throw away the only
|
|
1847
|
+
* thing a reader is using to tell a keyword from a string. So the sheet carries
|
|
1848
|
+
* its own slots, `theme` picks which set fills them, and `auto` is the opt-in
|
|
1849
|
+
* for a block that would rather follow the page.
|
|
1850
|
+
*
|
|
1851
|
+
* They are custom properties on the block rather than a stylesheet per theme
|
|
1852
|
+
* for `internal/animate.ts`'s reason: nothing here is generated, the component only
|
|
1853
|
+
* fills slots, and a thirteenth theme is a block of declarations rather than a
|
|
1854
|
+
* second copy of the token map below. That is also why `theme` accepts any
|
|
1855
|
+
* string: a consumer who writes `[data-code-theme='ours']` in their own CSS has
|
|
1856
|
+
* a theme, with nothing to register and nothing to import.
|
|
1857
|
+
*
|
|
1858
|
+
* **Five of the slots are derived and are never written per theme.** `dim`,
|
|
1859
|
+
* `rule` and `hover` are a fixed mix of the ground and the ink, and `mark` and
|
|
1860
|
+
* `mark-edge` are the same for the highlighted-line background. A custom
|
|
1861
|
+
* property resolves its `var()`s on the element that declares it, and every
|
|
1862
|
+
* theme below declares its `fg` and `bg` on that same element — so the derived
|
|
1863
|
+
* five follow whichever theme won without being restated fourteen times.
|
|
1864
|
+
*
|
|
1865
|
+
* The two dark palettes at the top are written twice on purpose — once for
|
|
1866
|
+
* `dark`, once for `auto` inside a dark page — because a media query cannot be
|
|
1867
|
+
* folded into a selector list. It is the same repetition the theme roots at the
|
|
1868
|
+
* top of this file make, for the same reason.
|
|
1869
|
+
*
|
|
1870
|
+
* Every hue in the house themes is solved against its own background rather
|
|
1871
|
+
* than flipped: the light set runs dark and saturated on near-white, the dark
|
|
1872
|
+
* set light and desaturated on near-black. The pairs that have to stay apart
|
|
1873
|
+
* are the ones that sit next to each other in real code — a string beside a
|
|
1874
|
+
* number, a type beside a function name. The eight named themes below them are
|
|
1875
|
+
* ports and keep their own published values, because a Dracula that had been
|
|
1876
|
+
* re-solved would not be Dracula.
|
|
1877
|
+
* ------------------------------------------------------------------------- */
|
|
1878
|
+
|
|
1879
|
+
.plass-code {
|
|
1880
|
+
/* The light set, which is also what `auto` and `light` start from. */
|
|
1881
|
+
--p-code-bg: oklch(98.4% 0.003 262);
|
|
1882
|
+
--p-code-fg: oklch(30% 0.016 262);
|
|
1883
|
+
|
|
1884
|
+
--p-code-comment: oklch(58% 0.022 262);
|
|
1885
|
+
--p-code-keyword: oklch(48% 0.19 322);
|
|
1886
|
+
--p-code-string: oklch(46% 0.12 148);
|
|
1887
|
+
--p-code-number: oklch(50% 0.14 48);
|
|
1888
|
+
--p-code-function: oklch(48% 0.17 264);
|
|
1889
|
+
--p-code-type: oklch(45% 0.1 214);
|
|
1890
|
+
--p-code-variable: oklch(45% 0.12 28);
|
|
1891
|
+
--p-code-tag: oklch(48% 0.18 22);
|
|
1892
|
+
--p-code-attr: oklch(47% 0.13 82);
|
|
1893
|
+
--p-code-meta: oklch(52% 0.05 262);
|
|
1894
|
+
--p-code-add: oklch(45% 0.14 152);
|
|
1895
|
+
--p-code-del: oklch(48% 0.18 25);
|
|
1896
|
+
|
|
1897
|
+
/* The derived five. Declared once here and never in a theme: they are a mix
|
|
1898
|
+
of that theme's own ground and ink, which resolves on this element. */
|
|
1899
|
+
--p-code-dim: color-mix(in oklab, var(--p-code-fg) 58%, var(--p-code-bg));
|
|
1900
|
+
--p-code-rule: color-mix(in oklab, var(--p-code-fg) 14%, transparent);
|
|
1901
|
+
--p-code-hover: color-mix(in oklab, var(--p-code-fg) 9%, transparent);
|
|
1902
|
+
|
|
1903
|
+
/* A marked line is neutral rather than dyed with the page's accent family:
|
|
1904
|
+
the block has deliberately refused the page's palette, and a primary-blue
|
|
1905
|
+
wash over Dracula would be the one colour on it nobody chose. Mixed from
|
|
1906
|
+
the theme's own ink, it is legible on all twelve. */
|
|
1907
|
+
--p-code-mark: color-mix(in oklab, var(--p-code-fg) 10%, transparent);
|
|
1908
|
+
--p-code-mark-edge: color-mix(in oklab, var(--p-code-fg) 45%, transparent);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.plass-code[data-code-theme='dark'],
|
|
1912
|
+
:where(.dark, [data-theme='dark']) .plass-code[data-code-theme='auto'] {
|
|
1913
|
+
--p-code-bg: oklch(19.5% 0.014 262);
|
|
1914
|
+
--p-code-fg: oklch(90% 0.012 262);
|
|
1915
|
+
|
|
1916
|
+
--p-code-comment: oklch(60% 0.024 262);
|
|
1917
|
+
--p-code-keyword: oklch(76% 0.13 324);
|
|
1918
|
+
--p-code-string: oklch(80% 0.13 148);
|
|
1919
|
+
--p-code-number: oklch(81% 0.12 62);
|
|
1920
|
+
--p-code-function: oklch(78% 0.12 258);
|
|
1921
|
+
--p-code-type: oklch(82% 0.1 210);
|
|
1922
|
+
--p-code-variable: oklch(82% 0.09 32);
|
|
1923
|
+
--p-code-tag: oklch(77% 0.13 22);
|
|
1924
|
+
--p-code-attr: oklch(85% 0.11 92);
|
|
1925
|
+
--p-code-meta: oklch(70% 0.05 262);
|
|
1926
|
+
--p-code-add: oklch(80% 0.14 152);
|
|
1927
|
+
--p-code-del: oklch(75% 0.15 25);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
@media (prefers-color-scheme: dark) {
|
|
1931
|
+
:root:not([data-theme='light']) .plass-code[data-code-theme='auto'] {
|
|
1932
|
+
--p-code-bg: oklch(19.5% 0.014 262);
|
|
1933
|
+
--p-code-fg: oklch(90% 0.012 262);
|
|
1934
|
+
|
|
1935
|
+
--p-code-comment: oklch(60% 0.024 262);
|
|
1936
|
+
--p-code-keyword: oklch(76% 0.13 324);
|
|
1937
|
+
--p-code-string: oklch(80% 0.13 148);
|
|
1938
|
+
--p-code-number: oklch(81% 0.12 62);
|
|
1939
|
+
--p-code-function: oklch(78% 0.12 258);
|
|
1940
|
+
--p-code-type: oklch(82% 0.1 210);
|
|
1941
|
+
--p-code-variable: oklch(82% 0.09 32);
|
|
1942
|
+
--p-code-tag: oklch(77% 0.13 22);
|
|
1943
|
+
--p-code-attr: oklch(85% 0.11 92);
|
|
1944
|
+
--p-code-meta: oklch(70% 0.05 262);
|
|
1945
|
+
--p-code-add: oklch(80% 0.14 152);
|
|
1946
|
+
--p-code-del: oklch(75% 0.15 25);
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/*
|
|
1951
|
+
* `mono` is the one theme that follows the page, and the only one with no hue
|
|
1952
|
+
* in it at all: the structure is carried by weight and by how far a run is
|
|
1953
|
+
* muted. It is what a block printed on paper, or read by someone who cannot
|
|
1954
|
+
* separate the hues above, is left with — so it has to stay legible on its own
|
|
1955
|
+
* rather than being a degraded copy of a colour theme.
|
|
1956
|
+
*/
|
|
1957
|
+
.plass-code[data-code-theme='mono'] {
|
|
1958
|
+
--p-code-bg: color-mix(in oklab, var(--plass-fg) 4%, var(--plass-surface));
|
|
1959
|
+
--p-code-fg: var(--plass-fg);
|
|
1960
|
+
|
|
1961
|
+
--p-code-comment: var(--plass-muted-fg);
|
|
1962
|
+
--p-code-keyword: var(--plass-fg);
|
|
1963
|
+
--p-code-string: var(--plass-muted-fg);
|
|
1964
|
+
--p-code-number: var(--plass-muted-fg);
|
|
1965
|
+
--p-code-function: var(--plass-fg);
|
|
1966
|
+
--p-code-type: var(--plass-fg);
|
|
1967
|
+
--p-code-variable: var(--plass-fg);
|
|
1968
|
+
--p-code-tag: var(--plass-fg);
|
|
1969
|
+
--p-code-attr: var(--plass-muted-fg);
|
|
1970
|
+
--p-code-meta: var(--plass-muted-fg);
|
|
1971
|
+
--p-code-add: var(--plass-fg);
|
|
1972
|
+
--p-code-del: var(--plass-muted-fg);
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.plass-code[data-code-theme='mono'] .hljs-keyword,
|
|
1976
|
+
.plass-code[data-code-theme='mono'] .hljs-selector-tag,
|
|
1977
|
+
.plass-code[data-code-theme='mono'] .hljs-title,
|
|
1978
|
+
.plass-code[data-code-theme='mono'] .hljs-tag,
|
|
1979
|
+
.plass-code[data-code-theme='mono'] .hljs-type,
|
|
1980
|
+
.plass-code[data-code-theme='mono'] .hljs-built_in {
|
|
1981
|
+
font-weight: 600;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/*
|
|
1985
|
+
* The eight ports.
|
|
1986
|
+
*
|
|
1987
|
+
* They exist because a code block is the one component whose colours a reader
|
|
1988
|
+
* already has an opinion about: someone who writes in One Dark all day reads a
|
|
1989
|
+
* Dracula block as a different product's documentation. The published values
|
|
1990
|
+
* are kept exactly, in the hex they were published in, rather than re-solved
|
|
1991
|
+
* into the oklch the rest of this file uses — a Dracula that had been corrected
|
|
1992
|
+
* against Neba's own ground would be a theme nobody recognises and nobody
|
|
1993
|
+
* asked for.
|
|
1994
|
+
*
|
|
1995
|
+
* Six dark and two light, which is the ratio of how they are used. Each is
|
|
1996
|
+
* fourteen declarations, because the muted, the rule, the hover and the two
|
|
1997
|
+
* marked-line slots are all derived from the two at the top of it.
|
|
1998
|
+
*/
|
|
1999
|
+
.plass-code[data-code-theme='one-dark'] {
|
|
2000
|
+
--p-code-bg: #282c34;
|
|
2001
|
+
--p-code-fg: #abb2bf;
|
|
2002
|
+
|
|
2003
|
+
--p-code-comment: #5c6370;
|
|
2004
|
+
--p-code-keyword: #c678dd;
|
|
2005
|
+
--p-code-string: #98c379;
|
|
2006
|
+
--p-code-number: #d19a66;
|
|
2007
|
+
--p-code-function: #61afef;
|
|
2008
|
+
--p-code-type: #e5c07b;
|
|
2009
|
+
--p-code-variable: #e06c75;
|
|
2010
|
+
--p-code-tag: #e06c75;
|
|
2011
|
+
--p-code-attr: #d19a66;
|
|
2012
|
+
--p-code-meta: #56b6c2;
|
|
2013
|
+
--p-code-add: #98c379;
|
|
2014
|
+
--p-code-del: #e06c75;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
.plass-code[data-code-theme='dracula'] {
|
|
2018
|
+
--p-code-bg: #282a36;
|
|
2019
|
+
--p-code-fg: #f8f8f2;
|
|
2020
|
+
|
|
2021
|
+
--p-code-comment: #6272a4;
|
|
2022
|
+
--p-code-keyword: #ff79c6;
|
|
2023
|
+
--p-code-string: #f1fa8c;
|
|
2024
|
+
--p-code-number: #bd93f9;
|
|
2025
|
+
--p-code-function: #50fa7b;
|
|
2026
|
+
--p-code-type: #8be9fd;
|
|
2027
|
+
--p-code-variable: #f8f8f2;
|
|
2028
|
+
--p-code-tag: #ff79c6;
|
|
2029
|
+
--p-code-attr: #50fa7b;
|
|
2030
|
+
--p-code-meta: #6272a4;
|
|
2031
|
+
--p-code-add: #50fa7b;
|
|
2032
|
+
--p-code-del: #ff5555;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
.plass-code[data-code-theme='monokai'] {
|
|
2036
|
+
--p-code-bg: #272822;
|
|
2037
|
+
--p-code-fg: #f8f8f2;
|
|
2038
|
+
|
|
2039
|
+
--p-code-comment: #75715e;
|
|
2040
|
+
--p-code-keyword: #f92672;
|
|
2041
|
+
--p-code-string: #e6db74;
|
|
2042
|
+
--p-code-number: #ae81ff;
|
|
2043
|
+
--p-code-function: #a6e22e;
|
|
2044
|
+
--p-code-type: #66d9ef;
|
|
2045
|
+
--p-code-variable: #f8f8f2;
|
|
2046
|
+
--p-code-tag: #f92672;
|
|
2047
|
+
--p-code-attr: #a6e22e;
|
|
2048
|
+
--p-code-meta: #75715e;
|
|
2049
|
+
--p-code-add: #a6e22e;
|
|
2050
|
+
--p-code-del: #f92672;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.plass-code[data-code-theme='nord'] {
|
|
2054
|
+
--p-code-bg: #2e3440;
|
|
2055
|
+
--p-code-fg: #d8dee9;
|
|
2056
|
+
|
|
2057
|
+
--p-code-comment: #616e88;
|
|
2058
|
+
--p-code-keyword: #81a1c1;
|
|
2059
|
+
--p-code-string: #a3be8c;
|
|
2060
|
+
--p-code-number: #b48ead;
|
|
2061
|
+
--p-code-function: #88c0d0;
|
|
2062
|
+
--p-code-type: #8fbcbb;
|
|
2063
|
+
--p-code-variable: #d8dee9;
|
|
2064
|
+
--p-code-tag: #81a1c1;
|
|
2065
|
+
--p-code-attr: #8fbcbb;
|
|
2066
|
+
--p-code-meta: #5e81ac;
|
|
2067
|
+
--p-code-add: #a3be8c;
|
|
2068
|
+
--p-code-del: #bf616a;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
.plass-code[data-code-theme='night-owl'] {
|
|
2072
|
+
--p-code-bg: #011627;
|
|
2073
|
+
--p-code-fg: #d6deeb;
|
|
2074
|
+
|
|
2075
|
+
--p-code-comment: #637777;
|
|
2076
|
+
--p-code-keyword: #c792ea;
|
|
2077
|
+
--p-code-string: #ecc48d;
|
|
2078
|
+
--p-code-number: #f78c6c;
|
|
2079
|
+
--p-code-function: #82aaff;
|
|
2080
|
+
--p-code-type: #ffcb8b;
|
|
2081
|
+
--p-code-variable: #addb67;
|
|
2082
|
+
--p-code-tag: #7fdbca;
|
|
2083
|
+
--p-code-attr: #addb67;
|
|
2084
|
+
--p-code-meta: #82aaff;
|
|
2085
|
+
--p-code-add: #addb67;
|
|
2086
|
+
--p-code-del: #ef5350;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.plass-code[data-code-theme='gruvbox'] {
|
|
2090
|
+
--p-code-bg: #282828;
|
|
2091
|
+
--p-code-fg: #ebdbb2;
|
|
2092
|
+
|
|
2093
|
+
--p-code-comment: #928374;
|
|
2094
|
+
--p-code-keyword: #fb4934;
|
|
2095
|
+
--p-code-string: #b8bb26;
|
|
2096
|
+
--p-code-number: #d3869b;
|
|
2097
|
+
--p-code-function: #b8bb26;
|
|
2098
|
+
--p-code-type: #fabd2f;
|
|
2099
|
+
--p-code-variable: #83a598;
|
|
2100
|
+
--p-code-tag: #8ec07c;
|
|
2101
|
+
--p-code-attr: #fabd2f;
|
|
2102
|
+
--p-code-meta: #928374;
|
|
2103
|
+
--p-code-add: #b8bb26;
|
|
2104
|
+
--p-code-del: #fb4934;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
.plass-code[data-code-theme='github'] {
|
|
2108
|
+
--p-code-bg: #ffffff;
|
|
2109
|
+
--p-code-fg: #24292f;
|
|
2110
|
+
|
|
2111
|
+
--p-code-comment: #6e7781;
|
|
2112
|
+
--p-code-keyword: #cf222e;
|
|
2113
|
+
--p-code-string: #0a3069;
|
|
2114
|
+
--p-code-number: #0550ae;
|
|
2115
|
+
--p-code-function: #8250df;
|
|
2116
|
+
--p-code-type: #953800;
|
|
2117
|
+
--p-code-variable: #953800;
|
|
2118
|
+
--p-code-tag: #116329;
|
|
2119
|
+
--p-code-attr: #0550ae;
|
|
2120
|
+
--p-code-meta: #6e7781;
|
|
2121
|
+
--p-code-add: #116329;
|
|
2122
|
+
--p-code-del: #82071e;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
.plass-code[data-code-theme='solarized-light'] {
|
|
2126
|
+
--p-code-bg: #fdf6e3;
|
|
2127
|
+
--p-code-fg: #657b83;
|
|
2128
|
+
|
|
2129
|
+
--p-code-comment: #93a1a1;
|
|
2130
|
+
--p-code-keyword: #859900;
|
|
2131
|
+
--p-code-string: #2aa198;
|
|
2132
|
+
--p-code-number: #d33682;
|
|
2133
|
+
--p-code-function: #268bd2;
|
|
2134
|
+
--p-code-type: #b58900;
|
|
2135
|
+
--p-code-variable: #268bd2;
|
|
2136
|
+
--p-code-tag: #268bd2;
|
|
2137
|
+
--p-code-attr: #b58900;
|
|
2138
|
+
--p-code-meta: #cb4b16;
|
|
2139
|
+
--p-code-add: #859900;
|
|
2140
|
+
--p-code-del: #dc322f;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
/*
|
|
2144
|
+
* A line, and the two things in front of it that are not code.
|
|
2145
|
+
*
|
|
2146
|
+
* The number and the prompt are generated content off a `data-*` attribute, not
|
|
2147
|
+
* text nodes, and that is the whole point: a `$` a reader drags across and
|
|
2148
|
+
* pastes into their shell is a `$` their shell chokes on. Generated content
|
|
2149
|
+
* cannot be selected, cannot be found by find-in-page and never reaches the
|
|
2150
|
+
* clipboard — `user-select: none` is only *usually* true of all three. The
|
|
2151
|
+
* `order` is what lets one pseudo-element sit in front of the other and both in
|
|
2152
|
+
* front of the code, since `::after` would otherwise draw last.
|
|
2153
|
+
*
|
|
2154
|
+
* `min-height` keeps a blank line a line high. A flex row with nothing in it is
|
|
2155
|
+
* zero pixels tall, and a code block that closed up its own paragraph breaks
|
|
2156
|
+
* would be reflowing the reader's file.
|
|
2157
|
+
*/
|
|
2158
|
+
.plass-code-line {
|
|
2159
|
+
display: flex;
|
|
2160
|
+
min-height: 1.5em;
|
|
2161
|
+
min-height: 1lh;
|
|
2162
|
+
/*
|
|
2163
|
+
* Transparent on every line, coloured on a marked one. A border rather than
|
|
2164
|
+
* an inset `box-shadow` because `box-shadow` has no logical form and this one
|
|
2165
|
+
* has to sit on the *start* edge in both writing directions; drawn on all of
|
|
2166
|
+
* them so marking a line does not shift its text two pixels sideways.
|
|
2167
|
+
*/
|
|
2168
|
+
border-inline-start: 2px solid transparent;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
/*
|
|
2172
|
+
* A marked line, and the reason its horizontal padding is on the line rather
|
|
2173
|
+
* than on the box that scrolls it.
|
|
2174
|
+
*
|
|
2175
|
+
* A highlight that stopped at the padding would be a stripe floating inside the
|
|
2176
|
+
* block instead of a marked row. With the padding here the line box *is* the
|
|
2177
|
+
* row, so the tint reaches both edges — and because the lines sit in a
|
|
2178
|
+
* `w-max min-w-full` block, every one of them reaches the same edge whether the
|
|
2179
|
+
* code is narrower than the block or scrolled sideways within it.
|
|
2180
|
+
*/
|
|
2181
|
+
.plass-code-line[data-mark] {
|
|
2182
|
+
background: var(--p-code-mark);
|
|
2183
|
+
border-inline-start-color: var(--p-code-mark-edge);
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
.plass-code-line[data-line]::before {
|
|
2187
|
+
content: attr(data-line);
|
|
2188
|
+
order: 0;
|
|
2189
|
+
flex: none;
|
|
2190
|
+
width: var(--p-code-gutter, 2ch);
|
|
2191
|
+
margin-inline-end: 1.25em;
|
|
2192
|
+
text-align: end;
|
|
2193
|
+
color: var(--p-code-dim);
|
|
2194
|
+
-webkit-user-select: none;
|
|
2195
|
+
user-select: none;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
.plass-code-line[data-prompt]::after {
|
|
2199
|
+
content: attr(data-prompt);
|
|
2200
|
+
order: 1;
|
|
2201
|
+
flex: none;
|
|
2202
|
+
margin-inline-end: 0.75em;
|
|
2203
|
+
color: var(--p-code-dim);
|
|
2204
|
+
-webkit-user-select: none;
|
|
2205
|
+
user-select: none;
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
.plass-code-line > code {
|
|
2209
|
+
order: 2;
|
|
2210
|
+
min-width: 0;
|
|
2211
|
+
font: inherit;
|
|
2212
|
+
background: none;
|
|
2213
|
+
padding: 0;
|
|
2214
|
+
white-space: pre;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
.plass-code[data-code-wrap='true'] .plass-code-line > code {
|
|
2218
|
+
white-space: pre-wrap;
|
|
2219
|
+
overflow-wrap: anywhere;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
/*
|
|
2223
|
+
* highlight.js's scopes, mapped onto the sixteen slots.
|
|
2224
|
+
*
|
|
2225
|
+
* Grouped by what a run *is* rather than by what highlight.js calls it, because
|
|
2226
|
+
* the names are the union of a hundred and ninety grammars and half of them are
|
|
2227
|
+
* one language's word for another language's idea — `selector-tag` and `tag`
|
|
2228
|
+
* and `name` are all "the thing being declared". The point of the mapping is
|
|
2229
|
+
* that the same idea gets the same colour whatever file it appears in.
|
|
2230
|
+
*/
|
|
2231
|
+
.plass-code .hljs-comment,
|
|
2232
|
+
.plass-code .hljs-quote {
|
|
2233
|
+
color: var(--p-code-comment);
|
|
2234
|
+
font-style: italic;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
.plass-code .hljs-keyword,
|
|
2238
|
+
.plass-code .hljs-literal,
|
|
2239
|
+
.plass-code .hljs-selector-tag,
|
|
2240
|
+
.plass-code .hljs-operator,
|
|
2241
|
+
.plass-code .hljs-doctag,
|
|
2242
|
+
.plass-code .hljs-formula {
|
|
2243
|
+
color: var(--p-code-keyword);
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.plass-code .hljs-string,
|
|
2247
|
+
.plass-code .hljs-regexp,
|
|
2248
|
+
.plass-code .hljs-char,
|
|
2249
|
+
.plass-code .hljs-link {
|
|
2250
|
+
color: var(--p-code-string);
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
.plass-code .hljs-number,
|
|
2254
|
+
.plass-code .hljs-symbol,
|
|
2255
|
+
.plass-code .hljs-bullet {
|
|
2256
|
+
color: var(--p-code-number);
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
.plass-code .hljs-title,
|
|
2260
|
+
.plass-code .hljs-section,
|
|
2261
|
+
.plass-code .hljs-name,
|
|
2262
|
+
.plass-code .hljs-selector-id,
|
|
2263
|
+
.plass-code .hljs-selector-class {
|
|
2264
|
+
color: var(--p-code-function);
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
.plass-code .hljs-type,
|
|
2268
|
+
.plass-code .hljs-built_in,
|
|
2269
|
+
.plass-code .hljs-class {
|
|
2270
|
+
color: var(--p-code-type);
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
.plass-code .hljs-variable,
|
|
2274
|
+
.plass-code .hljs-template-variable,
|
|
2275
|
+
.plass-code .hljs-params,
|
|
2276
|
+
.plass-code .hljs-subst {
|
|
2277
|
+
color: var(--p-code-variable);
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
.plass-code .hljs-tag,
|
|
2281
|
+
.plass-code .hljs-template-tag {
|
|
2282
|
+
color: var(--p-code-tag);
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
.plass-code .hljs-attr,
|
|
2286
|
+
.plass-code .hljs-attribute,
|
|
2287
|
+
.plass-code .hljs-property,
|
|
2288
|
+
.plass-code .hljs-selector-attr,
|
|
2289
|
+
.plass-code .hljs-selector-pseudo {
|
|
2290
|
+
color: var(--p-code-attr);
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
.plass-code .hljs-meta,
|
|
2294
|
+
.plass-code .hljs-punctuation {
|
|
2295
|
+
color: var(--p-code-meta);
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
.plass-code .hljs-addition {
|
|
2299
|
+
color: var(--p-code-add);
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
.plass-code .hljs-deletion {
|
|
2303
|
+
color: var(--p-code-del);
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.plass-code .hljs-emphasis {
|
|
2307
|
+
font-style: italic;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
.plass-code .hljs-strong {
|
|
2311
|
+
font-weight: 700;
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
/* ---------------------------------------------------------------------------
|
|
2315
|
+
* The gallery
|
|
2316
|
+
*
|
|
2317
|
+
* `PlGallery` rides the same `--p-cols` chain `PlGrid` does, one block above,
|
|
2318
|
+
* with a default of two rather than twelve: a wall of photographs is counted in
|
|
2319
|
+
* tiles across and a layout grid is counted in tracks, and two is the narrowest
|
|
2320
|
+
* arrangement that still reads as a set.
|
|
2321
|
+
*
|
|
2322
|
+
* The three lines below are what the slot is *for*. A grid and a quilt lay out
|
|
2323
|
+
* in CSS Grid off `--p-cols`; a masonry deals its items into that many lanes in
|
|
2324
|
+
* JavaScript, because which lane an item lands in changes the DOM and no
|
|
2325
|
+
* stylesheet can do that; and a justified row is flexbox, which needs no count
|
|
2326
|
+
* at all — it fills to the edge with whatever fits.
|
|
2327
|
+
* ------------------------------------------------------------------------- */
|
|
2328
|
+
|
|
2329
|
+
.plass-gallery-grid,
|
|
2330
|
+
.plass-gallery-quilted {
|
|
2331
|
+
grid-template-columns: repeat(var(--p-cols, 2), minmax(0, 1fr));
|
|
2332
|
+
}
|
|
2333
|
+
|
|
1221
2334
|
/* ---------------------------------------------------------------------------
|
|
1222
2335
|
* Reduced motion
|
|
1223
2336
|
*
|