plass-ui 1.3.0 → 1.5.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 +962 -0
- package/README.md +19 -17
- package/dist/components/accordion/PlAccordion.d.ts +1 -1
- package/dist/components/alert/PlAlert.js +1 -1
- package/dist/components/anchor/PlAnchor.d.ts +85 -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-marquee/PlAnimateMarquee.d.ts +13 -4
- package/dist/components/animate-marquee/PlAnimateMarquee.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 +57 -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.d.ts +3 -2
- 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.d.ts +2 -1
- 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 +2 -1
- package/dist/components/back-top/PlBackTop.js +1 -1
- 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/bottom-navigation/PlBottomNavigation.d.ts +3 -0
- package/dist/components/breadcrumb/PlBreadcrumb.js +1 -1
- package/dist/components/button/PlButton.d.ts +8 -0
- package/dist/components/button/PlButton.js +1 -1
- package/dist/components/button-group/PlButtonGroup.js +1 -1
- package/dist/components/calendar/PlCalendar.js +1 -1
- package/dist/components/card/PlCard.js +1 -1
- package/dist/components/carousel/PlCarousel.d.ts +1 -1
- package/dist/components/carousel/PlCarousel.js +1 -1
- package/dist/components/chat-bubble/PlChatBubble.d.ts +4 -1
- package/dist/components/chat-bubble/PlChatBubble.js +1 -1
- package/dist/components/checkbox/PlCheckbox.js +1 -1
- package/dist/components/chip/PlChip.d.ts +6 -2
- package/dist/components/chip/PlChip.js +1 -1
- package/dist/components/code-block/PlCodeBlock.d.ts +192 -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/color-picker/PlColorPicker.js +1 -1
- package/dist/components/combobox/PlCombobox.d.ts +6 -5
- package/dist/components/combobox/PlCombobox.js +1 -1
- package/dist/components/command-palette/PlCommandPalette.d.ts +6 -2
- package/dist/components/command-palette/PlCommandPalette.js +1 -1
- package/dist/components/confirm/PlConfirmProvider.js +1 -1
- 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 +216 -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.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/drawer/PlDrawer.d.ts +1 -1
- package/dist/components/drawer/PlDrawer.js +1 -1
- package/dist/components/file-picker/PlFilePicker.d.ts +4 -1
- 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.d.ts +3 -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/form/PlForm.js +1 -1
- package/dist/components/gallery/PlGallery.d.ts +192 -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 +96 -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 +195 -8
- package/dist/components/image/PlImage.js +1 -1
- package/dist/components/image/PlImagePreview.d.ts +58 -0
- package/dist/components/image/PlImagePreview.js +1 -0
- package/dist/components/image/index.d.ts +1 -1
- 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/menu/PlMenu.d.ts +14 -5
- package/dist/components/menu/PlMenu.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.d.ts +7 -1
- package/dist/components/navigation-menu/PlNavigationMenu.js +1 -1
- package/dist/components/number-field/PlNumberField.d.ts +1 -1
- package/dist/components/number-field/PlNumberField.js +1 -1
- package/dist/components/otp-field/PlOtpField.d.ts +6 -0
- 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.d.ts +12 -9
- package/dist/components/pagination/PlPagination.js +1 -1
- package/dist/components/panes/PlPanes.d.ts +7 -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 +1 -1
- package/dist/components/popconfirm/PlPopconfirm.js +1 -1
- package/dist/components/popover/PlPopover.d.ts +6 -6
- 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.d.ts +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 +27 -10
- package/dist/components/scroll-zone/PlScrollZone.js +1 -1
- package/dist/components/segmented-button/PlSegmentedButton.js +1 -1
- package/dist/components/select/PlSelect.js +1 -1
- package/dist/components/show/PlShow.d.ts +76 -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/sidebar/PlSidebarTrigger.js +1 -1
- package/dist/components/skeleton/PlSkeleton.js +1 -1
- package/dist/components/slider/PlSlider.d.ts +13 -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 +16 -1
- 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 +4 -0
- package/dist/components/stat/PlStat.js +1 -1
- package/dist/components/stepper/PlStepper.d.ts +3 -3
- package/dist/components/stepper/PlStepper.js +1 -1
- package/dist/components/switch/PlSwitch.js +1 -1
- package/dist/components/table/PlTable.d.ts +5 -5
- package/dist/components/table/PlTable.js +1 -1
- package/dist/components/tabs/PlTabs.d.ts +27 -2
- package/dist/components/tabs/PlTabs.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 +2 -2
- 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/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.d.ts +10 -1
- package/dist/components/transfer/PlTransfer.js +1 -1
- package/dist/components/tree/PlTree.js +1 -1
- 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/typography/PlTypography.js +1 -1
- 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 +3 -0
- package/dist/css/back-top.css +2 -0
- package/dist/css/bar-chart.css +3 -0
- package/dist/css/calendar.css +1 -0
- package/dist/css/carousel.css +2 -0
- package/dist/css/code-block.css +2 -0
- package/dist/css/color-picker.css +1 -0
- package/dist/css/combobox.css +1 -0
- package/dist/css/command-palette.css +1 -0
- package/dist/css/confirm.css +2 -0
- package/dist/css/data-list.css +2 -0
- package/dist/css/data-table.css +7 -0
- package/dist/css/date-picker.css +1 -0
- package/dist/css/date-range-picker.css +1 -0
- package/dist/css/date-time-picker.css +1 -0
- package/dist/css/flex.css +2 -0
- package/dist/css/floating-action-button.css +4 -0
- package/dist/css/gallery.css +7 -0
- package/dist/css/gauge-chart.css +3 -0
- package/dist/css/heatmap-chart.css +3 -0
- package/dist/css/hover-card.css +2 -0
- package/dist/css/how-to-steps.css +2 -0
- package/dist/css/icon-button.css +1 -0
- package/dist/css/image.css +2 -0
- package/dist/css/line-chart.css +3 -0
- package/dist/css/menubar.css +1 -0
- package/dist/css/meter.css +2 -0
- package/dist/css/mockup.css +2 -0
- package/dist/css/pagination.css +1 -0
- package/dist/css/pie-chart.css +3 -0
- package/dist/css/popconfirm.css +2 -0
- package/dist/css/portal.css +2 -0
- package/dist/css/scatter-chart.css +3 -0
- package/dist/css/scroll-area.css +2 -0
- package/dist/css/scroll-zone.css +2 -0
- package/dist/css/show.css +2 -0
- package/dist/css/sidebar.css +3 -0
- package/dist/css/sparkline.css +3 -0
- package/dist/css/spoiler.css +1 -0
- package/dist/css/stack.css +2 -0
- package/dist/css/stat.css +1 -0
- package/dist/css/time-picker.css +1 -0
- package/dist/css/timeline-chart.css +3 -0
- package/dist/css/tour.css +3 -0
- package/dist/css/transfer.css +4 -0
- package/dist/css/tree-select.css +4 -0
- package/dist/css/window-pane.css +2 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/usePlBreakpoint.d.ts +3 -0
- package/dist/hooks/usePlBreakpoint.js +1 -1
- package/dist/hooks/usePlDisclosure.d.ts +44 -0
- package/dist/hooks/usePlDisclosure.js +1 -0
- package/dist/hooks/usePlElementSize.d.ts +34 -0
- package/dist/hooks/usePlElementSize.js +1 -0
- package/dist/hooks/usePlHotKeys.d.ts +5 -1
- package/dist/hooks/usePlHotKeys.js +1 -1
- package/dist/hooks/usePlOnScreen.d.ts +54 -0
- package/dist/hooks/usePlOnScreen.js +1 -0
- package/dist/index.d.ts +34 -1
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +121 -7
- 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 +11 -36
- package/dist/internal/calendar.js +1 -1
- package/dist/internal/chart-frame.d.ts +462 -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 +551 -0
- package/dist/internal/chart.js +1 -0
- package/dist/internal/color-scheme.js +1 -1
- package/dist/internal/data-table.d.ts +70 -0
- package/dist/internal/data-table.js +1 -0
- package/dist/internal/date.d.ts +10 -0
- package/dist/internal/date.js +1 -1
- package/dist/internal/defaults.d.ts +8 -3
- package/dist/internal/drag.d.ts +65 -0
- package/dist/internal/drag.js +1 -0
- package/dist/internal/focusable.d.ts +8 -0
- package/dist/internal/focusable.js +1 -0
- package/dist/internal/form.d.ts +61 -0
- package/dist/internal/form.js +1 -0
- package/dist/internal/format.d.ts +2 -0
- package/dist/internal/format.js +1 -1
- package/dist/internal/gallery.d.ts +80 -0
- package/dist/internal/gallery.js +1 -0
- package/dist/internal/glow.d.ts +17 -0
- package/dist/internal/glow.js +1 -0
- package/dist/internal/grid.d.ts +6 -27
- 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/image.d.ts +94 -0
- package/dist/internal/image.js +1 -0
- package/dist/internal/inert.d.ts +19 -0
- package/dist/internal/inert.js +1 -0
- package/dist/internal/keys.d.ts +19 -0
- package/dist/internal/keys.js +1 -1
- package/dist/internal/labels.d.ts +182 -0
- package/dist/internal/labels.js +1 -0
- package/dist/internal/link.d.ts +17 -0
- package/dist/internal/link.js +1 -1
- package/dist/internal/mockup.d.ts +193 -0
- package/dist/internal/mockup.js +1 -0
- package/dist/internal/page-layout.d.ts +14 -7
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/picker.d.ts +43 -6
- package/dist/internal/picker.js +1 -1
- package/dist/internal/progress.d.ts +22 -8
- package/dist/internal/progress.js +1 -1
- package/dist/internal/responsive.d.ts +108 -0
- package/dist/internal/responsive.js +1 -0
- package/dist/internal/scramble.d.ts +35 -0
- package/dist/internal/scramble.js +1 -0
- package/dist/internal/scroll-target.d.ts +5 -0
- package/dist/internal/scroll-target.js +1 -0
- package/dist/internal/steps.js +1 -1
- package/dist/internal/styles.d.ts +81 -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/text.d.ts +39 -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/tour.d.ts +42 -0
- package/dist/internal/tour.js +1 -0
- package/dist/internal/watermark.d.ts +44 -0
- package/dist/internal/watermark.js +1 -0
- package/dist/internal/wheel.d.ts +52 -0
- package/dist/internal/wheel.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.js +1 -1
- package/dist/provider/PlassProvider.js +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1357 -25
- package/dist/tokens.css +1357 -25
- package/dist/types.d.ts +368 -2
- package/package.json +26 -16
- 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
|
*
|
|
@@ -265,6 +302,92 @@
|
|
|
265
302
|
--plass-warning-accent: #96600c;
|
|
266
303
|
--plass-danger-accent: #bb3339;
|
|
267
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);
|
|
268
391
|
}
|
|
269
392
|
|
|
270
393
|
/* ---------------------------------------------------------------------------
|
|
@@ -319,6 +442,39 @@
|
|
|
319
442
|
--plass-warning-accent: #f2b74e;
|
|
320
443
|
--plass-danger-accent: #ff8a8f;
|
|
321
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);
|
|
322
478
|
}
|
|
323
479
|
}
|
|
324
480
|
|
|
@@ -363,6 +519,39 @@
|
|
|
363
519
|
--plass-warning-accent: #f2b74e;
|
|
364
520
|
--plass-danger-accent: #ff8a8f;
|
|
365
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);
|
|
366
555
|
}
|
|
367
556
|
|
|
368
557
|
/* ---------------------------------------------------------------------------
|
|
@@ -419,7 +608,11 @@
|
|
|
419
608
|
--plass-primary-soft-press: color-mix(in srgb, var(--plass-primary-accent) 26%, transparent);
|
|
420
609
|
--plass-primary-line: color-mix(in srgb, var(--plass-primary-accent) 30%, transparent);
|
|
421
610
|
--plass-primary-line-hover: color-mix(in srgb, var(--plass-primary-accent) 48%, transparent);
|
|
422
|
-
|
|
611
|
+
/* The focus ring is the accent at full strength, because it is read against
|
|
612
|
+
the page rather than looked at: the ring has to clear 3:1 against the
|
|
613
|
+
sheet round a control in both themes, and only the per-theme accent does.
|
|
614
|
+
`solid` is one colour for both, and amber on white cannot reach it. */
|
|
615
|
+
--plass-primary-ring: var(--plass-primary-accent);
|
|
423
616
|
|
|
424
617
|
--plass-secondary-fill: linear-gradient(
|
|
425
618
|
135deg,
|
|
@@ -436,7 +629,7 @@
|
|
|
436
629
|
--plass-secondary-soft-press: color-mix(in srgb, var(--plass-secondary-accent) 26%, transparent);
|
|
437
630
|
--plass-secondary-line: color-mix(in srgb, var(--plass-secondary-accent) 30%, transparent);
|
|
438
631
|
--plass-secondary-line-hover: color-mix(in srgb, var(--plass-secondary-accent) 48%, transparent);
|
|
439
|
-
--plass-secondary-ring:
|
|
632
|
+
--plass-secondary-ring: var(--plass-secondary-accent);
|
|
440
633
|
|
|
441
634
|
--plass-success-fill: linear-gradient(
|
|
442
635
|
135deg,
|
|
@@ -453,7 +646,7 @@
|
|
|
453
646
|
--plass-success-soft-press: color-mix(in srgb, var(--plass-success-accent) 26%, transparent);
|
|
454
647
|
--plass-success-line: color-mix(in srgb, var(--plass-success-accent) 30%, transparent);
|
|
455
648
|
--plass-success-line-hover: color-mix(in srgb, var(--plass-success-accent) 48%, transparent);
|
|
456
|
-
--plass-success-ring:
|
|
649
|
+
--plass-success-ring: var(--plass-success-accent);
|
|
457
650
|
|
|
458
651
|
--plass-warning-fill: linear-gradient(
|
|
459
652
|
135deg,
|
|
@@ -470,7 +663,7 @@
|
|
|
470
663
|
--plass-warning-soft-press: color-mix(in srgb, var(--plass-warning-accent) 28%, transparent);
|
|
471
664
|
--plass-warning-line: color-mix(in srgb, var(--plass-warning-accent) 34%, transparent);
|
|
472
665
|
--plass-warning-line-hover: color-mix(in srgb, var(--plass-warning-accent) 52%, transparent);
|
|
473
|
-
--plass-warning-ring:
|
|
666
|
+
--plass-warning-ring: var(--plass-warning-accent);
|
|
474
667
|
|
|
475
668
|
--plass-danger-fill: linear-gradient(
|
|
476
669
|
135deg,
|
|
@@ -487,7 +680,7 @@
|
|
|
487
680
|
--plass-danger-soft-press: color-mix(in srgb, var(--plass-danger-accent) 26%, transparent);
|
|
488
681
|
--plass-danger-line: color-mix(in srgb, var(--plass-danger-accent) 30%, transparent);
|
|
489
682
|
--plass-danger-line-hover: color-mix(in srgb, var(--plass-danger-accent) 48%, transparent);
|
|
490
|
-
--plass-danger-ring:
|
|
683
|
+
--plass-danger-ring: var(--plass-danger-accent);
|
|
491
684
|
|
|
492
685
|
--plass-info-fill: linear-gradient(
|
|
493
686
|
135deg,
|
|
@@ -504,7 +697,25 @@
|
|
|
504
697
|
--plass-info-soft-press: color-mix(in srgb, var(--plass-info-accent) 26%, transparent);
|
|
505
698
|
--plass-info-line: color-mix(in srgb, var(--plass-info-accent) 30%, transparent);
|
|
506
699
|
--plass-info-line-hover: color-mix(in srgb, var(--plass-info-accent) 48%, transparent);
|
|
507
|
-
--plass-info-ring:
|
|
700
|
+
--plass-info-ring: var(--plass-info-accent);
|
|
701
|
+
/* The three greys a chart draws its frame with, derived so a project that
|
|
702
|
+
re-tones its border moves the grid with it.
|
|
703
|
+
|
|
704
|
+
The grid is the faintest thing on the plot on purpose: a gridline that
|
|
705
|
+
competes with a data line is a reader deciding which is which. The axis is
|
|
706
|
+
the border at full strength, because it is the edge of the picture rather
|
|
707
|
+
than a reading. And the baseline is allowed to be darker than either — it
|
|
708
|
+
is where a bar starts from and where zero is, which is a fact about the
|
|
709
|
+
data rather than furniture. */
|
|
710
|
+
--plass-chart-grid: color-mix(in srgb, var(--plass-border) 70%, transparent);
|
|
711
|
+
--plass-chart-axis: var(--plass-border);
|
|
712
|
+
--plass-chart-baseline: color-mix(in srgb, var(--plass-muted-fg) 35%, transparent);
|
|
713
|
+
/* And the sheet itself, for the 2px between two marks that touch — a
|
|
714
|
+
marker's ring, the seam between two stacked bands, the halo round a
|
|
715
|
+
scatter's dot. It is the surface and not a stroke, because a coloured line
|
|
716
|
+
drawn between two marks is ink that is not data; what separates them is the
|
|
717
|
+
page showing through. */
|
|
718
|
+
--plass-chart-gap: var(--plass-surface);
|
|
508
719
|
}
|
|
509
720
|
|
|
510
721
|
/* ---------------------------------------------------------------------------
|
|
@@ -800,7 +1011,152 @@
|
|
|
800
1011
|
}
|
|
801
1012
|
|
|
802
1013
|
/* ---------------------------------------------------------------------------
|
|
803
|
-
*
|
|
1014
|
+
* A strip that runs off the end of its own box
|
|
1015
|
+
*
|
|
1016
|
+
* A row that scrolls has to say so, and on a Mac it cannot: the scrollbar is an
|
|
1017
|
+
* overlay that appears while the strip is moving and is invisible the rest of
|
|
1018
|
+
* the time, which is every moment a reader is deciding whether there is
|
|
1019
|
+
* anything more to look at. On Windows the same bar is fifteen pixels of
|
|
1020
|
+
* permanent furniture under a row of tab labels. Neither is a signal, so both
|
|
1021
|
+
* are taken away and the ends are faded instead — and *only* the end that still
|
|
1022
|
+
* has something behind it, which is the part that makes it a signal rather than
|
|
1023
|
+
* a decoration.
|
|
1024
|
+
*
|
|
1025
|
+
* The fade is a `mask-image` rather than two gradient overlays because a bar
|
|
1026
|
+
* can sit on anything. An overlay has to be painted in the colour of whatever
|
|
1027
|
+
* is behind the strip, and a component does not know that: a `PlTabs` inside a
|
|
1028
|
+
* `PlCard` inside a tinted section has three candidate backgrounds and no way
|
|
1029
|
+
* to choose. A mask takes the pixels away instead, so whatever is behind shows
|
|
1030
|
+
* through and the answer is right on every surface.
|
|
1031
|
+
*
|
|
1032
|
+
* The two lengths are per-instance slots because *which* end fades is measured
|
|
1033
|
+
* rather than declared — it depends on how far along the strip is, which no
|
|
1034
|
+
* prop can know. `0px` on both ends is a gradient with no transition in it at
|
|
1035
|
+
* all, so a strip that fits is not paying for a mask it does not need.
|
|
1036
|
+
*
|
|
1037
|
+
* They are physical (`left`, `right`) while the state the component publishes
|
|
1038
|
+
* is logical, and the split is the same one `PlTabs` already makes for its
|
|
1039
|
+
* indicator: a CSS gradient runs in a physical direction and a reader runs in
|
|
1040
|
+
* a writing direction, so the measurement is turned round once, here, rather
|
|
1041
|
+
* than in four places that could disagree.
|
|
1042
|
+
*
|
|
1043
|
+
* The mask is dropped entirely while something inside holds a visible focus
|
|
1044
|
+
* ring. Focusing a tab scrolls it flush against the edge it came from, which is
|
|
1045
|
+
* exactly where the fade is strongest — so the one control whose outline has to
|
|
1046
|
+
* be legible would be the one drawn half transparent. `:focus-visible` and not
|
|
1047
|
+
* `:focus-within`: a tab that was clicked has the focus and no ring, and a bar
|
|
1048
|
+
* that stopped fading for the rest of the session because somebody pressed a
|
|
1049
|
+
* tab would have lost the signal at the first interaction.
|
|
1050
|
+
* ------------------------------------------------------------------------- */
|
|
1051
|
+
|
|
1052
|
+
.plass-fade-x {
|
|
1053
|
+
--p-fade: 1.5rem;
|
|
1054
|
+
|
|
1055
|
+
scrollbar-width: none;
|
|
1056
|
+
mask-image: linear-gradient(
|
|
1057
|
+
to right,
|
|
1058
|
+
transparent,
|
|
1059
|
+
#000 var(--p-fade-left, 0px),
|
|
1060
|
+
#000 calc(100% - var(--p-fade-right, 0px)),
|
|
1061
|
+
transparent
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.plass-fade-x::-webkit-scrollbar {
|
|
1066
|
+
display: none;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.plass-fade-x:has(:focus-visible) {
|
|
1070
|
+
mask-image: none;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/* ---------------------------------------------------------------------------
|
|
1074
|
+
* Showing something at some widths and not others
|
|
1075
|
+
*
|
|
1076
|
+
* `PlShow`, and the reason it is CSS rather than a `useMediaQuery` and a
|
|
1077
|
+
* ternary. A media query answered in JavaScript is `false` on a server and on
|
|
1078
|
+
* the first frame a browser renders, so a JavaScript gate draws the wrong half
|
|
1079
|
+
* and then throws it away — a flash on every page load rather than an edge
|
|
1080
|
+
* case. The stylesheet knows the width before React has been asked anything.
|
|
1081
|
+
*
|
|
1082
|
+
* `display: contents` while it is showing, so the element is **not a box**: its
|
|
1083
|
+
* children take part in the parent's layout exactly as they would have without
|
|
1084
|
+
* it, and a gate inside a flex row does not become a flex item. `display: none`
|
|
1085
|
+
* is what hides, which also takes the subtree off the accessibility tree — a
|
|
1086
|
+
* gate that only moved it off screen would leave a screen reader reading both
|
|
1087
|
+
* halves of a responsive layout.
|
|
1088
|
+
*
|
|
1089
|
+
* Attribute selectors rather than Tailwind's `max-md:hidden`, and that is not a
|
|
1090
|
+
* preference: the real classes in this file are emitted *after* the utilities so
|
|
1091
|
+
* they can outrank them, which would make a `display: contents` here beat the
|
|
1092
|
+
* very variant meant to hide it. Nine rules that only fight each other are
|
|
1093
|
+
* simpler than one that has to win a sort it does not control.
|
|
1094
|
+
*
|
|
1095
|
+
* Both bounds at once is `[data-from]` and `[data-until]` on one element, and
|
|
1096
|
+
* it resolves by source order: the `from` rules come first, so a rung at or
|
|
1097
|
+
* above `until` is hidden by the later rule whatever `from` said.
|
|
1098
|
+
* ------------------------------------------------------------------------- */
|
|
1099
|
+
|
|
1100
|
+
.plass-show {
|
|
1101
|
+
display: contents;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/* Below its floor, a gate with a `from` is closed. Each rung then opens it. */
|
|
1105
|
+
.plass-show[data-from] {
|
|
1106
|
+
display: none;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
@variant sm {
|
|
1110
|
+
.plass-show[data-from='sm'] {
|
|
1111
|
+
display: contents;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
@variant md {
|
|
1116
|
+
.plass-show[data-from='md'] {
|
|
1117
|
+
display: contents;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
@variant lg {
|
|
1122
|
+
.plass-show[data-from='lg'] {
|
|
1123
|
+
display: contents;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
@variant xl {
|
|
1128
|
+
.plass-show[data-from='xl'] {
|
|
1129
|
+
display: contents;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
/* And `until` closes it again from its own rung up. */
|
|
1134
|
+
@variant sm {
|
|
1135
|
+
.plass-show[data-until='sm'] {
|
|
1136
|
+
display: none;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
@variant md {
|
|
1141
|
+
.plass-show[data-until='md'] {
|
|
1142
|
+
display: none;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
@variant lg {
|
|
1147
|
+
.plass-show[data-until='lg'] {
|
|
1148
|
+
display: none;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
@variant xl {
|
|
1153
|
+
.plass-show[data-until='xl'] {
|
|
1154
|
+
display: none;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
/* ---------------------------------------------------------------------------
|
|
1159
|
+
* The grid, and the responsive slots
|
|
804
1160
|
*
|
|
805
1161
|
* `PlGrid` is a flex row and `PlGridItem` is a width in it, which is the shape
|
|
806
1162
|
* a twelve-column grid has had since long before CSS had one of its own — and
|
|
@@ -822,16 +1178,233 @@
|
|
|
822
1178
|
* chains get long at `xl`; that is the cost of keeping the DOM lean, and it is
|
|
823
1179
|
* paid once here rather than on every grid item in a consumer's app.
|
|
824
1180
|
*
|
|
825
|
-
* The widths are Tailwind's own breakpoints
|
|
826
|
-
*
|
|
1181
|
+
* The widths are Tailwind's own breakpoints — `@variant` rather than a written
|
|
1182
|
+
* out `@media`, so a project that moves one in its theme moves this with it.
|
|
1183
|
+
* See "The breakpoint ladder" above.
|
|
1184
|
+
*
|
|
1185
|
+
* `.plass-container`'s measure and `.plass-flex`'s axis ride the same four
|
|
1186
|
+
* blocks, and any responsive prop added later should too. That is the whole
|
|
1187
|
+
* cost of one: a slot in `internal/responsive.ts` and four lines here. CSS has
|
|
1188
|
+
* no loop, so four lines is the floor — which is the reason to keep the number
|
|
1189
|
+
* of responsive props deliberate rather than to make every prop responsive
|
|
1190
|
+
* because it could be.
|
|
1191
|
+
*
|
|
1192
|
+
* The two gutters are declared for `.plass-grid` and `.plass-flex` together.
|
|
1193
|
+
* They are one question asked by two components — the space *between* the
|
|
1194
|
+
* things in a box — and a second copy of the chain is a second place for it to
|
|
1195
|
+
* drift.
|
|
827
1196
|
* ------------------------------------------------------------------------- */
|
|
828
1197
|
|
|
829
|
-
|
|
830
|
-
|
|
1198
|
+
/*
|
|
1199
|
+
* The per-breakpoint slots do not inherit. Each one is written inline on the
|
|
1200
|
+
* element that reads it, and a custom property is inherited by default, so a
|
|
1201
|
+
* `PlFlex` nested in another took every rung its parent named and it did not:
|
|
1202
|
+
* a vertical flex inside `{ xs: 'vertical', md: 'horizontal' }` turned
|
|
1203
|
+
* horizontal at `md`, and a `PlGridItem` with no `span` inside a cell of eight
|
|
1204
|
+
* was eight columns wide. The slots they resolve into (`--p-cols`, `--p-gap-x`)
|
|
1205
|
+
* still inherit, which is how a grid item reads its grid.
|
|
1206
|
+
*/
|
|
1207
|
+
@property --p-gap-x-xs {
|
|
1208
|
+
syntax: '*';
|
|
1209
|
+
inherits: false;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
@property --p-gap-x-sm {
|
|
1213
|
+
syntax: '*';
|
|
1214
|
+
inherits: false;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
@property --p-gap-x-md {
|
|
1218
|
+
syntax: '*';
|
|
1219
|
+
inherits: false;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
@property --p-gap-x-lg {
|
|
1223
|
+
syntax: '*';
|
|
1224
|
+
inherits: false;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
@property --p-gap-x-xl {
|
|
1228
|
+
syntax: '*';
|
|
1229
|
+
inherits: false;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
@property --p-gap-y-xs {
|
|
1233
|
+
syntax: '*';
|
|
1234
|
+
inherits: false;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
@property --p-gap-y-sm {
|
|
1238
|
+
syntax: '*';
|
|
1239
|
+
inherits: false;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
@property --p-gap-y-md {
|
|
1243
|
+
syntax: '*';
|
|
1244
|
+
inherits: false;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
@property --p-gap-y-lg {
|
|
1248
|
+
syntax: '*';
|
|
1249
|
+
inherits: false;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
@property --p-gap-y-xl {
|
|
1253
|
+
syntax: '*';
|
|
1254
|
+
inherits: false;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
@property --p-cols-xs {
|
|
1258
|
+
syntax: '*';
|
|
1259
|
+
inherits: false;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
@property --p-cols-sm {
|
|
1263
|
+
syntax: '*';
|
|
1264
|
+
inherits: false;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
@property --p-cols-md {
|
|
1268
|
+
syntax: '*';
|
|
1269
|
+
inherits: false;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
@property --p-cols-lg {
|
|
1273
|
+
syntax: '*';
|
|
1274
|
+
inherits: false;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
@property --p-cols-xl {
|
|
1278
|
+
syntax: '*';
|
|
1279
|
+
inherits: false;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
@property --p-dir-xs {
|
|
1283
|
+
syntax: '*';
|
|
1284
|
+
inherits: false;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
@property --p-dir-sm {
|
|
1288
|
+
syntax: '*';
|
|
1289
|
+
inherits: false;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
@property --p-dir-md {
|
|
1293
|
+
syntax: '*';
|
|
1294
|
+
inherits: false;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
@property --p-dir-lg {
|
|
1298
|
+
syntax: '*';
|
|
1299
|
+
inherits: false;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
@property --p-dir-xl {
|
|
1303
|
+
syntax: '*';
|
|
1304
|
+
inherits: false;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
@property --p-span-xs {
|
|
1308
|
+
syntax: '*';
|
|
1309
|
+
inherits: false;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
@property --p-span-sm {
|
|
1313
|
+
syntax: '*';
|
|
1314
|
+
inherits: false;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
@property --p-span-md {
|
|
1318
|
+
syntax: '*';
|
|
1319
|
+
inherits: false;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
@property --p-span-lg {
|
|
1323
|
+
syntax: '*';
|
|
1324
|
+
inherits: false;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
@property --p-span-xl {
|
|
1328
|
+
syntax: '*';
|
|
1329
|
+
inherits: false;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
@property --p-offset-xs {
|
|
1333
|
+
syntax: '*';
|
|
1334
|
+
inherits: false;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
@property --p-offset-sm {
|
|
1338
|
+
syntax: '*';
|
|
1339
|
+
inherits: false;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
@property --p-offset-md {
|
|
1343
|
+
syntax: '*';
|
|
1344
|
+
inherits: false;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
@property --p-offset-lg {
|
|
1348
|
+
syntax: '*';
|
|
1349
|
+
inherits: false;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
@property --p-offset-xl {
|
|
1353
|
+
syntax: '*';
|
|
1354
|
+
inherits: false;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
@property --p-maxw-xs {
|
|
1358
|
+
syntax: '*';
|
|
1359
|
+
inherits: false;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
@property --p-maxw-sm {
|
|
1363
|
+
syntax: '*';
|
|
1364
|
+
inherits: false;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
@property --p-maxw-md {
|
|
1368
|
+
syntax: '*';
|
|
1369
|
+
inherits: false;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
@property --p-maxw-lg {
|
|
1373
|
+
syntax: '*';
|
|
1374
|
+
inherits: false;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
@property --p-maxw-xl {
|
|
1378
|
+
syntax: '*';
|
|
1379
|
+
inherits: false;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.plass-grid,
|
|
1383
|
+
.plass-flex {
|
|
831
1384
|
--p-gap-x: var(--p-gap-x-xs, 0px);
|
|
832
1385
|
--p-gap-y: var(--p-gap-y-xs, 0px);
|
|
833
1386
|
}
|
|
834
1387
|
|
|
1388
|
+
.plass-grid {
|
|
1389
|
+
--p-cols: var(--p-cols-xs, 12);
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
.plass-gallery {
|
|
1393
|
+
--p-cols: var(--p-cols-xs, 2);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/*
|
|
1397
|
+
* `PlFlex`'s axis. One slot rather than two, because `reverse` is not
|
|
1398
|
+
* responsive and the direction is: the component folds the two into the four
|
|
1399
|
+
* values `flex-direction` takes, so a breakpoint changes the axis without
|
|
1400
|
+
* having to restate which end it starts from.
|
|
1401
|
+
*/
|
|
1402
|
+
.plass-flex {
|
|
1403
|
+
--p-dir: var(--p-dir-xs, row);
|
|
1404
|
+
|
|
1405
|
+
flex-direction: var(--p-dir);
|
|
1406
|
+
}
|
|
1407
|
+
|
|
835
1408
|
.plass-grid-item {
|
|
836
1409
|
--p-span: var(--p-span-xs, var(--p-cols, 12));
|
|
837
1410
|
--p-offset: var(--p-offset-xs, 0);
|
|
@@ -850,39 +1423,102 @@
|
|
|
850
1423
|
margin-inline-start: calc(var(--p-track) * min(var(--p-offset), var(--p-cols, 12)));
|
|
851
1424
|
}
|
|
852
1425
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
1426
|
+
/*
|
|
1427
|
+
* The measure, and the one thing a container draws.
|
|
1428
|
+
*
|
|
1429
|
+
* A slot rather than five `max-w-*` classes, because a responsive measure would
|
|
1430
|
+
* otherwise be five classes times five rungs. It also takes any length a caller
|
|
1431
|
+
* writes, which the class ladder could not: `maxWidth="72ch"` is a measure in
|
|
1432
|
+
* characters, and a measure in characters is the one a paragraph actually
|
|
1433
|
+
* wants.
|
|
1434
|
+
*/
|
|
1435
|
+
.plass-container {
|
|
1436
|
+
--p-maxw: var(--p-maxw-xs, none);
|
|
1437
|
+
|
|
1438
|
+
max-width: var(--p-maxw);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
@variant sm {
|
|
1442
|
+
.plass-container {
|
|
1443
|
+
--p-maxw: var(--p-maxw-sm, var(--p-maxw-xs, none));
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
.plass-grid,
|
|
1447
|
+
.plass-flex {
|
|
856
1448
|
--p-gap-x: var(--p-gap-x-sm, var(--p-gap-x-xs, 0px));
|
|
857
1449
|
--p-gap-y: var(--p-gap-y-sm, var(--p-gap-y-xs, 0px));
|
|
858
1450
|
}
|
|
859
1451
|
|
|
1452
|
+
.plass-grid {
|
|
1453
|
+
--p-cols: var(--p-cols-sm, var(--p-cols-xs, 12));
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
.plass-gallery {
|
|
1457
|
+
--p-cols: var(--p-cols-sm, var(--p-cols-xs, 2));
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
.plass-flex {
|
|
1461
|
+
--p-dir: var(--p-dir-sm, var(--p-dir-xs, row));
|
|
1462
|
+
}
|
|
1463
|
+
|
|
860
1464
|
.plass-grid-item {
|
|
861
1465
|
--p-span: var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12)));
|
|
862
1466
|
--p-offset: var(--p-offset-sm, var(--p-offset-xs, 0));
|
|
863
1467
|
}
|
|
864
1468
|
}
|
|
865
1469
|
|
|
866
|
-
@
|
|
867
|
-
.plass-
|
|
868
|
-
--p-
|
|
1470
|
+
@variant md {
|
|
1471
|
+
.plass-container {
|
|
1472
|
+
--p-maxw: var(--p-maxw-md, var(--p-maxw-sm, var(--p-maxw-xs, none)));
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
.plass-grid,
|
|
1476
|
+
.plass-flex {
|
|
869
1477
|
--p-gap-x: var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px)));
|
|
870
1478
|
--p-gap-y: var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px)));
|
|
871
1479
|
}
|
|
872
1480
|
|
|
1481
|
+
.plass-grid {
|
|
1482
|
+
--p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12)));
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.plass-gallery {
|
|
1486
|
+
--p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2)));
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.plass-flex {
|
|
1490
|
+
--p-dir: var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row)));
|
|
1491
|
+
}
|
|
1492
|
+
|
|
873
1493
|
.plass-grid-item {
|
|
874
1494
|
--p-span: var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12))));
|
|
875
1495
|
--p-offset: var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0)));
|
|
876
1496
|
}
|
|
877
1497
|
}
|
|
878
1498
|
|
|
879
|
-
@
|
|
880
|
-
.plass-
|
|
881
|
-
--p-
|
|
1499
|
+
@variant lg {
|
|
1500
|
+
.plass-container {
|
|
1501
|
+
--p-maxw: var(--p-maxw-lg, var(--p-maxw-md, var(--p-maxw-sm, var(--p-maxw-xs, none))));
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
.plass-grid,
|
|
1505
|
+
.plass-flex {
|
|
882
1506
|
--p-gap-x: var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))));
|
|
883
1507
|
--p-gap-y: var(--p-gap-y-lg, var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px))));
|
|
884
1508
|
}
|
|
885
1509
|
|
|
1510
|
+
.plass-grid {
|
|
1511
|
+
--p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))));
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
.plass-gallery {
|
|
1515
|
+
--p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2))));
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
.plass-flex {
|
|
1519
|
+
--p-dir: var(--p-dir-lg, var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row))));
|
|
1520
|
+
}
|
|
1521
|
+
|
|
886
1522
|
.plass-grid-item {
|
|
887
1523
|
--p-span: var(
|
|
888
1524
|
--p-span-lg,
|
|
@@ -892,12 +1528,16 @@
|
|
|
892
1528
|
}
|
|
893
1529
|
}
|
|
894
1530
|
|
|
895
|
-
@
|
|
896
|
-
.plass-
|
|
897
|
-
--p-
|
|
898
|
-
--p-
|
|
899
|
-
var(--p-
|
|
1531
|
+
@variant xl {
|
|
1532
|
+
.plass-container {
|
|
1533
|
+
--p-maxw: var(
|
|
1534
|
+
--p-maxw-xl,
|
|
1535
|
+
var(--p-maxw-lg, var(--p-maxw-md, var(--p-maxw-sm, var(--p-maxw-xs, none))))
|
|
900
1536
|
);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.plass-grid,
|
|
1540
|
+
.plass-flex {
|
|
901
1541
|
--p-gap-x: var(
|
|
902
1542
|
--p-gap-x-xl,
|
|
903
1543
|
var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))))
|
|
@@ -908,6 +1548,27 @@
|
|
|
908
1548
|
);
|
|
909
1549
|
}
|
|
910
1550
|
|
|
1551
|
+
.plass-grid {
|
|
1552
|
+
--p-cols: var(
|
|
1553
|
+
--p-cols-xl,
|
|
1554
|
+
var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))))
|
|
1555
|
+
);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.plass-gallery {
|
|
1559
|
+
--p-cols: var(
|
|
1560
|
+
--p-cols-xl,
|
|
1561
|
+
var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2))))
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
.plass-flex {
|
|
1566
|
+
--p-dir: var(
|
|
1567
|
+
--p-dir-xl,
|
|
1568
|
+
var(--p-dir-lg, var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row))))
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
911
1572
|
.plass-grid-item {
|
|
912
1573
|
--p-span: var(
|
|
913
1574
|
--p-span-xl,
|
|
@@ -957,6 +1618,34 @@
|
|
|
957
1618
|
animation-play-state: var(--p-anim-state, running);
|
|
958
1619
|
}
|
|
959
1620
|
|
|
1621
|
+
/*
|
|
1622
|
+
* `timeline="view"`, and the whole of it.
|
|
1623
|
+
*
|
|
1624
|
+
* Two declarations give **every** keyframe in this file a scroll-linked mode:
|
|
1625
|
+
* the effect stops being a thing that happens at a moment and becomes a thing
|
|
1626
|
+
* that tracks where the element is in the scrollport. There is no component for
|
|
1627
|
+
* it and there should not be, because there is nothing a component would add —
|
|
1628
|
+
* an effect already knows what it draws, and this only changes what advances
|
|
1629
|
+
* it.
|
|
1630
|
+
*
|
|
1631
|
+
* `@supports` is not optional. `animation-timeline` is progressively enhanced
|
|
1632
|
+
* and an engine that does not know the property would drop these two lines but
|
|
1633
|
+
* keep the `animation-duration` above, which is the *right* fallback: a clock
|
|
1634
|
+
* plays the effect once and the content arrives. Handing an unsupported browser
|
|
1635
|
+
* a timeline it cannot resolve is what would leave a blank page. Degraded is
|
|
1636
|
+
* allowed; blank is not.
|
|
1637
|
+
*
|
|
1638
|
+
* The slots are only filled when a caller asks for `view`, so the default costs
|
|
1639
|
+
* nothing at all: `auto` is what the property already resolves to, and writing
|
|
1640
|
+
* it into a hundred inline styles would be a hundred copies of the same answer.
|
|
1641
|
+
*/
|
|
1642
|
+
@supports (animation-timeline: view()) {
|
|
1643
|
+
.plass-anim {
|
|
1644
|
+
animation-timeline: var(--p-anim-timeline, auto);
|
|
1645
|
+
animation-range: var(--p-anim-range, normal);
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
|
|
960
1649
|
@keyframes plass-anim-fade {
|
|
961
1650
|
from {
|
|
962
1651
|
opacity: var(--p-anim-opacity, 0);
|
|
@@ -987,6 +1676,36 @@
|
|
|
987
1676
|
animation-name: plass-anim-scale;
|
|
988
1677
|
}
|
|
989
1678
|
|
|
1679
|
+
/*
|
|
1680
|
+
* The one entrance that moves nothing and changes no colour.
|
|
1681
|
+
*
|
|
1682
|
+
* `clip-path` rather than a mask or an `overflow` box, and the choice is worth
|
|
1683
|
+
* writing down because the alternatives look equivalent. A mask needs a
|
|
1684
|
+
* gradient that has to be kept in step with the direction; an `overflow`
|
|
1685
|
+
* wrapper puts a second element into the layout, which is exactly what an
|
|
1686
|
+
* effect for something whose *position* is the information must not do. And
|
|
1687
|
+
* `inset(0)` already means "nothing is cut off", so the to-state is the
|
|
1688
|
+
* element's own natural one rather than a number that has to be chosen.
|
|
1689
|
+
*
|
|
1690
|
+
* The opacity slot defaults to `1` here and to `0` everywhere else in this
|
|
1691
|
+
* file. A reveal is not a fade — the whole reason to reach for it is that the
|
|
1692
|
+
* ink does not change — so fading is opt-in rather than something to turn off.
|
|
1693
|
+
*/
|
|
1694
|
+
@keyframes plass-anim-reveal {
|
|
1695
|
+
from {
|
|
1696
|
+
opacity: var(--p-anim-opacity, 1);
|
|
1697
|
+
clip-path: var(--p-anim-clip, inset(0 100% 0 0));
|
|
1698
|
+
}
|
|
1699
|
+
to {
|
|
1700
|
+
opacity: 1;
|
|
1701
|
+
clip-path: inset(0);
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
.plass-anim-reveal {
|
|
1706
|
+
animation-name: plass-anim-reveal;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
990
1709
|
@keyframes plass-anim-slide {
|
|
991
1710
|
from {
|
|
992
1711
|
opacity: var(--p-anim-opacity, 0);
|
|
@@ -1035,6 +1754,67 @@
|
|
|
1035
1754
|
animation-name: plass-anim-blink;
|
|
1036
1755
|
}
|
|
1037
1756
|
|
|
1757
|
+
/*
|
|
1758
|
+
* A refusal.
|
|
1759
|
+
*
|
|
1760
|
+
* Three shudders either side of home and back to nothing, so an element that
|
|
1761
|
+
* has been shaken is exactly where it was — this is the one effect in the file
|
|
1762
|
+
* that a caller will run over content that is still being typed into, and a
|
|
1763
|
+
* field left a few pixels off its label would be worse than the error it was
|
|
1764
|
+
* reporting.
|
|
1765
|
+
*
|
|
1766
|
+
* Not one of the entrances, and not in `PlassAnimation`, for `plass-anim-float`'s
|
|
1767
|
+
* reason: that union is the set of ways content can *arrive*, and a response to
|
|
1768
|
+
* something a reader did is not an arrival.
|
|
1769
|
+
*/
|
|
1770
|
+
@keyframes plass-anim-shake {
|
|
1771
|
+
0%,
|
|
1772
|
+
100% {
|
|
1773
|
+
translate: 0 0;
|
|
1774
|
+
}
|
|
1775
|
+
15%,
|
|
1776
|
+
45%,
|
|
1777
|
+
75% {
|
|
1778
|
+
translate: calc(var(--p-anim-x, 6px) * -1) 0;
|
|
1779
|
+
}
|
|
1780
|
+
30%,
|
|
1781
|
+
60%,
|
|
1782
|
+
90% {
|
|
1783
|
+
translate: var(--p-anim-x, 6px) 0;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.plass-anim-shake {
|
|
1788
|
+
animation-name: plass-anim-shake;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
/*
|
|
1792
|
+
* An endless drift.
|
|
1793
|
+
*
|
|
1794
|
+
* Symmetric like the blink above and for the same reason: however many times it
|
|
1795
|
+
* runs it ends where it started, so a float that was stopped mid-cycle does not
|
|
1796
|
+
* leave the element permanently a few pixels out of place.
|
|
1797
|
+
*
|
|
1798
|
+
* It is **not** one of the entrances, and it is not in `PlassAnimation` either.
|
|
1799
|
+
* That union is the set of ways content can *arrive*, and every component
|
|
1800
|
+
* importing the map that backs it pays for each row whether it uses it or not;
|
|
1801
|
+
* a drift that never finishes is not an arrival and would be a row nothing else
|
|
1802
|
+
* could ever want.
|
|
1803
|
+
*/
|
|
1804
|
+
@keyframes plass-anim-float {
|
|
1805
|
+
0%,
|
|
1806
|
+
100% {
|
|
1807
|
+
translate: 0 0;
|
|
1808
|
+
}
|
|
1809
|
+
50% {
|
|
1810
|
+
translate: var(--p-anim-x, 0) var(--p-anim-y, 0);
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
.plass-anim-float {
|
|
1815
|
+
animation-name: plass-anim-float;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1038
1818
|
/*
|
|
1039
1819
|
* The light travelling around the outside of something.
|
|
1040
1820
|
*
|
|
@@ -1130,6 +1910,12 @@
|
|
|
1130
1910
|
flex-direction: column;
|
|
1131
1911
|
}
|
|
1132
1912
|
|
|
1913
|
+
/* Inset, so a box inside something that clips does not lose its ring. */
|
|
1914
|
+
.plass-marquee:focus-visible {
|
|
1915
|
+
outline: 2px solid var(--plass-primary-ring);
|
|
1916
|
+
outline-offset: -2px;
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1133
1919
|
.plass-marquee-track {
|
|
1134
1920
|
display: flex;
|
|
1135
1921
|
flex: 0 0 auto;
|
|
@@ -1246,6 +2032,531 @@
|
|
|
1246
2032
|
animation: plass-anim-caret 1s step-end infinite;
|
|
1247
2033
|
}
|
|
1248
2034
|
|
|
2035
|
+
/* ---------------------------------------------------------------------------
|
|
2036
|
+
* Code blocks
|
|
2037
|
+
*
|
|
2038
|
+
* A `PlCodeBlock` is the one surface in the library that does **not** take the
|
|
2039
|
+
* page's palette. Code is read against a background that was chosen for code,
|
|
2040
|
+
* and a block that turned white because the page did would throw away the only
|
|
2041
|
+
* thing a reader is using to tell a keyword from a string. So the sheet carries
|
|
2042
|
+
* its own slots, `theme` picks which set fills them, and `auto` is the opt-in
|
|
2043
|
+
* for a block that would rather follow the page.
|
|
2044
|
+
*
|
|
2045
|
+
* They are custom properties on the block rather than a stylesheet per theme
|
|
2046
|
+
* for `internal/animate.ts`'s reason: nothing here is generated, the component only
|
|
2047
|
+
* fills slots, and a thirteenth theme is a block of declarations rather than a
|
|
2048
|
+
* second copy of the token map below. That is also why `theme` accepts any
|
|
2049
|
+
* string: a consumer who writes `[data-code-theme='ours']` in their own CSS has
|
|
2050
|
+
* a theme, with nothing to register and nothing to import.
|
|
2051
|
+
*
|
|
2052
|
+
* **Five of the slots are derived and are never written per theme.** `dim`,
|
|
2053
|
+
* `rule` and `hover` are a fixed mix of the ground and the ink, and `mark` and
|
|
2054
|
+
* `mark-edge` are the same for the highlighted-line background. A custom
|
|
2055
|
+
* property resolves its `var()`s on the element that declares it, and every
|
|
2056
|
+
* theme below declares its `fg` and `bg` on that same element — so the derived
|
|
2057
|
+
* five follow whichever theme won without being restated fourteen times.
|
|
2058
|
+
*
|
|
2059
|
+
* The two dark palettes at the top are written twice on purpose — once for
|
|
2060
|
+
* `dark`, once for `auto` inside a dark page — because a media query cannot be
|
|
2061
|
+
* folded into a selector list. It is the same repetition the theme roots at the
|
|
2062
|
+
* top of this file make, for the same reason.
|
|
2063
|
+
*
|
|
2064
|
+
* Every hue in the house themes is solved against its own background rather
|
|
2065
|
+
* than flipped: the light set runs dark and saturated on near-white, the dark
|
|
2066
|
+
* set light and desaturated on near-black. The pairs that have to stay apart
|
|
2067
|
+
* are the ones that sit next to each other in real code — a string beside a
|
|
2068
|
+
* number, a type beside a function name. The eight named themes below them are
|
|
2069
|
+
* ports and keep their own published values, because a Dracula that had been
|
|
2070
|
+
* re-solved would not be Dracula.
|
|
2071
|
+
* ------------------------------------------------------------------------- */
|
|
2072
|
+
|
|
2073
|
+
.plass-code {
|
|
2074
|
+
/* The light set, which is also what `auto` and `light` start from. */
|
|
2075
|
+
--p-code-bg: oklch(98.4% 0.003 262);
|
|
2076
|
+
--p-code-fg: oklch(30% 0.016 262);
|
|
2077
|
+
|
|
2078
|
+
--p-code-comment: oklch(58% 0.022 262);
|
|
2079
|
+
--p-code-keyword: oklch(48% 0.19 322);
|
|
2080
|
+
--p-code-string: oklch(46% 0.12 148);
|
|
2081
|
+
--p-code-number: oklch(50% 0.14 48);
|
|
2082
|
+
--p-code-function: oklch(48% 0.17 264);
|
|
2083
|
+
--p-code-type: oklch(45% 0.1 214);
|
|
2084
|
+
--p-code-variable: oklch(45% 0.12 28);
|
|
2085
|
+
--p-code-tag: oklch(48% 0.18 22);
|
|
2086
|
+
--p-code-attr: oklch(47% 0.13 82);
|
|
2087
|
+
--p-code-meta: oklch(52% 0.05 262);
|
|
2088
|
+
--p-code-add: oklch(45% 0.14 152);
|
|
2089
|
+
--p-code-del: oklch(48% 0.18 25);
|
|
2090
|
+
|
|
2091
|
+
/* The derived five. Declared once here and never in a theme: they are a mix
|
|
2092
|
+
of that theme's own ground and ink, which resolves on this element. */
|
|
2093
|
+
--p-code-dim: color-mix(in oklab, var(--p-code-fg) 58%, var(--p-code-bg));
|
|
2094
|
+
--p-code-rule: color-mix(in oklab, var(--p-code-fg) 14%, transparent);
|
|
2095
|
+
--p-code-hover: color-mix(in oklab, var(--p-code-fg) 9%, transparent);
|
|
2096
|
+
|
|
2097
|
+
/* A marked line is neutral rather than dyed with the page's accent family:
|
|
2098
|
+
the block has deliberately refused the page's palette, and a primary-blue
|
|
2099
|
+
wash over Dracula would be the one colour on it nobody chose. Mixed from
|
|
2100
|
+
the theme's own ink, it is legible on all twelve. */
|
|
2101
|
+
--p-code-mark: color-mix(in oklab, var(--p-code-fg) 10%, transparent);
|
|
2102
|
+
--p-code-mark-edge: color-mix(in oklab, var(--p-code-fg) 45%, transparent);
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
.plass-code[data-code-theme='dark'],
|
|
2106
|
+
:where(.dark, [data-theme='dark']) .plass-code[data-code-theme='auto'] {
|
|
2107
|
+
--p-code-bg: oklch(19.5% 0.014 262);
|
|
2108
|
+
--p-code-fg: oklch(90% 0.012 262);
|
|
2109
|
+
|
|
2110
|
+
--p-code-comment: oklch(60% 0.024 262);
|
|
2111
|
+
--p-code-keyword: oklch(76% 0.13 324);
|
|
2112
|
+
--p-code-string: oklch(80% 0.13 148);
|
|
2113
|
+
--p-code-number: oklch(81% 0.12 62);
|
|
2114
|
+
--p-code-function: oklch(78% 0.12 258);
|
|
2115
|
+
--p-code-type: oklch(82% 0.1 210);
|
|
2116
|
+
--p-code-variable: oklch(82% 0.09 32);
|
|
2117
|
+
--p-code-tag: oklch(77% 0.13 22);
|
|
2118
|
+
--p-code-attr: oklch(85% 0.11 92);
|
|
2119
|
+
--p-code-meta: oklch(70% 0.05 262);
|
|
2120
|
+
--p-code-add: oklch(80% 0.14 152);
|
|
2121
|
+
--p-code-del: oklch(75% 0.15 25);
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
/* Both ways of forcing light are named, the same pair the token block above
|
|
2125
|
+
answers to. `auto` means "whatever the page is", so a page that has said it
|
|
2126
|
+
is light with `.light` and one that has said it with `[data-theme='light']`
|
|
2127
|
+
have to leave the block light alike — otherwise the page is white and the
|
|
2128
|
+
code on it is the one dark rectangle nobody asked for. */
|
|
2129
|
+
@media (prefers-color-scheme: dark) {
|
|
2130
|
+
:root:not(.light):not([data-theme='light']) .plass-code[data-code-theme='auto'] {
|
|
2131
|
+
--p-code-bg: oklch(19.5% 0.014 262);
|
|
2132
|
+
--p-code-fg: oklch(90% 0.012 262);
|
|
2133
|
+
|
|
2134
|
+
--p-code-comment: oklch(60% 0.024 262);
|
|
2135
|
+
--p-code-keyword: oklch(76% 0.13 324);
|
|
2136
|
+
--p-code-string: oklch(80% 0.13 148);
|
|
2137
|
+
--p-code-number: oklch(81% 0.12 62);
|
|
2138
|
+
--p-code-function: oklch(78% 0.12 258);
|
|
2139
|
+
--p-code-type: oklch(82% 0.1 210);
|
|
2140
|
+
--p-code-variable: oklch(82% 0.09 32);
|
|
2141
|
+
--p-code-tag: oklch(77% 0.13 22);
|
|
2142
|
+
--p-code-attr: oklch(85% 0.11 92);
|
|
2143
|
+
--p-code-meta: oklch(70% 0.05 262);
|
|
2144
|
+
--p-code-add: oklch(80% 0.14 152);
|
|
2145
|
+
--p-code-del: oklch(75% 0.15 25);
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
/*
|
|
2150
|
+
* `mono` is the one theme that follows the page, and the only one with no hue
|
|
2151
|
+
* in it at all: the structure is carried by weight and by how far a run is
|
|
2152
|
+
* muted. It is what a block printed on paper, or read by someone who cannot
|
|
2153
|
+
* separate the hues above, is left with — so it has to stay legible on its own
|
|
2154
|
+
* rather than being a degraded copy of a colour theme.
|
|
2155
|
+
*/
|
|
2156
|
+
.plass-code[data-code-theme='mono'] {
|
|
2157
|
+
--p-code-bg: color-mix(in oklab, var(--plass-fg) 4%, var(--plass-surface));
|
|
2158
|
+
--p-code-fg: var(--plass-fg);
|
|
2159
|
+
|
|
2160
|
+
--p-code-comment: var(--plass-muted-fg);
|
|
2161
|
+
--p-code-keyword: var(--plass-fg);
|
|
2162
|
+
--p-code-string: var(--plass-muted-fg);
|
|
2163
|
+
--p-code-number: var(--plass-muted-fg);
|
|
2164
|
+
--p-code-function: var(--plass-fg);
|
|
2165
|
+
--p-code-type: var(--plass-fg);
|
|
2166
|
+
--p-code-variable: var(--plass-fg);
|
|
2167
|
+
--p-code-tag: var(--plass-fg);
|
|
2168
|
+
--p-code-attr: var(--plass-muted-fg);
|
|
2169
|
+
--p-code-meta: var(--plass-muted-fg);
|
|
2170
|
+
--p-code-add: var(--plass-fg);
|
|
2171
|
+
--p-code-del: var(--plass-muted-fg);
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
.plass-code[data-code-theme='mono'] .hljs-keyword,
|
|
2175
|
+
.plass-code[data-code-theme='mono'] .hljs-selector-tag,
|
|
2176
|
+
.plass-code[data-code-theme='mono'] .hljs-title,
|
|
2177
|
+
.plass-code[data-code-theme='mono'] .hljs-tag,
|
|
2178
|
+
.plass-code[data-code-theme='mono'] .hljs-type,
|
|
2179
|
+
.plass-code[data-code-theme='mono'] .hljs-built_in {
|
|
2180
|
+
font-weight: 600;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
/*
|
|
2184
|
+
* The eight ports.
|
|
2185
|
+
*
|
|
2186
|
+
* They exist because a code block is the one component whose colours a reader
|
|
2187
|
+
* already has an opinion about: someone who writes in One Dark all day reads a
|
|
2188
|
+
* Dracula block as a different product's documentation. The published values
|
|
2189
|
+
* are kept exactly, in the hex they were published in, rather than re-solved
|
|
2190
|
+
* into the oklch the rest of this file uses — a Dracula that had been corrected
|
|
2191
|
+
* against Neba's own ground would be a theme nobody recognises and nobody
|
|
2192
|
+
* asked for.
|
|
2193
|
+
*
|
|
2194
|
+
* Six dark and two light, which is the ratio of how they are used. Each is
|
|
2195
|
+
* fourteen declarations, because the muted, the rule, the hover and the two
|
|
2196
|
+
* marked-line slots are all derived from the two at the top of it.
|
|
2197
|
+
*/
|
|
2198
|
+
.plass-code[data-code-theme='one-dark'] {
|
|
2199
|
+
--p-code-bg: #282c34;
|
|
2200
|
+
--p-code-fg: #abb2bf;
|
|
2201
|
+
|
|
2202
|
+
--p-code-comment: #5c6370;
|
|
2203
|
+
--p-code-keyword: #c678dd;
|
|
2204
|
+
--p-code-string: #98c379;
|
|
2205
|
+
--p-code-number: #d19a66;
|
|
2206
|
+
--p-code-function: #61afef;
|
|
2207
|
+
--p-code-type: #e5c07b;
|
|
2208
|
+
--p-code-variable: #e06c75;
|
|
2209
|
+
--p-code-tag: #e06c75;
|
|
2210
|
+
--p-code-attr: #d19a66;
|
|
2211
|
+
--p-code-meta: #56b6c2;
|
|
2212
|
+
--p-code-add: #98c379;
|
|
2213
|
+
--p-code-del: #e06c75;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.plass-code[data-code-theme='dracula'] {
|
|
2217
|
+
--p-code-bg: #282a36;
|
|
2218
|
+
--p-code-fg: #f8f8f2;
|
|
2219
|
+
|
|
2220
|
+
--p-code-comment: #6272a4;
|
|
2221
|
+
--p-code-keyword: #ff79c6;
|
|
2222
|
+
--p-code-string: #f1fa8c;
|
|
2223
|
+
--p-code-number: #bd93f9;
|
|
2224
|
+
--p-code-function: #50fa7b;
|
|
2225
|
+
--p-code-type: #8be9fd;
|
|
2226
|
+
--p-code-variable: #f8f8f2;
|
|
2227
|
+
--p-code-tag: #ff79c6;
|
|
2228
|
+
--p-code-attr: #50fa7b;
|
|
2229
|
+
--p-code-meta: #6272a4;
|
|
2230
|
+
--p-code-add: #50fa7b;
|
|
2231
|
+
--p-code-del: #ff5555;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
.plass-code[data-code-theme='monokai'] {
|
|
2235
|
+
--p-code-bg: #272822;
|
|
2236
|
+
--p-code-fg: #f8f8f2;
|
|
2237
|
+
|
|
2238
|
+
--p-code-comment: #75715e;
|
|
2239
|
+
--p-code-keyword: #f92672;
|
|
2240
|
+
--p-code-string: #e6db74;
|
|
2241
|
+
--p-code-number: #ae81ff;
|
|
2242
|
+
--p-code-function: #a6e22e;
|
|
2243
|
+
--p-code-type: #66d9ef;
|
|
2244
|
+
--p-code-variable: #f8f8f2;
|
|
2245
|
+
--p-code-tag: #f92672;
|
|
2246
|
+
--p-code-attr: #a6e22e;
|
|
2247
|
+
--p-code-meta: #75715e;
|
|
2248
|
+
--p-code-add: #a6e22e;
|
|
2249
|
+
--p-code-del: #f92672;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
.plass-code[data-code-theme='nord'] {
|
|
2253
|
+
--p-code-bg: #2e3440;
|
|
2254
|
+
--p-code-fg: #d8dee9;
|
|
2255
|
+
|
|
2256
|
+
--p-code-comment: #616e88;
|
|
2257
|
+
--p-code-keyword: #81a1c1;
|
|
2258
|
+
--p-code-string: #a3be8c;
|
|
2259
|
+
--p-code-number: #b48ead;
|
|
2260
|
+
--p-code-function: #88c0d0;
|
|
2261
|
+
--p-code-type: #8fbcbb;
|
|
2262
|
+
--p-code-variable: #d8dee9;
|
|
2263
|
+
--p-code-tag: #81a1c1;
|
|
2264
|
+
--p-code-attr: #8fbcbb;
|
|
2265
|
+
--p-code-meta: #5e81ac;
|
|
2266
|
+
--p-code-add: #a3be8c;
|
|
2267
|
+
--p-code-del: #bf616a;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
.plass-code[data-code-theme='night-owl'] {
|
|
2271
|
+
--p-code-bg: #011627;
|
|
2272
|
+
--p-code-fg: #d6deeb;
|
|
2273
|
+
|
|
2274
|
+
--p-code-comment: #637777;
|
|
2275
|
+
--p-code-keyword: #c792ea;
|
|
2276
|
+
--p-code-string: #ecc48d;
|
|
2277
|
+
--p-code-number: #f78c6c;
|
|
2278
|
+
--p-code-function: #82aaff;
|
|
2279
|
+
--p-code-type: #ffcb8b;
|
|
2280
|
+
--p-code-variable: #addb67;
|
|
2281
|
+
--p-code-tag: #7fdbca;
|
|
2282
|
+
--p-code-attr: #addb67;
|
|
2283
|
+
--p-code-meta: #82aaff;
|
|
2284
|
+
--p-code-add: #addb67;
|
|
2285
|
+
--p-code-del: #ef5350;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.plass-code[data-code-theme='gruvbox'] {
|
|
2289
|
+
--p-code-bg: #282828;
|
|
2290
|
+
--p-code-fg: #ebdbb2;
|
|
2291
|
+
|
|
2292
|
+
--p-code-comment: #928374;
|
|
2293
|
+
--p-code-keyword: #fb4934;
|
|
2294
|
+
--p-code-string: #b8bb26;
|
|
2295
|
+
--p-code-number: #d3869b;
|
|
2296
|
+
--p-code-function: #b8bb26;
|
|
2297
|
+
--p-code-type: #fabd2f;
|
|
2298
|
+
--p-code-variable: #83a598;
|
|
2299
|
+
--p-code-tag: #8ec07c;
|
|
2300
|
+
--p-code-attr: #fabd2f;
|
|
2301
|
+
--p-code-meta: #928374;
|
|
2302
|
+
--p-code-add: #b8bb26;
|
|
2303
|
+
--p-code-del: #fb4934;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.plass-code[data-code-theme='github'] {
|
|
2307
|
+
--p-code-bg: #ffffff;
|
|
2308
|
+
--p-code-fg: #24292f;
|
|
2309
|
+
|
|
2310
|
+
--p-code-comment: #6e7781;
|
|
2311
|
+
--p-code-keyword: #cf222e;
|
|
2312
|
+
--p-code-string: #0a3069;
|
|
2313
|
+
--p-code-number: #0550ae;
|
|
2314
|
+
--p-code-function: #8250df;
|
|
2315
|
+
--p-code-type: #953800;
|
|
2316
|
+
--p-code-variable: #953800;
|
|
2317
|
+
--p-code-tag: #116329;
|
|
2318
|
+
--p-code-attr: #0550ae;
|
|
2319
|
+
--p-code-meta: #6e7781;
|
|
2320
|
+
--p-code-add: #116329;
|
|
2321
|
+
--p-code-del: #82071e;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
.plass-code[data-code-theme='solarized-light'] {
|
|
2325
|
+
--p-code-bg: #fdf6e3;
|
|
2326
|
+
--p-code-fg: #657b83;
|
|
2327
|
+
|
|
2328
|
+
--p-code-comment: #93a1a1;
|
|
2329
|
+
--p-code-keyword: #859900;
|
|
2330
|
+
--p-code-string: #2aa198;
|
|
2331
|
+
--p-code-number: #d33682;
|
|
2332
|
+
--p-code-function: #268bd2;
|
|
2333
|
+
--p-code-type: #b58900;
|
|
2334
|
+
--p-code-variable: #268bd2;
|
|
2335
|
+
--p-code-tag: #268bd2;
|
|
2336
|
+
--p-code-attr: #b58900;
|
|
2337
|
+
--p-code-meta: #cb4b16;
|
|
2338
|
+
--p-code-add: #859900;
|
|
2339
|
+
--p-code-del: #dc322f;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
/*
|
|
2343
|
+
* A line, and the two things in front of it that are not code.
|
|
2344
|
+
*
|
|
2345
|
+
* The number and the prompt are generated content off a `data-*` attribute, not
|
|
2346
|
+
* text nodes, and that is the whole point: a `$` a reader drags across and
|
|
2347
|
+
* pastes into their shell is a `$` their shell chokes on. Generated content
|
|
2348
|
+
* cannot be selected, cannot be found by find-in-page and never reaches the
|
|
2349
|
+
* clipboard — `user-select: none` is only *usually* true of all three. The
|
|
2350
|
+
* `order` is what lets one pseudo-element sit in front of the other and both in
|
|
2351
|
+
* front of the code, since `::after` would otherwise draw last.
|
|
2352
|
+
*
|
|
2353
|
+
* `min-height` keeps a blank line a line high. A flex row with nothing in it is
|
|
2354
|
+
* zero pixels tall, and a code block that closed up its own paragraph breaks
|
|
2355
|
+
* would be reflowing the reader's file.
|
|
2356
|
+
*/
|
|
2357
|
+
.plass-code-line {
|
|
2358
|
+
display: flex;
|
|
2359
|
+
min-height: 1.5em;
|
|
2360
|
+
min-height: 1lh;
|
|
2361
|
+
/*
|
|
2362
|
+
* Transparent on every line, coloured on a marked one. A border rather than
|
|
2363
|
+
* an inset `box-shadow` because `box-shadow` has no logical form and this one
|
|
2364
|
+
* has to sit on the *start* edge in both writing directions; drawn on all of
|
|
2365
|
+
* them so marking a line does not shift its text two pixels sideways.
|
|
2366
|
+
*/
|
|
2367
|
+
border-inline-start: 2px solid transparent;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
/*
|
|
2371
|
+
* A marked line, and the reason its horizontal padding is on the line rather
|
|
2372
|
+
* than on the box that scrolls it.
|
|
2373
|
+
*
|
|
2374
|
+
* A highlight that stopped at the padding would be a stripe floating inside the
|
|
2375
|
+
* block instead of a marked row. With the padding here the line box *is* the
|
|
2376
|
+
* row, so the tint reaches both edges — and because the lines sit in a
|
|
2377
|
+
* `w-max min-w-full` block, every one of them reaches the same edge whether the
|
|
2378
|
+
* code is narrower than the block or scrolled sideways within it.
|
|
2379
|
+
*/
|
|
2380
|
+
.plass-code-line[data-mark] {
|
|
2381
|
+
background: var(--p-code-mark);
|
|
2382
|
+
border-inline-start-color: var(--p-code-mark-edge);
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
.plass-code-line[data-line]::before {
|
|
2386
|
+
content: attr(data-line);
|
|
2387
|
+
order: 0;
|
|
2388
|
+
flex: none;
|
|
2389
|
+
width: var(--p-code-gutter, 2ch);
|
|
2390
|
+
margin-inline-end: 1.25em;
|
|
2391
|
+
text-align: end;
|
|
2392
|
+
color: var(--p-code-dim);
|
|
2393
|
+
-webkit-user-select: none;
|
|
2394
|
+
user-select: none;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
.plass-code-line[data-prompt]::after {
|
|
2398
|
+
content: attr(data-prompt);
|
|
2399
|
+
order: 1;
|
|
2400
|
+
flex: none;
|
|
2401
|
+
margin-inline-end: 0.75em;
|
|
2402
|
+
color: var(--p-code-dim);
|
|
2403
|
+
-webkit-user-select: none;
|
|
2404
|
+
user-select: none;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
.plass-code-line > code {
|
|
2408
|
+
order: 2;
|
|
2409
|
+
min-width: 0;
|
|
2410
|
+
font: inherit;
|
|
2411
|
+
background: none;
|
|
2412
|
+
padding: 0;
|
|
2413
|
+
white-space: pre;
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
.plass-code[data-code-wrap='true'] .plass-code-line > code {
|
|
2417
|
+
white-space: pre-wrap;
|
|
2418
|
+
overflow-wrap: anywhere;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
/*
|
|
2422
|
+
* highlight.js's scopes, mapped onto the sixteen slots.
|
|
2423
|
+
*
|
|
2424
|
+
* Grouped by what a run *is* rather than by what highlight.js calls it, because
|
|
2425
|
+
* the names are the union of a hundred and ninety grammars and half of them are
|
|
2426
|
+
* one language's word for another language's idea — `selector-tag` and `tag`
|
|
2427
|
+
* and `name` are all "the thing being declared". The point of the mapping is
|
|
2428
|
+
* that the same idea gets the same colour whatever file it appears in.
|
|
2429
|
+
*/
|
|
2430
|
+
.plass-code .hljs-comment,
|
|
2431
|
+
.plass-code .hljs-quote {
|
|
2432
|
+
color: var(--p-code-comment);
|
|
2433
|
+
font-style: italic;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
.plass-code .hljs-keyword,
|
|
2437
|
+
.plass-code .hljs-literal,
|
|
2438
|
+
.plass-code .hljs-selector-tag,
|
|
2439
|
+
.plass-code .hljs-operator,
|
|
2440
|
+
.plass-code .hljs-doctag,
|
|
2441
|
+
.plass-code .hljs-formula {
|
|
2442
|
+
color: var(--p-code-keyword);
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
.plass-code .hljs-string,
|
|
2446
|
+
.plass-code .hljs-regexp,
|
|
2447
|
+
.plass-code .hljs-char,
|
|
2448
|
+
.plass-code .hljs-link {
|
|
2449
|
+
color: var(--p-code-string);
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
.plass-code .hljs-number,
|
|
2453
|
+
.plass-code .hljs-symbol,
|
|
2454
|
+
.plass-code .hljs-bullet {
|
|
2455
|
+
color: var(--p-code-number);
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
.plass-code .hljs-title,
|
|
2459
|
+
.plass-code .hljs-section,
|
|
2460
|
+
.plass-code .hljs-name,
|
|
2461
|
+
.plass-code .hljs-selector-id,
|
|
2462
|
+
.plass-code .hljs-selector-class {
|
|
2463
|
+
color: var(--p-code-function);
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
.plass-code .hljs-type,
|
|
2467
|
+
.plass-code .hljs-built_in,
|
|
2468
|
+
.plass-code .hljs-class {
|
|
2469
|
+
color: var(--p-code-type);
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
.plass-code .hljs-variable,
|
|
2473
|
+
.plass-code .hljs-template-variable,
|
|
2474
|
+
.plass-code .hljs-params,
|
|
2475
|
+
.plass-code .hljs-subst {
|
|
2476
|
+
color: var(--p-code-variable);
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
.plass-code .hljs-tag,
|
|
2480
|
+
.plass-code .hljs-template-tag {
|
|
2481
|
+
color: var(--p-code-tag);
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
.plass-code .hljs-attr,
|
|
2485
|
+
.plass-code .hljs-attribute,
|
|
2486
|
+
.plass-code .hljs-property,
|
|
2487
|
+
.plass-code .hljs-selector-attr,
|
|
2488
|
+
.plass-code .hljs-selector-pseudo {
|
|
2489
|
+
color: var(--p-code-attr);
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
.plass-code .hljs-meta,
|
|
2493
|
+
.plass-code .hljs-punctuation {
|
|
2494
|
+
color: var(--p-code-meta);
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
.plass-code .hljs-addition {
|
|
2498
|
+
color: var(--p-code-add);
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
.plass-code .hljs-deletion {
|
|
2502
|
+
color: var(--p-code-del);
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
.plass-code .hljs-emphasis {
|
|
2506
|
+
font-style: italic;
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
.plass-code .hljs-strong {
|
|
2510
|
+
font-weight: 700;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
/* ---------------------------------------------------------------------------
|
|
2514
|
+
* The gallery
|
|
2515
|
+
*
|
|
2516
|
+
* `PlGallery` rides the same `--p-cols` chain `PlGrid` does, one block above,
|
|
2517
|
+
* with a default of two rather than twelve: a wall of photographs is counted in
|
|
2518
|
+
* tiles across and a layout grid is counted in tracks, and two is the narrowest
|
|
2519
|
+
* arrangement that still reads as a set.
|
|
2520
|
+
*
|
|
2521
|
+
* The three lines below are what the slot is *for*. A grid and a quilt lay out
|
|
2522
|
+
* in CSS Grid off `--p-cols`; a masonry deals its items into lanes in JavaScript
|
|
2523
|
+
* and writes the count and the rows inline, because which lane an item lands in
|
|
2524
|
+
* depends on the heights of the items before it and no stylesheet can work that
|
|
2525
|
+
* out; and a justified row is flexbox, which needs no count at all — it fills
|
|
2526
|
+
* to the edge with whatever fits.
|
|
2527
|
+
* ------------------------------------------------------------------------- */
|
|
2528
|
+
|
|
2529
|
+
.plass-gallery-grid,
|
|
2530
|
+
.plass-gallery-quilted {
|
|
2531
|
+
grid-template-columns: repeat(var(--p-cols, 2), minmax(0, 1fr));
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
/*
|
|
2535
|
+
* What holds a justified gallery's last row down.
|
|
2536
|
+
*
|
|
2537
|
+
* Every tile is grown in proportion to its own width, which is what makes a row
|
|
2538
|
+
* come out one height once it has been stretched to the edge. The last row is
|
|
2539
|
+
* the exception: it has fewer tiles and the same width to share, so they stretch
|
|
2540
|
+
* further than any row above them — one leftover photograph ends up filling the
|
|
2541
|
+
* whole width and standing two or three times as tall as the gallery it belongs
|
|
2542
|
+
* to.
|
|
2543
|
+
*
|
|
2544
|
+
* An empty `::after` with an absurd `flex-grow` eats the leftover width instead,
|
|
2545
|
+
* so the real tiles keep their basis and the row lands at the height it was
|
|
2546
|
+
* aiming for. It has to be a pseudo-element rather than a filler item: the list
|
|
2547
|
+
* is a `<ul>` with `role="list"`, and an extra `<li>` would be an extra item in
|
|
2548
|
+
* it — a photograph that is not there, counted by every screen reader that
|
|
2549
|
+
* announces how many there are.
|
|
2550
|
+
*
|
|
2551
|
+
* It costs a row of nothing when the last row happens to be full, which is why
|
|
2552
|
+
* the flex-basis is zero.
|
|
2553
|
+
*/
|
|
2554
|
+
.plass-gallery-justified::after {
|
|
2555
|
+
content: '';
|
|
2556
|
+
flex-grow: 1000000;
|
|
2557
|
+
flex-basis: 0;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
1249
2560
|
/* ---------------------------------------------------------------------------
|
|
1250
2561
|
* Reduced motion
|
|
1251
2562
|
*
|
|
@@ -1317,6 +2628,27 @@
|
|
|
1317
2628
|
animation: none;
|
|
1318
2629
|
}
|
|
1319
2630
|
|
|
2631
|
+
/*
|
|
2632
|
+
* A marquee that stops would leave everything past the edge of its box out
|
|
2633
|
+
* of sight for good. One copy is drawn, and the box scrolls along it instead
|
|
2634
|
+
* of clipping it, so the strip stays one line rather than wrapping down the
|
|
2635
|
+
* page; a platform that draws a permanent scrollbar adds only the bar. The
|
|
2636
|
+
* component makes the box a tab stop while it scrolls.
|
|
2637
|
+
*/
|
|
2638
|
+
.plass-marquee {
|
|
2639
|
+
overflow-x: auto;
|
|
2640
|
+
overflow-y: hidden;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
.plass-marquee-vertical {
|
|
2644
|
+
overflow-x: hidden;
|
|
2645
|
+
overflow-y: auto;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
.plass-marquee-track + .plass-marquee-track {
|
|
2649
|
+
display: none;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
1320
2652
|
/* The arc stops travelling and becomes an even glow. The same trade the
|
|
1321
2653
|
skeleton makes: the decoration survives, the motion does not. */
|
|
1322
2654
|
.plass-anim-lighting::before {
|