plass-ui 0.0.1 → 1.0.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/dist/components/accordion/PlAccordion.d.ts +98 -0
- package/dist/components/accordion/PlAccordion.js +131 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/PlAlert.d.ts +50 -0
- package/dist/components/alert/PlAlert.js +109 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/animate-appear/PlAnimateAppear.d.ts +55 -0
- package/dist/components/animate-appear/PlAnimateAppear.js +71 -0
- package/dist/components/animate-appear/index.d.ts +2 -0
- package/dist/components/animate-appear/index.js +1 -0
- package/dist/components/animate-blink/PlAnimateBlink.d.ts +30 -0
- package/dist/components/animate-blink/PlAnimateBlink.js +47 -0
- package/dist/components/animate-blink/index.d.ts +2 -0
- package/dist/components/animate-blink/index.js +1 -0
- package/dist/components/animate-fade/PlAnimateFade.d.ts +35 -0
- package/dist/components/animate-fade/PlAnimateFade.js +48 -0
- package/dist/components/animate-fade/index.d.ts +2 -0
- package/dist/components/animate-fade/index.js +1 -0
- package/dist/components/animate-grow/PlAnimateGrow.d.ts +45 -0
- package/dist/components/animate-grow/PlAnimateGrow.js +49 -0
- package/dist/components/animate-grow/index.d.ts +2 -0
- package/dist/components/animate-grow/index.js +1 -0
- package/dist/components/animate-headline/PlAnimateHeadline.d.ts +55 -0
- package/dist/components/animate-headline/PlAnimateHeadline.js +120 -0
- package/dist/components/animate-headline/index.d.ts +2 -0
- package/dist/components/animate-headline/index.js +1 -0
- package/dist/components/animate-lighting/PlAnimateLighting.d.ts +67 -0
- package/dist/components/animate-lighting/PlAnimateLighting.js +65 -0
- package/dist/components/animate-lighting/index.d.ts +2 -0
- package/dist/components/animate-lighting/index.js +1 -0
- package/dist/components/animate-marquee/PlAnimateMarquee.d.ts +65 -0
- package/dist/components/animate-marquee/PlAnimateMarquee.js +94 -0
- package/dist/components/animate-marquee/index.d.ts +2 -0
- package/dist/components/animate-marquee/index.js +1 -0
- package/dist/components/animate-rotate/PlAnimateRotate.d.ts +52 -0
- package/dist/components/animate-rotate/PlAnimateRotate.js +50 -0
- package/dist/components/animate-rotate/index.d.ts +2 -0
- package/dist/components/animate-rotate/index.js +1 -0
- package/dist/components/animate-slide/PlAnimateSlide.d.ts +47 -0
- package/dist/components/animate-slide/PlAnimateSlide.js +49 -0
- package/dist/components/animate-slide/index.d.ts +2 -0
- package/dist/components/animate-slide/index.js +1 -0
- package/dist/components/animate-typing/PlAnimateTyping.d.ts +56 -0
- package/dist/components/animate-typing/PlAnimateTyping.js +177 -0
- package/dist/components/animate-typing/index.d.ts +2 -0
- package/dist/components/animate-typing/index.js +1 -0
- package/dist/components/animate-zoom/PlAnimateZoom.d.ts +37 -0
- package/dist/components/animate-zoom/PlAnimateZoom.js +45 -0
- package/dist/components/animate-zoom/index.d.ts +2 -0
- package/dist/components/animate-zoom/index.js +1 -0
- package/dist/components/aspect-ratio/PlAspectRatio.d.ts +64 -0
- package/dist/components/aspect-ratio/PlAspectRatio.js +58 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/avatar/PlAvatar.d.ts +102 -0
- package/dist/components/avatar/PlAvatar.js +121 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/badge/PlBadge.d.ts +86 -0
- package/dist/components/badge/PlBadge.js +168 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/blockquote/PlBlockquote.d.ts +64 -0
- package/dist/components/blockquote/PlBlockquote.js +112 -0
- package/dist/components/blockquote/index.d.ts +2 -0
- package/dist/components/blockquote/index.js +1 -0
- package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +111 -0
- package/dist/components/bottom-navigation/PlBottomNavigation.js +141 -0
- package/dist/components/bottom-navigation/index.d.ts +2 -0
- package/dist/components/bottom-navigation/index.js +1 -0
- package/dist/components/box/PlBox.d.ts +50 -0
- package/dist/components/box/PlBox.js +46 -0
- package/dist/components/box/index.d.ts +2 -0
- package/dist/components/box/index.js +1 -0
- package/dist/components/breadcrumb/PlBreadcrumb.d.ts +138 -0
- package/dist/components/breadcrumb/PlBreadcrumb.js +201 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/{Button.d.ts → PlButton.d.ts} +3 -3
- package/dist/components/button/PlButton.js +196 -0
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/PlButtonGroup.d.ts +32 -0
- package/dist/components/button-group/PlButtonGroup.js +64 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/card/PlCard.d.ts +81 -0
- package/dist/components/card/PlCard.js +102 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/carousel/PlCarousel.d.ts +78 -0
- package/dist/components/carousel/PlCarousel.js +177 -0
- package/dist/components/carousel/index.d.ts +2 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/chat-bubble/PlChatBubble.d.ts +127 -0
- package/dist/components/chat-bubble/PlChatBubble.js +206 -0
- package/dist/components/chat-bubble/index.d.ts +2 -0
- package/dist/components/chat-bubble/index.js +1 -0
- package/dist/components/checkbox/PlCheckbox.d.ts +39 -0
- package/dist/components/checkbox/PlCheckbox.js +100 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/PlChip.d.ts +55 -0
- package/dist/components/chip/PlChip.js +144 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/collapsible/PlCollapsible.d.ts +84 -0
- package/dist/components/collapsible/PlCollapsible.js +65 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/combobox/PlCombobox.d.ts +140 -0
- package/dist/components/combobox/PlCombobox.js +199 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/container/PlContainer.d.ts +66 -0
- package/dist/components/container/PlContainer.js +47 -0
- package/dist/components/container/index.d.ts +2 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/date-picker/PlDatePicker.d.ts +73 -0
- package/dist/components/date-picker/PlDatePicker.js +87 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-range-picker/PlDateRangePicker.d.ts +91 -0
- package/dist/components/date-range-picker/PlDateRangePicker.js +152 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-time-picker/PlDateTimePicker.d.ts +74 -0
- package/dist/components/date-time-picker/PlDateTimePicker.js +106 -0
- package/dist/components/date-time-picker/index.d.ts +2 -0
- package/dist/components/date-time-picker/index.js +1 -0
- package/dist/components/divider/PlDivider.d.ts +73 -0
- package/dist/components/divider/PlDivider.js +107 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/PlDrawer.d.ts +144 -0
- package/dist/components/drawer/PlDrawer.js +190 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/file-picker/PlFilePicker.d.ts +105 -0
- package/dist/components/file-picker/PlFilePicker.js +274 -0
- package/dist/components/file-picker/index.d.ts +2 -0
- package/dist/components/file-picker/index.js +1 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +118 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +291 -0
- package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
- package/dist/components/floating-bottom-navigation/index.js +1 -0
- package/dist/components/grid/PlGrid.d.ts +67 -0
- package/dist/components/grid/PlGrid.js +51 -0
- package/dist/components/grid/PlGridItem.d.ts +50 -0
- package/dist/components/grid/PlGridItem.js +34 -0
- package/dist/components/grid/index.d.ts +4 -0
- package/dist/components/grid/index.js +2 -0
- package/dist/components/highlight/PlHighlight.d.ts +90 -0
- package/dist/components/highlight/PlHighlight.js +185 -0
- package/dist/components/highlight/index.d.ts +2 -0
- package/dist/components/highlight/index.js +1 -0
- package/dist/components/hot-keys/PlHotKeys.d.ts +93 -0
- package/dist/components/hot-keys/PlHotKeys.js +294 -0
- package/dist/components/hot-keys/index.d.ts +2 -0
- package/dist/components/hot-keys/index.js +1 -0
- package/dist/components/icon/PlIcon.d.ts +62 -0
- package/dist/components/icon/PlIcon.js +58 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/icon-button/PlIconButton.d.ts +39 -0
- package/dist/components/icon-button/PlIconButton.js +37 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/list/PlList.d.ts +82 -0
- package/dist/components/list/PlList.js +160 -0
- package/dist/components/list/index.d.ts +2 -0
- package/dist/components/list/index.js +1 -0
- package/dist/components/menu/PlMenu.d.ts +210 -0
- package/dist/components/menu/PlMenu.js +209 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/modal/PlModal.d.ts +112 -0
- package/dist/components/modal/PlModal.js +150 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/number-field/PlNumberField.d.ts +133 -0
- package/dist/components/number-field/PlNumberField.js +111 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +1 -0
- package/dist/components/otp-field/PlOtpField.d.ts +82 -0
- package/dist/components/otp-field/PlOtpField.js +109 -0
- package/dist/components/otp-field/index.d.ts +2 -0
- package/dist/components/otp-field/index.js +1 -0
- package/dist/components/overlay/PlOverlay.d.ts +96 -0
- package/dist/components/overlay/PlOverlay.js +77 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.js +1 -0
- package/dist/components/pagination/PlPagination.d.ts +88 -0
- package/dist/components/pagination/PlPagination.js +159 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/panes/PlPanes.d.ts +79 -0
- package/dist/components/panes/PlPanes.js +324 -0
- package/dist/components/panes/index.d.ts +2 -0
- package/dist/components/panes/index.js +1 -0
- package/dist/components/pill/PlPill.d.ts +81 -0
- package/dist/components/pill/PlPill.js +154 -0
- package/dist/components/pill/index.d.ts +2 -0
- package/dist/components/pill/index.js +1 -0
- package/dist/components/popover/PlPopover.d.ts +107 -0
- package/dist/components/popover/PlPopover.js +113 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/progress-box/PlProgressBox.d.ts +32 -0
- package/dist/components/progress-box/PlProgressBox.js +34 -0
- package/dist/components/progress-box/index.d.ts +2 -0
- package/dist/components/progress-box/index.js +1 -0
- package/dist/components/progress-circular/PlProgressCircular.d.ts +22 -0
- package/dist/components/progress-circular/PlProgressCircular.js +47 -0
- package/dist/components/progress-circular/index.d.ts +2 -0
- package/dist/components/progress-circular/index.js +1 -0
- package/dist/components/progress-linear/PlProgressLinear.d.ts +31 -0
- package/dist/components/progress-linear/PlProgressLinear.js +40 -0
- package/dist/components/progress-linear/index.d.ts +2 -0
- package/dist/components/progress-linear/index.js +1 -0
- package/dist/components/radio-group/PlRadioGroup.d.ts +54 -0
- package/dist/components/radio-group/PlRadioGroup.js +99 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/rating/PlRating.d.ts +90 -0
- package/dist/components/rating/PlRating.js +101 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/index.js +1 -0
- package/dist/components/scroll-zone/PlScrollZone.d.ts +132 -0
- package/dist/components/scroll-zone/PlScrollZone.js +411 -0
- package/dist/components/scroll-zone/index.d.ts +2 -0
- package/dist/components/scroll-zone/index.js +1 -0
- package/dist/components/segmented-button/PlSegmentedButton.d.ts +79 -0
- package/dist/components/segmented-button/PlSegmentedButton.js +206 -0
- package/dist/components/segmented-button/index.d.ts +2 -0
- package/dist/components/segmented-button/index.js +1 -0
- package/dist/components/select/PlSelect.d.ts +77 -0
- package/dist/components/select/PlSelect.js +115 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/skeleton/PlSkeleton.d.ts +73 -0
- package/dist/components/skeleton/PlSkeleton.js +142 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/slider/PlSlider.d.ts +44 -0
- package/dist/components/slider/PlSlider.js +132 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/spoiler/PlSpoiler.d.ts +84 -0
- package/dist/components/spoiler/PlSpoiler.js +74 -0
- package/dist/components/spoiler/index.d.ts +2 -0
- package/dist/components/spoiler/index.js +1 -0
- package/dist/components/switch/PlSwitch.d.ts +42 -0
- package/dist/components/switch/PlSwitch.js +131 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/PlTable.d.ts +112 -0
- package/dist/components/table/PlTable.js +210 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/tabs/PlTabs.d.ts +94 -0
- package/dist/components/tabs/PlTabs.js +182 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/text-field/{TextField.d.ts → PlTextField.d.ts} +5 -5
- package/dist/components/text-field/PlTextField.js +126 -0
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-link/PlTextLink.d.ts +80 -0
- package/dist/components/text-link/PlTextLink.js +136 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/time-picker/PlTimePicker.d.ts +88 -0
- package/dist/components/time-picker/PlTimePicker.js +97 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/index.js +1 -0
- package/dist/components/timeline/PlTimeline.d.ts +98 -0
- package/dist/components/timeline/PlTimeline.js +207 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/timeline/index.js +1 -0
- package/dist/components/toast/PlToast.d.ts +122 -0
- package/dist/components/toast/PlToast.js +174 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toolbar/PlToolbar.d.ts +68 -0
- package/dist/components/toolbar/PlToolbar.js +65 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/tooltip/PlTooltip.d.ts +92 -0
- package/dist/components/tooltip/PlTooltip.js +117 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/typography/PlTypography.d.ts +66 -0
- package/dist/components/typography/PlTypography.js +143 -0
- package/dist/components/typography/index.d.ts +2 -0
- package/dist/components/typography/index.js +1 -0
- package/dist/css/accordion.css +2 -0
- package/dist/css/alert.css +2 -0
- package/dist/css/animate-appear.css +2 -0
- package/dist/css/animate-blink.css +2 -0
- package/dist/css/animate-fade.css +2 -0
- package/dist/css/animate-grow.css +2 -0
- package/dist/css/animate-headline.css +2 -0
- package/dist/css/animate-lighting.css +2 -0
- package/dist/css/animate-marquee.css +2 -0
- package/dist/css/animate-rotate.css +2 -0
- package/dist/css/animate-slide.css +2 -0
- package/dist/css/animate-typing.css +2 -0
- package/dist/css/animate-zoom.css +2 -0
- package/dist/css/aspect-ratio.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/badge.css +2 -0
- package/dist/css/base.css +4 -0
- package/dist/css/blockquote.css +2 -0
- package/dist/css/bottom-navigation.css +2 -0
- package/dist/css/box.css +2 -0
- package/dist/css/breadcrumb.css +2 -0
- package/dist/css/button-group.css +2 -0
- package/dist/css/button.css +2 -0
- package/dist/css/card.css +2 -0
- package/dist/css/carousel.css +2 -0
- package/dist/css/chat-bubble.css +2 -0
- package/dist/css/checkbox.css +2 -0
- package/dist/css/chip.css +2 -0
- package/dist/css/collapsible.css +2 -0
- package/dist/css/combobox.css +2 -0
- package/dist/css/container.css +2 -0
- package/dist/css/date-picker.css +2 -0
- package/dist/css/date-range-picker.css +2 -0
- package/dist/css/date-time-picker.css +2 -0
- package/dist/css/divider.css +2 -0
- package/dist/css/drawer.css +2 -0
- package/dist/css/file-picker.css +2 -0
- package/dist/css/floating-bottom-navigation.css +2 -0
- package/dist/css/grid.css +2 -0
- package/dist/css/highlight.css +2 -0
- package/dist/css/hot-keys.css +2 -0
- package/dist/css/icon-button.css +2 -0
- package/dist/css/icon.css +2 -0
- package/dist/css/list.css +2 -0
- package/dist/css/menu.css +2 -0
- package/dist/css/modal.css +2 -0
- package/dist/css/number-field.css +2 -0
- package/dist/css/otp-field.css +2 -0
- package/dist/css/overlay.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/panes.css +2 -0
- package/dist/css/pill.css +2 -0
- package/dist/css/popover.css +2 -0
- package/dist/css/progress-box.css +2 -0
- package/dist/css/progress-circular.css +2 -0
- package/dist/css/progress-linear.css +2 -0
- package/dist/css/radio-group.css +2 -0
- package/dist/css/rating.css +2 -0
- package/dist/css/scroll-zone.css +2 -0
- package/dist/css/segmented-button.css +2 -0
- package/dist/css/select.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/slider.css +2 -0
- package/dist/css/spoiler.css +2 -0
- package/dist/css/switch.css +2 -0
- package/dist/css/table.css +2 -0
- package/dist/css/tabs.css +2 -0
- package/dist/css/text-field.css +2 -0
- package/dist/css/text-link.css +2 -0
- package/dist/css/time-picker.css +2 -0
- package/dist/css/timeline.css +2 -0
- package/dist/css/toast.css +2 -0
- package/dist/css/toolbar.css +2 -0
- package/dist/css/tooltip.css +2 -0
- package/dist/css/typography.css +2 -0
- package/dist/index.d.ts +75 -3
- package/dist/index.js +75 -1
- package/dist/internal/animate.d.ts +161 -0
- package/dist/internal/animate.js +318 -0
- package/dist/internal/button-group.d.ts +27 -0
- package/dist/internal/button-group.js +19 -0
- package/dist/internal/calendar.d.ts +148 -0
- package/dist/internal/calendar.js +501 -0
- package/dist/internal/date.d.ts +173 -0
- package/dist/internal/date.js +353 -0
- package/dist/internal/format.d.ts +24 -0
- package/dist/internal/format.js +41 -0
- package/dist/internal/grid.d.ts +67 -0
- package/dist/internal/grid.js +143 -0
- package/dist/internal/icons.d.ts +86 -1
- package/dist/internal/icons.js +138 -1
- package/dist/internal/menu.d.ts +20 -0
- package/dist/internal/menu.js +18 -0
- package/dist/internal/picker.d.ts +118 -0
- package/dist/internal/picker.js +139 -0
- package/dist/internal/progress.d.ts +145 -0
- package/dist/internal/progress.js +167 -0
- package/dist/internal/sizer.d.ts +32 -0
- package/dist/internal/sizer.js +35 -0
- package/dist/internal/styles.d.ts +198 -8
- package/dist/internal/styles.js +636 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +899 -125
- package/dist/tokens.css +1275 -0
- package/dist/types.d.ts +150 -8
- package/dist/types.js +1 -1
- package/package.json +31 -27
- package/README.md +0 -111
- package/dist/components/button/Button.js +0 -1
- package/dist/components/text-field/TextField.js +0 -1
package/dist/tailwind.css
CHANGED
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
* Dark mode responds to `prefers-color-scheme`, and can be forced either way
|
|
22
22
|
* with `.dark` / `[data-theme='dark'|'light']` on any ancestor.
|
|
23
23
|
*
|
|
24
|
-
* The surface model is **a
|
|
25
|
-
* control is a gradient
|
|
26
|
-
*
|
|
27
|
-
* translucent, heavily blurred sheet with a white
|
|
24
|
+
* The surface model is **a key of tinted glass resting on a clear sheet**: a
|
|
25
|
+
* control is a smooth two-stop gradient with a drop shadow tinted by its own
|
|
26
|
+
* colour and a bloom of light that follows the pointer across it; everything
|
|
27
|
+
* that holds content is a translucent, heavily blurred sheet with a white
|
|
28
|
+
* hairline around it. Depth is carried by the gradient, not by a highlight.
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
31
|
/*
|
|
@@ -47,41 +48,61 @@
|
|
|
47
48
|
*
|
|
48
49
|
* These sit outside every theme block on purpose, and it is the one place Plass
|
|
49
50
|
* departs hardest from the libraries it was learned from: **a key's own colour
|
|
50
|
-
* does not change with the theme.**
|
|
51
|
-
*
|
|
52
|
-
* around it, and the `accent` — the one value that has to be *read* off a
|
|
51
|
+
* does not change with the theme.** What changes is the sheet it rests on, the
|
|
52
|
+
* glass around it, and the `accent` — the one value that has to be *read* off a
|
|
53
53
|
* surface rather than looked at.
|
|
54
54
|
*
|
|
55
|
-
*
|
|
55
|
+
* Three values are hand-picked per family and everything else is derived with
|
|
56
56
|
* `color-mix()`, so **adding a colour family is two edits**: one entry in
|
|
57
|
-
* `PlassColor` and
|
|
57
|
+
* `PlassColor` and three lines here (plus its `accent` in each theme).
|
|
58
58
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
59
|
+
* `solid` and `solid-to` are the two ends of the gradient, at 135° — the
|
|
60
|
+
* top-left corner and the bottom-right one. They are a **hue sweep at one
|
|
61
|
+
* lightness**, not a shade: primary runs indigo to azure, danger vermilion to
|
|
62
|
+
* rose, success green to teal, info blue to cyan. Nothing gets lighter and
|
|
63
|
+
* nothing gets darker.
|
|
64
|
+
*
|
|
65
|
+
* That is the whole reason there is no highlight layer over the top of a
|
|
66
|
+
* control. A gradient that darkens toward one corner is a moulded object
|
|
67
|
+
* catching a lamp, and it needs a specular highlight to finish the illusion —
|
|
68
|
+
* which is what made every filled control read as lacquer. A gradient that
|
|
69
|
+
* *turns* is a piece of tinted glass, and it needs nothing else.
|
|
70
|
+
*
|
|
71
|
+
* Both ends clear 4.5:1 against their own `on-solid`, and they sit as close to
|
|
72
|
+
* that floor as the arithmetic allows: every one of them is within 0.15 of 4.5,
|
|
73
|
+
* because a family held further above the floor than it has to be is a family
|
|
74
|
+
* that is darker than it has to be. `warning` is the exception on both counts —
|
|
75
|
+
* its ink is dark, so it runs the other way and has room to spare.
|
|
63
76
|
* ------------------------------------------------------------------------- */
|
|
64
77
|
|
|
65
78
|
:root {
|
|
66
|
-
--plass-primary-solid: #
|
|
79
|
+
--plass-primary-solid: #3f63f2;
|
|
80
|
+
--plass-primary-solid-to: #1b78cb;
|
|
67
81
|
--plass-primary-on-solid: #ffffff;
|
|
68
82
|
|
|
69
|
-
--plass-secondary-solid: #
|
|
83
|
+
--plass-secondary-solid: #6b7488;
|
|
84
|
+
--plass-secondary-solid-to: #59637a;
|
|
70
85
|
--plass-secondary-on-solid: #ffffff;
|
|
71
86
|
|
|
72
|
-
--plass-success-solid: #
|
|
87
|
+
--plass-success-solid: #1b8649;
|
|
88
|
+
--plass-success-solid-to: #12866a;
|
|
73
89
|
--plass-success-on-solid: #ffffff;
|
|
74
90
|
|
|
75
|
-
/* The one family with dark ink
|
|
76
|
-
lightness
|
|
77
|
-
|
|
78
|
-
|
|
91
|
+
/* The one family with dark ink, and the one whose sweep is a change of
|
|
92
|
+
lightness rather than of hue — amber has nowhere to turn that is still
|
|
93
|
+
amber. White on it does not reach 4.5:1 at any lightness worth the name,
|
|
94
|
+
and changing the ink is the right answer; distorting the family to preserve
|
|
95
|
+
a white label is not. */
|
|
96
|
+
--plass-warning-solid: #f0a63e;
|
|
97
|
+
--plass-warning-solid-to: #d98613;
|
|
79
98
|
--plass-warning-on-solid: #3b2405;
|
|
80
99
|
|
|
81
|
-
--plass-danger-solid: #
|
|
100
|
+
--plass-danger-solid: #d04246;
|
|
101
|
+
--plass-danger-solid-to: #d53c54;
|
|
82
102
|
--plass-danger-on-solid: #ffffff;
|
|
83
103
|
|
|
84
|
-
--plass-info-solid: #
|
|
104
|
+
--plass-info-solid: #2379bd;
|
|
105
|
+
--plass-info-solid-to: #157aa9;
|
|
85
106
|
--plass-info-on-solid: #ffffff;
|
|
86
107
|
}
|
|
87
108
|
|
|
@@ -127,6 +148,26 @@
|
|
|
127
148
|
--plass-glass-press: rgb(255 255 255 / 0.88);
|
|
128
149
|
--plass-glass-line: rgb(255 255 255 / 0.6);
|
|
129
150
|
|
|
151
|
+
/* The marks a sheet makes on *itself*, and the one place the glass ladder
|
|
152
|
+
above cannot be used.
|
|
153
|
+
|
|
154
|
+
`--plass-glass-line` is white light on a cut edge: it reads because the
|
|
155
|
+
pane behind it is the page wash. Turn it inward — a rule between two table
|
|
156
|
+
rows, a groove a switch runs in, a striped row — and it is white on white,
|
|
157
|
+
which is nothing at all. Every one of these is therefore a *neutral ink*
|
|
158
|
+
laid on the surface rather than more light: the same blue-grey the border
|
|
159
|
+
is, at the weight the job needs, and it reads on a white card and on the
|
|
160
|
+
wash alike.
|
|
161
|
+
|
|
162
|
+
`divider` rules one row off the next. `stripe` is the wash on every other
|
|
163
|
+
one. `track` is the groove a thumb runs along — a switch's, a slider's —
|
|
164
|
+
and it is the one of the three that has to be seen from across a room,
|
|
165
|
+
because a switch nobody can find in its off state is a switch that only
|
|
166
|
+
exists half the time. */
|
|
167
|
+
--plass-divider: rgb(20 40 90 / 0.1);
|
|
168
|
+
--plass-stripe: rgb(20 40 90 / 0.03);
|
|
169
|
+
--plass-track: rgb(20 40 90 / 0.14);
|
|
170
|
+
|
|
130
171
|
/* How hard the backdrop is blurred, and how much colour is pulled out of it.
|
|
131
172
|
22px is a deliberate, generous smear: unlike a frosted-acrylic language,
|
|
132
173
|
Plass is not trying to let you read what is behind the sheet — it is trying
|
|
@@ -134,32 +175,35 @@
|
|
|
134
175
|
white box with an alpha on it. */
|
|
135
176
|
--plass-blur: blur(22px) saturate(160%);
|
|
136
177
|
|
|
137
|
-
/* The
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
the
|
|
178
|
+
/* The light lying along the top edge of a sheet. There is one of these and it
|
|
179
|
+
belongs to **glass only**: a pane has a real cut edge for light to catch.
|
|
180
|
+
A gradient key does not get one — a bright line across the top of a filled
|
|
181
|
+
control is the single thing that makes it read as moulded plastic, and the
|
|
182
|
+
gradient is already saying everything about the form that needs saying.
|
|
183
|
+
There is deliberately no dark bevel underneath either. */
|
|
141
184
|
--plass-gloss-glass: inset 0 1px 0 rgb(255 255 255 / 0.55);
|
|
142
|
-
--plass-gloss-solid: inset 0 1px 0 rgb(255 255 255 / 0.34);
|
|
143
185
|
|
|
144
186
|
/* A well cut into the glass — what a filled field is drawn as. The only
|
|
145
187
|
inset shadow in the library that goes *downward*. */
|
|
146
188
|
--plass-well: inset 0 1px 2px rgb(20 40 90 / 0.1);
|
|
147
189
|
|
|
148
|
-
/* The
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
);
|
|
190
|
+
/* The bloom that follows the pointer across a control, and the brighter flash
|
|
191
|
+
the moment it is pressed. These are the two colours `.plass-glow` reads on
|
|
192
|
+
a *filled* surface; a glass or a ghost control uses its own family tint
|
|
193
|
+
instead, because white light on a near-white sheet is invisible.
|
|
194
|
+
|
|
195
|
+
The flash is only a shade brighter than the bloom it replaces: the press is
|
|
196
|
+
carried by the whole control dimming, and this is the highlight riding on
|
|
197
|
+
top of it rather than the effect itself. */
|
|
198
|
+
--plass-glow-on-fill: rgb(255 255 255 / 0.18);
|
|
199
|
+
--plass-flash-on-fill: rgb(255 255 255 / 0.26);
|
|
157
200
|
|
|
158
201
|
/* Elevation, and how strongly a key's own colour bleeds into the shadow it
|
|
159
202
|
casts. The ambient is a blue-grey rather than black: a neutral shadow over
|
|
160
|
-
a blue-tinted page reads as dirt
|
|
161
|
-
|
|
162
|
-
--plass-
|
|
203
|
+
a blue-tinted page reads as dirt — and it is faint, because the tint below
|
|
204
|
+
is what a control's shadow is actually made of. */
|
|
205
|
+
--plass-shadow-ambient: rgb(20 40 90 / 0.1);
|
|
206
|
+
--plass-tint-strength: 35%;
|
|
163
207
|
|
|
164
208
|
/* The scrim behind a modal surface. */
|
|
165
209
|
--plass-scrim: rgb(16 24 40 / 0.4);
|
|
@@ -213,24 +257,23 @@
|
|
|
213
257
|
--plass-glass-press: rgb(255 255 255 / 0.15);
|
|
214
258
|
--plass-glass-line: rgb(255 255 255 / 0.12);
|
|
215
259
|
|
|
260
|
+
--plass-divider: rgb(255 255 255 / 0.1);
|
|
261
|
+
--plass-stripe: rgb(255 255 255 / 0.035);
|
|
262
|
+
--plass-track: rgb(255 255 255 / 0.16);
|
|
263
|
+
|
|
216
264
|
--plass-blur: blur(22px) saturate(150%);
|
|
217
265
|
|
|
218
266
|
--plass-gloss-glass: inset 0 1px 0 rgb(255 255 255 / 0.1);
|
|
219
|
-
--plass-gloss-solid: inset 0 1px 0 rgb(255 255 255 / 0.22);
|
|
220
267
|
|
|
221
268
|
--plass-well: inset 0 1px 2px rgb(0 0 0 / 0.45);
|
|
222
269
|
|
|
223
|
-
--plass-
|
|
224
|
-
|
|
225
|
-
rgb(255 255 255 / 0.18) 0%,
|
|
226
|
-
rgb(255 255 255 / 0.04) 46%,
|
|
227
|
-
rgb(255 255 255 / 0) 62%
|
|
228
|
-
);
|
|
270
|
+
--plass-glow-on-fill: rgb(255 255 255 / 0.15);
|
|
271
|
+
--plass-flash-on-fill: rgb(255 255 255 / 0.22);
|
|
229
272
|
|
|
230
273
|
/* A tinted shadow has almost nothing to sit on over a near-black page, so
|
|
231
274
|
the tint is turned up rather than the shadow being made bigger. */
|
|
232
|
-
--plass-shadow-ambient: rgb(0 0 0 / 0.
|
|
233
|
-
--plass-
|
|
275
|
+
--plass-shadow-ambient: rgb(0 0 0 / 0.42);
|
|
276
|
+
--plass-tint-strength: 55%;
|
|
234
277
|
|
|
235
278
|
--plass-scrim: rgb(0 0 0 / 0.6);
|
|
236
279
|
|
|
@@ -258,22 +301,21 @@
|
|
|
258
301
|
--plass-glass-press: rgb(255 255 255 / 0.15);
|
|
259
302
|
--plass-glass-line: rgb(255 255 255 / 0.12);
|
|
260
303
|
|
|
304
|
+
--plass-divider: rgb(255 255 255 / 0.1);
|
|
305
|
+
--plass-stripe: rgb(255 255 255 / 0.035);
|
|
306
|
+
--plass-track: rgb(255 255 255 / 0.16);
|
|
307
|
+
|
|
261
308
|
--plass-blur: blur(22px) saturate(150%);
|
|
262
309
|
|
|
263
310
|
--plass-gloss-glass: inset 0 1px 0 rgb(255 255 255 / 0.1);
|
|
264
|
-
--plass-gloss-solid: inset 0 1px 0 rgb(255 255 255 / 0.22);
|
|
265
311
|
|
|
266
312
|
--plass-well: inset 0 1px 2px rgb(0 0 0 / 0.45);
|
|
267
313
|
|
|
268
|
-
--plass-
|
|
269
|
-
|
|
270
|
-
rgb(255 255 255 / 0.18) 0%,
|
|
271
|
-
rgb(255 255 255 / 0.04) 46%,
|
|
272
|
-
rgb(255 255 255 / 0) 62%
|
|
273
|
-
);
|
|
314
|
+
--plass-glow-on-fill: rgb(255 255 255 / 0.15);
|
|
315
|
+
--plass-flash-on-fill: rgb(255 255 255 / 0.22);
|
|
274
316
|
|
|
275
|
-
--plass-shadow-ambient: rgb(0 0 0 / 0.
|
|
276
|
-
--plass-
|
|
317
|
+
--plass-shadow-ambient: rgb(0 0 0 / 0.42);
|
|
318
|
+
--plass-tint-strength: 55%;
|
|
277
319
|
|
|
278
320
|
--plass-scrim: rgb(0 0 0 / 0.6);
|
|
279
321
|
|
|
@@ -293,8 +335,8 @@
|
|
|
293
335
|
*
|
|
294
336
|
* **This block is repeated for every theme root**, because a custom property
|
|
295
337
|
* resolves its `var()`s on the element that declares it — declaring these only
|
|
296
|
-
* on `:root` would freeze `--plass-*-
|
|
297
|
-
* `--plass-
|
|
338
|
+
* on `:root` would freeze `--plass-*-tint` to the light theme's
|
|
339
|
+
* `--plass-tint-strength` inside a `.dark` subtree.
|
|
298
340
|
* ------------------------------------------------------------------------- */
|
|
299
341
|
|
|
300
342
|
:root,
|
|
@@ -302,32 +344,36 @@
|
|
|
302
344
|
.light,
|
|
303
345
|
[data-theme='dark'],
|
|
304
346
|
[data-theme='light'] {
|
|
305
|
-
/* The elevation ladder. Neutral, and it climbs by *blur* far
|
|
306
|
-
offset
|
|
307
|
-
sheet, and everything in this library is still
|
|
347
|
+
/* The elevation ladder. Neutral, wide and faint — it climbs by *blur* far
|
|
348
|
+
more than by offset, because a surface that moves 20px down the page when
|
|
349
|
+
it is raised has left the sheet, and everything in this library is still
|
|
350
|
+
sitting on one. A control's shadow is mostly the tint below rather than
|
|
351
|
+
this; what this adds is the small amount of grey that says the sheet is
|
|
352
|
+
above the page rather than printed on it. */
|
|
308
353
|
--plass-shadow-0: 0 0 #0000;
|
|
309
|
-
--plass-shadow-1: 0
|
|
310
|
-
--plass-shadow-2: 0
|
|
311
|
-
--plass-shadow-3: 0
|
|
312
|
-
--plass-shadow-4: 0
|
|
313
|
-
|
|
314
|
-
/* The
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
354
|
+
--plass-shadow-1: 0 4px 14px -3px var(--plass-shadow-ambient);
|
|
355
|
+
--plass-shadow-2: 0 8px 24px -5px var(--plass-shadow-ambient);
|
|
356
|
+
--plass-shadow-3: 0 14px 36px -9px var(--plass-shadow-ambient);
|
|
357
|
+
--plass-shadow-4: 0 22px 52px -13px var(--plass-shadow-ambient);
|
|
358
|
+
|
|
359
|
+
/* The fill: the family's two ends, swept across the control at 135deg.
|
|
360
|
+
|
|
361
|
+
Two stops and not three, and a *sweep* rather than a shade. Three stops
|
|
362
|
+
with a light one at the corner is how a moulded key is drawn, and a moulded
|
|
363
|
+
key was the wrong object — it needs a highlight over the top of it to
|
|
364
|
+
finish the illusion, and that highlight is what made every control look
|
|
365
|
+
lacquered. Two ends that turn in hue do the same work with none of the
|
|
366
|
+
shine, which is also the more modern of the two pictures.
|
|
367
|
+
|
|
368
|
+
135deg is the one direction the whole library agrees on. */
|
|
322
369
|
--plass-primary-fill: linear-gradient(
|
|
323
370
|
135deg,
|
|
324
|
-
|
|
325
|
-
var(--plass-primary-solid)
|
|
326
|
-
color-mix(in srgb, var(--plass-primary-solid) 90%, black) 100%
|
|
371
|
+
var(--plass-primary-solid) 0%,
|
|
372
|
+
var(--plass-primary-solid-to) 100%
|
|
327
373
|
);
|
|
328
|
-
--plass-primary-
|
|
374
|
+
--plass-primary-tint: color-mix(
|
|
329
375
|
in srgb,
|
|
330
|
-
var(--plass-primary-solid) var(--plass-
|
|
376
|
+
var(--plass-primary-solid) var(--plass-tint-strength),
|
|
331
377
|
transparent
|
|
332
378
|
);
|
|
333
379
|
--plass-primary-soft: color-mix(in srgb, var(--plass-primary-accent) 10%, transparent);
|
|
@@ -339,13 +385,12 @@
|
|
|
339
385
|
|
|
340
386
|
--plass-secondary-fill: linear-gradient(
|
|
341
387
|
135deg,
|
|
342
|
-
|
|
343
|
-
var(--plass-secondary-solid)
|
|
344
|
-
color-mix(in srgb, var(--plass-secondary-solid) 90%, black) 100%
|
|
388
|
+
var(--plass-secondary-solid) 0%,
|
|
389
|
+
var(--plass-secondary-solid-to) 100%
|
|
345
390
|
);
|
|
346
|
-
--plass-secondary-
|
|
391
|
+
--plass-secondary-tint: color-mix(
|
|
347
392
|
in srgb,
|
|
348
|
-
var(--plass-secondary-solid) var(--plass-
|
|
393
|
+
var(--plass-secondary-solid) var(--plass-tint-strength),
|
|
349
394
|
transparent
|
|
350
395
|
);
|
|
351
396
|
--plass-secondary-soft: color-mix(in srgb, var(--plass-secondary-accent) 10%, transparent);
|
|
@@ -357,13 +402,12 @@
|
|
|
357
402
|
|
|
358
403
|
--plass-success-fill: linear-gradient(
|
|
359
404
|
135deg,
|
|
360
|
-
|
|
361
|
-
var(--plass-success-solid)
|
|
362
|
-
color-mix(in srgb, var(--plass-success-solid) 90%, black) 100%
|
|
405
|
+
var(--plass-success-solid) 0%,
|
|
406
|
+
var(--plass-success-solid-to) 100%
|
|
363
407
|
);
|
|
364
|
-
--plass-success-
|
|
408
|
+
--plass-success-tint: color-mix(
|
|
365
409
|
in srgb,
|
|
366
|
-
var(--plass-success-solid) var(--plass-
|
|
410
|
+
var(--plass-success-solid) var(--plass-tint-strength),
|
|
367
411
|
transparent
|
|
368
412
|
);
|
|
369
413
|
--plass-success-soft: color-mix(in srgb, var(--plass-success-accent) 10%, transparent);
|
|
@@ -375,13 +419,12 @@
|
|
|
375
419
|
|
|
376
420
|
--plass-warning-fill: linear-gradient(
|
|
377
421
|
135deg,
|
|
378
|
-
|
|
379
|
-
var(--plass-warning-solid)
|
|
380
|
-
color-mix(in srgb, var(--plass-warning-solid) 90%, black) 100%
|
|
422
|
+
var(--plass-warning-solid) 0%,
|
|
423
|
+
var(--plass-warning-solid-to) 100%
|
|
381
424
|
);
|
|
382
|
-
--plass-warning-
|
|
425
|
+
--plass-warning-tint: color-mix(
|
|
383
426
|
in srgb,
|
|
384
|
-
var(--plass-warning-solid) var(--plass-
|
|
427
|
+
var(--plass-warning-solid) var(--plass-tint-strength),
|
|
385
428
|
transparent
|
|
386
429
|
);
|
|
387
430
|
--plass-warning-soft: color-mix(in srgb, var(--plass-warning-accent) 12%, transparent);
|
|
@@ -393,13 +436,12 @@
|
|
|
393
436
|
|
|
394
437
|
--plass-danger-fill: linear-gradient(
|
|
395
438
|
135deg,
|
|
396
|
-
|
|
397
|
-
var(--plass-danger-solid)
|
|
398
|
-
color-mix(in srgb, var(--plass-danger-solid) 90%, black) 100%
|
|
439
|
+
var(--plass-danger-solid) 0%,
|
|
440
|
+
var(--plass-danger-solid-to) 100%
|
|
399
441
|
);
|
|
400
|
-
--plass-danger-
|
|
442
|
+
--plass-danger-tint: color-mix(
|
|
401
443
|
in srgb,
|
|
402
|
-
var(--plass-danger-solid) var(--plass-
|
|
444
|
+
var(--plass-danger-solid) var(--plass-tint-strength),
|
|
403
445
|
transparent
|
|
404
446
|
);
|
|
405
447
|
--plass-danger-soft: color-mix(in srgb, var(--plass-danger-accent) 10%, transparent);
|
|
@@ -411,13 +453,12 @@
|
|
|
411
453
|
|
|
412
454
|
--plass-info-fill: linear-gradient(
|
|
413
455
|
135deg,
|
|
414
|
-
|
|
415
|
-
var(--plass-info-solid)
|
|
416
|
-
color-mix(in srgb, var(--plass-info-solid) 90%, black) 100%
|
|
456
|
+
var(--plass-info-solid) 0%,
|
|
457
|
+
var(--plass-info-solid-to) 100%
|
|
417
458
|
);
|
|
418
|
-
--plass-info-
|
|
459
|
+
--plass-info-tint: color-mix(
|
|
419
460
|
in srgb,
|
|
420
|
-
var(--plass-info-solid) var(--plass-
|
|
461
|
+
var(--plass-info-solid) var(--plass-tint-strength),
|
|
421
462
|
transparent
|
|
422
463
|
);
|
|
423
464
|
--plass-info-soft: color-mix(in srgb, var(--plass-info-accent) 10%, transparent);
|
|
@@ -448,38 +489,707 @@
|
|
|
448
489
|
}
|
|
449
490
|
|
|
450
491
|
/* ---------------------------------------------------------------------------
|
|
451
|
-
*
|
|
492
|
+
* Links
|
|
493
|
+
*
|
|
494
|
+
* `<a>` is, with `<td>`, one of the two tags a host stylesheet still styles by
|
|
495
|
+
* name — `.prose a`, `.vp-doc a`, every CSS framework — and all of those are a
|
|
496
|
+
* class plus a type, which outranks a plain one-class utility. A PlTextLink
|
|
497
|
+
* that lost its line and its colour inside a `.prose` block would have lost the
|
|
498
|
+
* only two things it is.
|
|
499
|
+
*
|
|
500
|
+
* So the selector is doubled. `.plass-link.plass-link` is two classes and
|
|
501
|
+
* matches nothing extra, which puts these declarations above a host's `a` rule
|
|
502
|
+
* and still below anything a caller writes with two classes of their own. Only
|
|
503
|
+
* the invariants are here — the parts of a link that no prop changes. The
|
|
504
|
+
* colour and whether the line is drawn at all stay in the component, written
|
|
505
|
+
* through the same doubled class.
|
|
506
|
+
*
|
|
507
|
+
* The thickness has a `max()` floor because a hairline that lands between two
|
|
508
|
+
* device pixels is antialiased into a grey smudge: 0.055em is a real line from
|
|
509
|
+
* about 18px up, and 1px below that.
|
|
510
|
+
* ------------------------------------------------------------------------- */
|
|
511
|
+
|
|
512
|
+
.plass-link.plass-link {
|
|
513
|
+
font-weight: inherit;
|
|
514
|
+
text-decoration-thickness: max(1px, 0.055em);
|
|
515
|
+
text-underline-offset: 0.2em;
|
|
516
|
+
text-underline-position: from-font;
|
|
517
|
+
text-decoration-color: var(--p-underline);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.plass-link.plass-link:hover {
|
|
521
|
+
text-decoration-color: var(--p-underline-hover);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* ---------------------------------------------------------------------------
|
|
525
|
+
* Interaction light
|
|
452
526
|
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
527
|
+
* Two stacked layers on an interactive surface, both reading `--p-mx`/`--p-my`
|
|
528
|
+
* — the pointer position, written straight to the element's inline style on
|
|
529
|
+
* `pointermove` — and both no-ops until those slots have colour in them.
|
|
455
530
|
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
531
|
+
* This is the one thing a conventional toolkit's controls do not do, and it is
|
|
532
|
+
* here because a surface made of glass should answer where it is being touched. It replaces
|
|
533
|
+
* a static specular highlight that used to sit over every filled control: a
|
|
534
|
+
* highlight that is always on is a claim about a lamp somewhere off-screen,
|
|
535
|
+
* and it read as lacquer. Light that arrives with the pointer is a claim about
|
|
536
|
+
* the pointer, which is true.
|
|
461
537
|
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
538
|
+
* It lives in CSS rather than in Tailwind arbitrary variants because the
|
|
539
|
+
* selectors are pseudo-elements carrying gradients: `[&::before]:[background:
|
|
540
|
+
* radial-gradient(...)]` is technically expressible and completely unreadable.
|
|
465
541
|
*
|
|
466
|
-
* Cost per control:
|
|
467
|
-
*
|
|
542
|
+
* Cost per hovered control: two composited layers and a gradient repaint of one
|
|
543
|
+
* small box, on frames the pointer already moved in. Nothing reflows, and React
|
|
544
|
+
* never re-renders — the component writes the two custom properties directly.
|
|
468
545
|
* ------------------------------------------------------------------------- */
|
|
469
546
|
|
|
470
|
-
.plass-
|
|
547
|
+
.plass-glow::before,
|
|
548
|
+
.plass-glow::after {
|
|
471
549
|
content: '';
|
|
472
550
|
position: absolute;
|
|
473
551
|
inset: 0;
|
|
474
552
|
border-radius: inherit;
|
|
475
553
|
pointer-events: none;
|
|
476
|
-
|
|
554
|
+
opacity: 0;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/* The bloom trailing the pointer across the surface. */
|
|
558
|
+
.plass-glow::before {
|
|
559
|
+
background: radial-gradient(
|
|
560
|
+
6rem circle at var(--p-mx, 50%) var(--p-my, 50%),
|
|
561
|
+
var(--p-glow, transparent),
|
|
562
|
+
transparent 70%
|
|
563
|
+
);
|
|
564
|
+
transition: opacity 240ms var(--plass-ease);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
@media (hover: hover) {
|
|
568
|
+
.plass-glow:hover::before {
|
|
569
|
+
opacity: 1;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/*
|
|
574
|
+
* The press, and the release afterglow. The asymmetry is the whole trick: 0ms
|
|
575
|
+
* in, ~700ms out, so the flash lands on the frame of the press and is still
|
|
576
|
+
* visibly draining a beat after the finger lifts. No JavaScript, no ripple
|
|
577
|
+
* element, no timers.
|
|
578
|
+
*
|
|
579
|
+
* This layer is also what carries the effect on a touch screen, where there is
|
|
580
|
+
* no hover at all: `:active` holds for as long as the finger is down, and
|
|
581
|
+
* `pointermove` keeps writing the coordinates, so the light follows a finger
|
|
582
|
+
* dragged across the control.
|
|
583
|
+
*/
|
|
584
|
+
.plass-glow::after {
|
|
585
|
+
background: radial-gradient(
|
|
586
|
+
5rem circle at var(--p-mx, 50%) var(--p-my, 50%),
|
|
587
|
+
var(--p-flash, transparent),
|
|
588
|
+
transparent 72%
|
|
589
|
+
);
|
|
590
|
+
transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.plass-glow:active::after {
|
|
477
594
|
opacity: 1;
|
|
478
|
-
transition
|
|
595
|
+
transition-duration: 0ms;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/* ---------------------------------------------------------------------------
|
|
599
|
+
* The three dots in a bubble somebody is typing into
|
|
600
|
+
*
|
|
601
|
+
* Colour only. The dots never move, so a message being written does not bounce
|
|
602
|
+
* in a thread somebody else is reading — the same restraint every other
|
|
603
|
+
* indeterminate indicator here keeps, and the reason the spinner is the one
|
|
604
|
+
* thing in the library allowed to turn.
|
|
605
|
+
*
|
|
606
|
+
* `currentColor` throughout, because a bubble's ink is `--p-on-solid` on a
|
|
607
|
+
* filled surface and the page's own on the other two, and the dots have to be
|
|
608
|
+
* legible on both. The delay is carried per dot in `--p-i`.
|
|
609
|
+
* ------------------------------------------------------------------------- */
|
|
610
|
+
|
|
611
|
+
@keyframes plass-typing {
|
|
612
|
+
0%,
|
|
613
|
+
60%,
|
|
614
|
+
100% {
|
|
615
|
+
background-color: color-mix(in oklab, currentColor 28%, transparent);
|
|
616
|
+
}
|
|
617
|
+
30% {
|
|
618
|
+
background-color: currentColor;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.plass-typing-dot {
|
|
623
|
+
background-color: color-mix(in oklab, currentColor 28%, transparent);
|
|
624
|
+
animation: plass-typing 1.25s var(--plass-ease) infinite;
|
|
625
|
+
animation-delay: calc(var(--p-i, 0) * 160ms);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/* ---------------------------------------------------------------------------
|
|
629
|
+
* The three indeterminate indicators
|
|
630
|
+
*
|
|
631
|
+
* A determinate bar, ring or row of plates needs nothing here: it is a width, a
|
|
632
|
+
* dash offset and a set of opacities, all of which the component writes. This
|
|
633
|
+
* is the other case — something is happening and nobody knows how much of it is
|
|
634
|
+
* left — and an indicator that does not move while saying so is a decoration.
|
|
635
|
+
*
|
|
636
|
+
* They are in CSS rather than in Tailwind for the reason `.plass-glow` is: a
|
|
637
|
+
* keyframe is not a variant, so there is nothing to express one with.
|
|
638
|
+
*
|
|
639
|
+
* Two rules hold across all three. **Nothing changes the paint.** A Plass fill is a gradient and
|
|
640
|
+
* a gradient cannot be interpolated, so what moves is a length or an opacity and
|
|
641
|
+
* the fill itself is either there or not. And **the segment travels on
|
|
642
|
+
* `inset-inline-start`**, not on a `transform` — the same trade the skeleton's
|
|
643
|
+
* highlight makes, and for the same two reasons: it runs the other way under RTL
|
|
644
|
+
* without being told, and the layout pass it costs is confined to a box with
|
|
645
|
+
* nothing in it.
|
|
646
|
+
* ------------------------------------------------------------------------- */
|
|
647
|
+
|
|
648
|
+
@keyframes plass-progress-sweep {
|
|
649
|
+
from {
|
|
650
|
+
inset-inline-start: -45%;
|
|
651
|
+
}
|
|
652
|
+
to {
|
|
653
|
+
inset-inline-start: 100%;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.plass-progress-sweep {
|
|
658
|
+
position: absolute;
|
|
659
|
+
inset-block: 0;
|
|
660
|
+
inline-size: 45%;
|
|
661
|
+
animation: plass-progress-sweep 1.15s var(--plass-ease) infinite;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/* The one place the library turns something, and the exception is the same one
|
|
665
|
+
the spinner already has: an indeterminate indicator that holds still says the
|
|
666
|
+
opposite of what it is for. `rotate` rather than `transform`, so nothing else
|
|
667
|
+
on the element is overwritten. */
|
|
668
|
+
@keyframes plass-ring-spin {
|
|
669
|
+
to {
|
|
670
|
+
rotate: 360deg;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.plass-ring-spin {
|
|
675
|
+
transform-origin: center;
|
|
676
|
+
animation: plass-ring-spin 900ms linear infinite;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/*
|
|
680
|
+
* The plates light in sequence, each held back by its own index.
|
|
681
|
+
*
|
|
682
|
+
* The gradient is on the layer underneath at full strength the whole time and
|
|
683
|
+
* what cycles is its `opacity`, which is what lets a plate light *in* rather
|
|
684
|
+
* than snapping: `background-image` has no interpolation between a gradient and
|
|
685
|
+
* nothing. The plates never move — a row of them reads as a surface being
|
|
686
|
+
* written to rather than as something bouncing in the corner of a page somebody
|
|
687
|
+
* is reading.
|
|
688
|
+
*/
|
|
689
|
+
@keyframes plass-plate-wave {
|
|
690
|
+
0%,
|
|
691
|
+
70%,
|
|
692
|
+
100% {
|
|
693
|
+
opacity: 0;
|
|
694
|
+
}
|
|
695
|
+
35% {
|
|
696
|
+
opacity: 1;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.plass-plate-wave {
|
|
701
|
+
animation: plass-plate-wave 1.2s var(--plass-ease) infinite;
|
|
702
|
+
animation-delay: calc(var(--p-i, 0) * 120ms);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/* The reduced-motion stand-in for the travelling segment: it stops travelling,
|
|
706
|
+
fills the groove, and breathes instead. */
|
|
707
|
+
@keyframes plass-progress-pulse {
|
|
708
|
+
0%,
|
|
709
|
+
100% {
|
|
710
|
+
opacity: 0.4;
|
|
711
|
+
}
|
|
712
|
+
50% {
|
|
713
|
+
opacity: 1;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/* ---------------------------------------------------------------------------
|
|
718
|
+
* The travelling highlight on a placeholder
|
|
719
|
+
*
|
|
720
|
+
* `inset-inline-start` rather than a `transform`, which is the same trade the
|
|
721
|
+
* rest of the library makes and for the same two reasons: it runs the other way
|
|
722
|
+
* under RTL without being told, and the layout pass it costs is confined to a
|
|
723
|
+
* box with nothing in it.
|
|
724
|
+
*
|
|
725
|
+
* A pseudo-element rather than a child, so a `PlSkeleton` is one element per
|
|
726
|
+
* shape and a stack of ten lines is ten nodes rather than twenty. The gradient
|
|
727
|
+
* is symmetric, so it needs no direction of its own.
|
|
728
|
+
*
|
|
729
|
+
* This is in CSS rather than in Tailwind for the reason `.plass-glow` is: a
|
|
730
|
+
* keyframe is not a Tailwind variant, so there is nothing to express one with.
|
|
731
|
+
* ------------------------------------------------------------------------- */
|
|
732
|
+
|
|
733
|
+
@keyframes plass-skeleton-sweep {
|
|
734
|
+
from {
|
|
735
|
+
inset-inline-start: -60%;
|
|
736
|
+
}
|
|
737
|
+
to {
|
|
738
|
+
inset-inline-start: 100%;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.plass-skeleton::after {
|
|
743
|
+
content: '';
|
|
744
|
+
position: absolute;
|
|
745
|
+
inset-block: 0;
|
|
746
|
+
inline-size: 60%;
|
|
747
|
+
background-image: linear-gradient(90deg, transparent, var(--p-soft-press), transparent);
|
|
748
|
+
animation: plass-skeleton-sweep 1.5s var(--plass-ease) infinite;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/* The reduced-motion stand-in: the highlight stops travelling and the whole
|
|
752
|
+
placeholder breathes instead. Colour, which is the axis every other state in
|
|
753
|
+
the library already uses. */
|
|
754
|
+
@keyframes plass-skeleton-pulse {
|
|
755
|
+
0%,
|
|
756
|
+
100% {
|
|
757
|
+
background-color: transparent;
|
|
758
|
+
}
|
|
759
|
+
50% {
|
|
760
|
+
background-color: var(--p-soft-press);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/* ---------------------------------------------------------------------------
|
|
765
|
+
* The grid
|
|
766
|
+
*
|
|
767
|
+
* `PlGrid` is a flex row and `PlGridItem` is a width in it, which is the shape
|
|
768
|
+
* a twelve-column grid has had since long before CSS had one of its own — and
|
|
769
|
+
* still the only shape where an item can carry a start offset without an
|
|
770
|
+
* explicit line number, and where the row can be told to stop wrapping.
|
|
771
|
+
*
|
|
772
|
+
* This is real CSS rather than Tailwind for the reason the rest of this file
|
|
773
|
+
* is: `columns` is a number a caller picks and `span` changes at four widths,
|
|
774
|
+
* so the class name would have to be assembled at runtime — and a class name
|
|
775
|
+
* assembled at runtime is a class name Tailwind never sees. The per-instance
|
|
776
|
+
* numbers arrive as inline `--p-*` slots, exactly as colours do, and the
|
|
777
|
+
* arithmetic lives here once.
|
|
778
|
+
*
|
|
779
|
+
* `min(span, columns)` is the clamp: `span={99}` fills its row instead of
|
|
780
|
+
* overflowing the page, which is what the caller meant.
|
|
781
|
+
*
|
|
782
|
+
* Every slot cascades upward — each breakpoint falls back through the ones
|
|
783
|
+
* below it — so `span={{ md: 6 }}` sets one custom property and not five. The
|
|
784
|
+
* chains get long at `xl`; that is the cost of keeping the DOM lean, and it is
|
|
785
|
+
* paid once here rather than on every grid item in a consumer's app.
|
|
786
|
+
*
|
|
787
|
+
* The widths are Tailwind's own breakpoints, so a Plass grid and an `md:`
|
|
788
|
+
* utility change at the same moment.
|
|
789
|
+
* ------------------------------------------------------------------------- */
|
|
790
|
+
|
|
791
|
+
.plass-grid {
|
|
792
|
+
--p-cols: var(--p-cols-xs, 12);
|
|
793
|
+
--p-gap-x: var(--p-gap-x-xs, 0px);
|
|
794
|
+
--p-gap-y: var(--p-gap-y-xs, 0px);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.plass-grid-item {
|
|
798
|
+
--p-span: var(--p-span-xs, var(--p-cols, 12));
|
|
799
|
+
--p-offset: var(--p-offset-xs, 0);
|
|
800
|
+
|
|
801
|
+
/* One column plus one gutter. `--p-cols` and `--p-gap-x` are inherited from
|
|
802
|
+
the grid, so this re-resolves on its own at every breakpoint. */
|
|
803
|
+
--p-track: calc((100% + var(--p-gap-x, 0px)) / var(--p-cols, 12));
|
|
804
|
+
|
|
805
|
+
/* Inseparable from the width below them: `flex` stops the row from resizing
|
|
806
|
+
the item, `min-width` stops a long unbroken word from doing the same, and
|
|
807
|
+
`box-sizing` is what makes the percentage mean the whole item. */
|
|
808
|
+
box-sizing: border-box;
|
|
809
|
+
flex: 0 0 auto;
|
|
810
|
+
min-width: 0;
|
|
811
|
+
width: calc(var(--p-track) * min(var(--p-span), var(--p-cols, 12)) - var(--p-gap-x, 0px));
|
|
812
|
+
margin-inline-start: calc(var(--p-track) * min(var(--p-offset), var(--p-cols, 12)));
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
@media (width >= 40rem) {
|
|
816
|
+
.plass-grid {
|
|
817
|
+
--p-cols: var(--p-cols-sm, var(--p-cols-xs, 12));
|
|
818
|
+
--p-gap-x: var(--p-gap-x-sm, var(--p-gap-x-xs, 0px));
|
|
819
|
+
--p-gap-y: var(--p-gap-y-sm, var(--p-gap-y-xs, 0px));
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.plass-grid-item {
|
|
823
|
+
--p-span: var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12)));
|
|
824
|
+
--p-offset: var(--p-offset-sm, var(--p-offset-xs, 0));
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
@media (width >= 48rem) {
|
|
829
|
+
.plass-grid {
|
|
830
|
+
--p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12)));
|
|
831
|
+
--p-gap-x: var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px)));
|
|
832
|
+
--p-gap-y: var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px)));
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.plass-grid-item {
|
|
836
|
+
--p-span: var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12))));
|
|
837
|
+
--p-offset: var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0)));
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
@media (width >= 64rem) {
|
|
842
|
+
.plass-grid {
|
|
843
|
+
--p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))));
|
|
844
|
+
--p-gap-x: var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))));
|
|
845
|
+
--p-gap-y: var(--p-gap-y-lg, var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px))));
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.plass-grid-item {
|
|
849
|
+
--p-span: var(
|
|
850
|
+
--p-span-lg,
|
|
851
|
+
var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12))))
|
|
852
|
+
);
|
|
853
|
+
--p-offset: var(--p-offset-lg, var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0))));
|
|
854
|
+
}
|
|
479
855
|
}
|
|
480
856
|
|
|
481
|
-
|
|
482
|
-
|
|
857
|
+
@media (width >= 80rem) {
|
|
858
|
+
.plass-grid {
|
|
859
|
+
--p-cols: var(
|
|
860
|
+
--p-cols-xl,
|
|
861
|
+
var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))))
|
|
862
|
+
);
|
|
863
|
+
--p-gap-x: var(
|
|
864
|
+
--p-gap-x-xl,
|
|
865
|
+
var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))))
|
|
866
|
+
);
|
|
867
|
+
--p-gap-y: var(
|
|
868
|
+
--p-gap-y-xl,
|
|
869
|
+
var(--p-gap-y-lg, var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px))))
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.plass-grid-item {
|
|
874
|
+
--p-span: var(
|
|
875
|
+
--p-span-xl,
|
|
876
|
+
var(--p-span-lg, var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12)))))
|
|
877
|
+
);
|
|
878
|
+
--p-offset: var(
|
|
879
|
+
--p-offset-xl,
|
|
880
|
+
var(--p-offset-lg, var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0))))
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
/* ---------------------------------------------------------------------------
|
|
886
|
+
* Motion
|
|
887
|
+
*
|
|
888
|
+
* The `PlAnimate*` components. Real CSS for the reason the loading indicators
|
|
889
|
+
* above are: a keyframe is not a Tailwind variant, so there is nothing to
|
|
890
|
+
* express one with.
|
|
891
|
+
*
|
|
892
|
+
* The whole set is built on one idea. An effect is a single `@keyframes` that
|
|
893
|
+
* runs from a state written entirely in `--p-anim-*` custom properties to the
|
|
894
|
+
* element's natural one — so `src/internal/animate.ts` never generates CSS, it
|
|
895
|
+
* only fills slots, and running an effect backwards is `animation-direction:
|
|
896
|
+
* reverse` rather than a second keyframe. That is what makes `mode="out"` cost
|
|
897
|
+
* nothing.
|
|
898
|
+
*
|
|
899
|
+
* `fill-mode` is `both` throughout, which is what lets an animation that has
|
|
900
|
+
* not been triggered yet sit paused on its own first frame. Without it, an
|
|
901
|
+
* element waiting to be scrolled into view would be fully drawn and then blink
|
|
902
|
+
* out the moment it arrived.
|
|
903
|
+
*
|
|
904
|
+
* This is also where the rule against transforms is at its narrowest. A
|
|
905
|
+
* *control* never moves — that rule is about a key resampling its label under
|
|
906
|
+
* the pointer, and it holds without exception. A `PlAnimate*` wraps content a
|
|
907
|
+
* caller asked to have moved, and it moves it with the independent `translate`,
|
|
908
|
+
* `scale` and `rotate` properties rather than the `transform` shorthand, so a
|
|
909
|
+
* caller's own transform on the same element survives.
|
|
910
|
+
* ------------------------------------------------------------------------- */
|
|
911
|
+
|
|
912
|
+
.plass-anim {
|
|
913
|
+
animation-duration: var(--p-anim-duration, 300ms);
|
|
914
|
+
animation-delay: var(--p-anim-delay, 0ms);
|
|
915
|
+
animation-timing-function: var(--p-anim-ease, var(--plass-ease));
|
|
916
|
+
animation-iteration-count: var(--p-anim-repeat, 1);
|
|
917
|
+
animation-direction: var(--p-anim-direction, normal);
|
|
918
|
+
animation-fill-mode: both;
|
|
919
|
+
animation-play-state: var(--p-anim-state, running);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
@keyframes plass-anim-fade {
|
|
923
|
+
from {
|
|
924
|
+
opacity: var(--p-anim-opacity, 0);
|
|
925
|
+
}
|
|
926
|
+
to {
|
|
927
|
+
opacity: 1;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.plass-anim-fade {
|
|
932
|
+
animation-name: plass-anim-fade;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/* Grow and Zoom share this one: they are the same arithmetic at two strengths,
|
|
936
|
+
separated by their defaults and by their origin rather than by their maths. */
|
|
937
|
+
@keyframes plass-anim-scale {
|
|
938
|
+
from {
|
|
939
|
+
opacity: var(--p-anim-opacity, 0);
|
|
940
|
+
scale: var(--p-anim-scale, 0.8);
|
|
941
|
+
}
|
|
942
|
+
to {
|
|
943
|
+
opacity: 1;
|
|
944
|
+
scale: 1;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.plass-anim-scale {
|
|
949
|
+
animation-name: plass-anim-scale;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
@keyframes plass-anim-slide {
|
|
953
|
+
from {
|
|
954
|
+
opacity: var(--p-anim-opacity, 0);
|
|
955
|
+
translate: var(--p-anim-x, 0px) var(--p-anim-y, 0px);
|
|
956
|
+
}
|
|
957
|
+
to {
|
|
958
|
+
opacity: 1;
|
|
959
|
+
translate: 0 0;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.plass-anim-slide {
|
|
964
|
+
animation-name: plass-anim-slide;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/* Two angles rather than one, so the same keyframe covers both the quarter turn
|
|
968
|
+
something arrives on and the endless one a badge spins through. */
|
|
969
|
+
@keyframes plass-anim-rotate {
|
|
970
|
+
from {
|
|
971
|
+
opacity: var(--p-anim-opacity, 0);
|
|
972
|
+
rotate: var(--p-anim-angle, -180deg);
|
|
973
|
+
}
|
|
974
|
+
to {
|
|
975
|
+
opacity: 1;
|
|
976
|
+
rotate: var(--p-anim-angle-to, 0deg);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.plass-anim-rotate {
|
|
981
|
+
animation-name: plass-anim-rotate;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/* Symmetric on purpose: a blink that ended anywhere but where it started would
|
|
985
|
+
leave the element half drawn whenever the count ran out. */
|
|
986
|
+
@keyframes plass-anim-blink {
|
|
987
|
+
0%,
|
|
988
|
+
100% {
|
|
989
|
+
opacity: 1;
|
|
990
|
+
}
|
|
991
|
+
50% {
|
|
992
|
+
opacity: var(--p-anim-opacity, 0);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
.plass-anim-blink {
|
|
997
|
+
animation-name: plass-anim-blink;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/*
|
|
1001
|
+
* The light travelling around the outside of something.
|
|
1002
|
+
*
|
|
1003
|
+
* What moves is the `from` angle of a conic gradient, which is only animatable
|
|
1004
|
+
* because the angle is a registered custom property with a type. The
|
|
1005
|
+
* alternative — rotating the pseudo-element itself — swings its corners out
|
|
1006
|
+
* past the element on every quarter turn.
|
|
1007
|
+
*
|
|
1008
|
+
* The arc **turns in hue along its length**, between the two ends of the family
|
|
1009
|
+
* at one lightness, exactly as a `solid` fill does. A flat arc would be the one
|
|
1010
|
+
* place in the library where a coloured surface is paint rather than glass.
|
|
1011
|
+
*
|
|
1012
|
+
* `z-index: -1` inside an isolated stacking context puts the light behind the
|
|
1013
|
+
* content but still inside the component, so it reads as a glow escaping from
|
|
1014
|
+
* under a sheet rather than as a border drawn around one.
|
|
1015
|
+
*/
|
|
1016
|
+
@property --plass-glow-angle {
|
|
1017
|
+
syntax: '<angle>';
|
|
1018
|
+
initial-value: 0deg;
|
|
1019
|
+
inherits: false;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
@keyframes plass-anim-lighting {
|
|
1023
|
+
to {
|
|
1024
|
+
--plass-glow-angle: 360deg;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.plass-anim-lighting {
|
|
1029
|
+
position: relative;
|
|
1030
|
+
isolation: isolate;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.plass-anim-lighting::before {
|
|
1034
|
+
content: '';
|
|
1035
|
+
position: absolute;
|
|
1036
|
+
z-index: -1;
|
|
1037
|
+
inset: calc(-1 * var(--p-anim-glow-width, 3px));
|
|
1038
|
+
border-radius: inherit;
|
|
1039
|
+
background: conic-gradient(
|
|
1040
|
+
from var(--plass-glow-angle),
|
|
1041
|
+
transparent 0deg,
|
|
1042
|
+
var(--p-anim-glow-from) calc(var(--p-anim-glow-arc, 50deg) * 0.5),
|
|
1043
|
+
var(--p-anim-glow-to) var(--p-anim-glow-arc, 50deg),
|
|
1044
|
+
transparent calc(var(--p-anim-glow-arc, 50deg) * 2),
|
|
1045
|
+
transparent 360deg
|
|
1046
|
+
);
|
|
1047
|
+
filter: blur(var(--p-anim-glow-blur, 5px));
|
|
1048
|
+
animation-name: plass-anim-lighting;
|
|
1049
|
+
animation-duration: var(--p-anim-duration, 3s);
|
|
1050
|
+
animation-delay: var(--p-anim-delay, 0ms);
|
|
1051
|
+
animation-timing-function: linear;
|
|
1052
|
+
animation-iteration-count: var(--p-anim-repeat, infinite);
|
|
1053
|
+
animation-direction: var(--p-anim-direction, normal);
|
|
1054
|
+
animation-fill-mode: both;
|
|
1055
|
+
animation-play-state: var(--p-anim-state, running);
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/*
|
|
1059
|
+
* Marquee: two identical copies, both moving by exactly one copy plus the gap.
|
|
1060
|
+
*
|
|
1061
|
+
* Which is the whole trick — when the first copy has travelled its own width,
|
|
1062
|
+
* the second is standing precisely where the first began, so there is no seam
|
|
1063
|
+
* and no frame where the strip is empty. A percentage `translate` resolves
|
|
1064
|
+
* against the element's own box, so neither copy has to be measured for this to
|
|
1065
|
+
* hold; measuring only ever decides how *fast* it goes.
|
|
1066
|
+
*/
|
|
1067
|
+
@keyframes plass-anim-marquee-x {
|
|
1068
|
+
from {
|
|
1069
|
+
translate: 0 0;
|
|
1070
|
+
}
|
|
1071
|
+
to {
|
|
1072
|
+
translate: calc(-100% - var(--p-anim-gap, 0px)) 0;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
@keyframes plass-anim-marquee-y {
|
|
1077
|
+
from {
|
|
1078
|
+
translate: 0 0;
|
|
1079
|
+
}
|
|
1080
|
+
to {
|
|
1081
|
+
translate: 0 calc(-100% - var(--p-anim-gap, 0px));
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.plass-marquee {
|
|
1086
|
+
display: flex;
|
|
1087
|
+
overflow: hidden;
|
|
1088
|
+
gap: var(--p-anim-gap, 0px);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
.plass-marquee-vertical {
|
|
1092
|
+
flex-direction: column;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.plass-marquee-track {
|
|
1096
|
+
display: flex;
|
|
1097
|
+
flex: 0 0 auto;
|
|
1098
|
+
align-items: center;
|
|
1099
|
+
gap: var(--p-anim-gap, 0px);
|
|
1100
|
+
animation-name: plass-anim-marquee-x;
|
|
1101
|
+
animation-duration: var(--p-anim-duration, 12s);
|
|
1102
|
+
animation-delay: var(--p-anim-delay, 0ms);
|
|
1103
|
+
/* Linear unless a caller insists otherwise. An eased marquee slows at both
|
|
1104
|
+
ends of a loop that has no ends, which reads as the page stuttering. */
|
|
1105
|
+
animation-timing-function: var(--p-anim-ease, linear);
|
|
1106
|
+
animation-iteration-count: var(--p-anim-repeat, infinite);
|
|
1107
|
+
animation-direction: var(--p-anim-direction, normal);
|
|
1108
|
+
animation-fill-mode: both;
|
|
1109
|
+
animation-play-state: var(--p-anim-state, running);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.plass-marquee-vertical .plass-marquee-track {
|
|
1113
|
+
flex-direction: column;
|
|
1114
|
+
animation-name: plass-anim-marquee-y;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.plass-marquee[data-pause-on-hover]:hover .plass-marquee-track {
|
|
1118
|
+
animation-play-state: paused;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/*
|
|
1122
|
+
* Headline: one line replacing another from below.
|
|
1123
|
+
*
|
|
1124
|
+
* Every item is in the same grid cell, so the box is as tall as the tallest of
|
|
1125
|
+
* them and never resizes as the reel turns. The ones not on screen keep their
|
|
1126
|
+
* space with `visibility` rather than `display`, which is what makes that true.
|
|
1127
|
+
*/
|
|
1128
|
+
@keyframes plass-anim-headline-in {
|
|
1129
|
+
from {
|
|
1130
|
+
translate: 0 var(--p-anim-rise, 100%);
|
|
1131
|
+
opacity: 0;
|
|
1132
|
+
}
|
|
1133
|
+
to {
|
|
1134
|
+
translate: 0 0;
|
|
1135
|
+
opacity: 1;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
@keyframes plass-anim-headline-out {
|
|
1140
|
+
from {
|
|
1141
|
+
translate: 0 0;
|
|
1142
|
+
opacity: 1;
|
|
1143
|
+
}
|
|
1144
|
+
to {
|
|
1145
|
+
translate: 0 calc(-1 * var(--p-anim-rise, 100%));
|
|
1146
|
+
opacity: 0;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
.plass-headline {
|
|
1151
|
+
display: grid;
|
|
1152
|
+
overflow: hidden;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.plass-headline-item {
|
|
1156
|
+
grid-area: 1 / 1;
|
|
1157
|
+
visibility: hidden;
|
|
1158
|
+
animation-duration: var(--p-anim-duration, 460ms);
|
|
1159
|
+
animation-timing-function: var(--p-anim-ease, var(--plass-ease));
|
|
1160
|
+
animation-fill-mode: both;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
.plass-headline-item[data-state='active'] {
|
|
1164
|
+
visibility: visible;
|
|
1165
|
+
animation-name: plass-anim-headline-in;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.plass-headline-item[data-state='leaving'] {
|
|
1169
|
+
visibility: visible;
|
|
1170
|
+
animation-name: plass-anim-headline-out;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/* The block after a typewriter. `step-end` rather than a fade, because a caret
|
|
1174
|
+
that eases is a caret that looks like it is being rendered slowly.
|
|
1175
|
+
|
|
1176
|
+
`.plass-caret` and not `.plass-typing-*`, which is already taken by the three
|
|
1177
|
+
dots in a bubble somebody is writing into — two unrelated things, one of them
|
|
1178
|
+
a state and the other an effect. */
|
|
1179
|
+
@keyframes plass-anim-caret {
|
|
1180
|
+
0%,
|
|
1181
|
+
45% {
|
|
1182
|
+
opacity: 1;
|
|
1183
|
+
}
|
|
1184
|
+
55%,
|
|
1185
|
+
100% {
|
|
1186
|
+
opacity: 0;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.plass-caret {
|
|
1191
|
+
display: inline-block;
|
|
1192
|
+
animation: plass-anim-caret 1s step-end infinite;
|
|
483
1193
|
}
|
|
484
1194
|
|
|
485
1195
|
/* ---------------------------------------------------------------------------
|
|
@@ -488,11 +1198,75 @@
|
|
|
488
1198
|
* Nothing in Plass animates on its own except a spinner, so this is about the
|
|
489
1199
|
* transitions: someone who has asked for less movement is asking for state
|
|
490
1200
|
* changes to *arrive*, not to be taken away. The colours still change; they
|
|
491
|
-
* simply stop easing
|
|
1201
|
+
* simply stop easing, and the light stops trailing the pointer across the
|
|
1202
|
+
* surface — it is either on the control or it is not.
|
|
492
1203
|
* ------------------------------------------------------------------------- */
|
|
493
1204
|
|
|
494
1205
|
@media (prefers-reduced-motion: reduce) {
|
|
495
|
-
.plass-
|
|
1206
|
+
.plass-glow::before,
|
|
1207
|
+
.plass-glow::after {
|
|
496
1208
|
transition-duration: 1ms;
|
|
497
1209
|
}
|
|
1210
|
+
|
|
1211
|
+
/* The highlight stops travelling and the placeholder pulses in place. It is
|
|
1212
|
+
kept running rather than stopped, because a skeleton that holds still is
|
|
1213
|
+
indistinguishable from an empty box that finished loading with nothing in
|
|
1214
|
+
it. */
|
|
1215
|
+
.plass-skeleton::after {
|
|
1216
|
+
inset-inline-start: 0;
|
|
1217
|
+
inline-size: 100%;
|
|
1218
|
+
background-image: none;
|
|
1219
|
+
animation: plass-skeleton-pulse 2.4s var(--plass-ease) infinite;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/* Slowed rather than stopped, for the same reason: the dots are what say
|
|
1223
|
+
somebody is still typing, and dots that hold still say the opposite. */
|
|
1224
|
+
.plass-typing-dot {
|
|
1225
|
+
animation-duration: 2.6s;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/* The indicators are not switched off either, and for the same reason again:
|
|
1229
|
+
one that holds still says the opposite of what it is for. The travelling
|
|
1230
|
+
segment stops travelling, fills the groove and breathes instead, and the
|
|
1231
|
+
two that genuinely have to keep turning or cycling are slowed to where they
|
|
1232
|
+
stop reading as motion. */
|
|
1233
|
+
.plass-progress-sweep {
|
|
1234
|
+
inset-inline-start: 0;
|
|
1235
|
+
inline-size: 100%;
|
|
1236
|
+
animation: plass-progress-pulse 1.8s var(--plass-ease) infinite;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.plass-ring-spin {
|
|
1240
|
+
animation-duration: 2.4s;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.plass-plate-wave {
|
|
1244
|
+
animation-duration: 2.4s;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/*
|
|
1248
|
+
* The `PlAnimate*` components go the other way from the indicators above, and
|
|
1249
|
+
* the difference is what each of them is saying. A spinner that stops is
|
|
1250
|
+
* lying about whether anything is happening; an entrance that does not play
|
|
1251
|
+
* has still delivered its content, which is the only thing it was ever
|
|
1252
|
+
* carrying.
|
|
1253
|
+
*
|
|
1254
|
+
* `animation: none` rather than a zero duration, because the shorthand also
|
|
1255
|
+
* clears `fill-mode` — and the fill is what was holding an untriggered
|
|
1256
|
+
* element on its own first frame at `opacity: 0`. Left in place, respecting a
|
|
1257
|
+
* reader's preference would blank the page.
|
|
1258
|
+
*/
|
|
1259
|
+
.plass-anim,
|
|
1260
|
+
.plass-marquee-track,
|
|
1261
|
+
.plass-headline-item,
|
|
1262
|
+
.plass-caret {
|
|
1263
|
+
animation: none;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/* The arc stops travelling and becomes an even glow. The same trade the
|
|
1267
|
+
skeleton makes: the decoration survives, the motion does not. */
|
|
1268
|
+
.plass-anim-lighting::before {
|
|
1269
|
+
background: var(--p-anim-glow-to);
|
|
1270
|
+
animation: none;
|
|
1271
|
+
}
|
|
498
1272
|
}
|