@sinnstack/ui 0.0.0-stage → 0.3.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 +89 -0
- package/LICENSE +373 -0
- package/README.md +188 -2
- package/docs/blocks.md +373 -0
- package/docs/data.md +128 -0
- package/docs/finishes.md +165 -0
- package/docs/motion.md +166 -0
- package/docs/primitives.md +510 -0
- package/docs/seo.md +191 -0
- package/docs/tokens.md +122 -0
- package/package.json +132 -3
- package/scripts/check-contrast.mjs +180 -0
- package/src/blocks/BlockRenderer.astro +60 -0
- package/src/blocks/CTABanner.astro +121 -0
- package/src/blocks/CTAPair.astro +110 -0
- package/src/blocks/CardGrid.astro +167 -0
- package/src/blocks/ConsentEmbed.astro +125 -0
- package/src/blocks/ConsentManager.astro +147 -0
- package/src/blocks/ConsentScript.astro +47 -0
- package/src/blocks/ContactCard.astro +164 -0
- package/src/blocks/ContactForm.astro +224 -0
- package/src/blocks/ErrorPage.astro +242 -0
- package/src/blocks/FAQ.astro +135 -0
- package/src/blocks/FeatureGrid.astro +148 -0
- package/src/blocks/Hero.astro +171 -0
- package/src/blocks/HeroCarousel.astro +220 -0
- package/src/blocks/HighlightCards.astro +107 -0
- package/src/blocks/LocationHours.astro +311 -0
- package/src/blocks/LogoCloud.astro +135 -0
- package/src/blocks/MaintenancePage.astro +173 -0
- package/src/blocks/MediaText.astro +177 -0
- package/src/blocks/PageHeader.astro +126 -0
- package/src/blocks/ProseSection.astro +98 -0
- package/src/blocks/Reviews.astro +194 -0
- package/src/blocks/RichText.astro +58 -0
- package/src/blocks/StatsBand.astro +117 -0
- package/src/blocks/Steps.astro +141 -0
- package/src/blocks/Testimonials.astro +144 -0
- package/src/blocks/Topbar.astro +158 -0
- package/src/blocks/cms/card-grid.ts +48 -0
- package/src/blocks/cms/consent.ts +16 -0
- package/src/blocks/cms/contact-card.ts +46 -0
- package/src/blocks/cms/contact-form.ts +37 -0
- package/src/blocks/cms/cta-banner.ts +27 -0
- package/src/blocks/cms/cta-pair.ts +30 -0
- package/src/blocks/cms/data-base.ts +5 -0
- package/src/blocks/cms/data.ts +257 -0
- package/src/blocks/cms/faq.ts +38 -0
- package/src/blocks/cms/feature-grid.ts +47 -0
- package/src/blocks/cms/fixtures.ts +591 -0
- package/src/blocks/cms/hero-carousel.ts +36 -0
- package/src/blocks/cms/hero.ts +33 -0
- package/src/blocks/cms/highlight-cards.ts +41 -0
- package/src/blocks/cms/images.ts +37 -0
- package/src/blocks/cms/index.ts +59 -0
- package/src/blocks/cms/location-hours.ts +67 -0
- package/src/blocks/cms/logo-cloud.ts +36 -0
- package/src/blocks/cms/media-text.ts +26 -0
- package/src/blocks/cms/page-header.ts +27 -0
- package/src/blocks/cms/pages.ts +35 -0
- package/src/blocks/cms/prose-section.ts +25 -0
- package/src/blocks/cms/reviews.ts +50 -0
- package/src/blocks/cms/schema-dsl.ts +134 -0
- package/src/blocks/cms/schema.ts +794 -0
- package/src/blocks/cms/shared.ts +63 -0
- package/src/blocks/cms/stats-band.ts +35 -0
- package/src/blocks/cms/steps.ts +40 -0
- package/src/blocks/cms/testimonials.ts +46 -0
- package/src/blocks/cms/topbar.ts +27 -0
- package/src/blocks/cms/types.ts +27 -0
- package/src/blocks/consent.ts +14 -0
- package/src/blocks/icons.ts +47 -0
- package/src/blocks/index.ts +42 -0
- package/src/blocks/internal/Actions.astro +35 -0
- package/src/blocks/internal/BlockHeader.astro +45 -0
- package/src/blocks/internal/BlockShell.astro +58 -0
- package/src/blocks/internal/CarouselScript.astro +7 -0
- package/src/blocks/internal/ConsentEmbedScript.astro +7 -0
- package/src/blocks/internal/ConsentManagerScript.astro +7 -0
- package/src/blocks/internal/HoursScript.astro +7 -0
- package/src/blocks/internal/Placeholder.astro +13 -0
- package/src/blocks/internal/RichTextNode.astro +133 -0
- package/src/blocks/internal/StandaloneDocument.astro +53 -0
- package/src/blocks/internal/consent.ts +96 -0
- package/src/blocks/internal/fields.ts +18 -0
- package/src/blocks/internal/registry-contract.ts +67 -0
- package/src/blocks/internal/reviews.ts +22 -0
- package/src/blocks/internal/slug.ts +12 -0
- package/src/blocks/internal/util.ts +23 -0
- package/src/blocks/lib/contact.ts +92 -0
- package/src/blocks/lib/error-pages.ts +119 -0
- package/src/blocks/lib/faq.ts +37 -0
- package/src/blocks/lib/hours.ts +201 -0
- package/src/blocks/lib/maintenance.ts +129 -0
- package/src/blocks/lib/markdown.ts +350 -0
- package/src/blocks/lib/rich-text.ts +132 -0
- package/src/blocks/registry.ts +79 -0
- package/src/blocks/scripts/carousel.ts +218 -0
- package/src/blocks/scripts/consent-embed.ts +105 -0
- package/src/blocks/scripts/consent-manager.ts +112 -0
- package/src/blocks/scripts/consent-store.ts +86 -0
- package/src/blocks/scripts/error-page.ts +71 -0
- package/src/blocks/scripts/hours.ts +107 -0
- package/src/blocks/scripts/maintenance.ts +109 -0
- package/src/blocks/styles/blocks.css +1320 -0
- package/src/blocks/styles/consent.css +102 -0
- package/src/blocks/styles/faq.css +28 -0
- package/src/blocks/styles/location.css +92 -0
- package/src/blocks/styles/prose-section.css +13 -0
- package/src/blocks/styles/quotes.css +123 -0
- package/src/blocks/styles/rich-text.css +14 -0
- package/src/blocks/types.ts +293 -0
- package/src/data/ChartAxis.astro +19 -0
- package/src/data/ChartContainer.astro +152 -0
- package/src/data/ChartLegend.astro +25 -0
- package/src/data/ChartSeries.astro +14 -0
- package/src/data/ChartTable.astro +17 -0
- package/src/data/ChartTooltip.astro +20 -0
- package/src/data/Sparkline.astro +55 -0
- package/src/data/cms.ts +130 -0
- package/src/data/index.ts +10 -0
- package/src/data/internal/scale.ts +107 -0
- package/src/data/lib/chart.ts +459 -0
- package/src/data/lib/render.ts +219 -0
- package/src/data/lib/sparkline.ts +117 -0
- package/src/data/schema.ts +65 -0
- package/src/data/scripts/chart.ts +324 -0
- package/src/data/styles/chart.css +392 -0
- package/src/finishes/aurora.css +75 -0
- package/src/finishes/autumn.css +87 -0
- package/src/finishes/blueprint.css +69 -0
- package/src/finishes/brutalist.css +55 -0
- package/src/finishes/clay.css +48 -0
- package/src/finishes/day-cycle.css +46 -0
- package/src/finishes/fog.css +71 -0
- package/src/finishes/glass.css +149 -0
- package/src/finishes/holographic.css +91 -0
- package/src/finishes/night.css +77 -0
- package/src/finishes/paper.css +58 -0
- package/src/finishes/polished-glass.css +159 -0
- package/src/finishes/rain.css +84 -0
- package/src/finishes/scripts/day-cycle.ts +30 -0
- package/src/finishes/scripts/holographic.ts +37 -0
- package/src/finishes/scripts/spotlight.ts +30 -0
- package/src/finishes/spotlight.css +41 -0
- package/src/finishes/spring.css +80 -0
- package/src/finishes/terminal.css +49 -0
- package/src/motion/Marquee.astro +90 -0
- package/src/motion/MotionProvider.astro +50 -0
- package/src/motion/PageTransitions.astro +61 -0
- package/src/motion/Parallax.astro +44 -0
- package/src/motion/ParallaxLayer.astro +31 -0
- package/src/motion/RevealOnScroll.astro +59 -0
- package/src/motion/SceneRegistry.astro +38 -0
- package/src/motion/ScrollScene.astro +81 -0
- package/src/motion/index.ts +12 -0
- package/src/motion/integration.ts +48 -0
- package/src/motion/runtime/page-transitions.ts +68 -0
- package/src/motion/runtime/runtime.ts +180 -0
- package/src/motion/runtime/scenes.ts +248 -0
- package/src/motion/runtime/types.ts +103 -0
- package/src/motion/styles/motion.css +332 -0
- package/src/motion/transitions.ts +74 -0
- package/src/motion/virtual.d.ts +4 -0
- package/src/primitives/Accordion.astro +129 -0
- package/src/primitives/Breadcrumbs.astro +50 -0
- package/src/primitives/BulletList.astro +69 -0
- package/src/primitives/Button.astro +73 -0
- package/src/primitives/ButtonGroup.astro +54 -0
- package/src/primitives/Callout.astro +137 -0
- package/src/primitives/Caption.astro +35 -0
- package/src/primitives/Card.astro +72 -0
- package/src/primitives/CardContent.astro +24 -0
- package/src/primitives/CardFooter.astro +36 -0
- package/src/primitives/CardHeader.astro +86 -0
- package/src/primitives/Checkbox.astro +38 -0
- package/src/primitives/ChoiceGroup.astro +23 -0
- package/src/primitives/Cluster.astro +49 -0
- package/src/primitives/Container.astro +44 -0
- package/src/primitives/DescriptionList.astro +83 -0
- package/src/primitives/Dialog.astro +38 -0
- package/src/primitives/Disclosure.astro +67 -0
- package/src/primitives/Divider.astro +93 -0
- package/src/primitives/Drawer.astro +33 -0
- package/src/primitives/Fieldset.astro +80 -0
- package/src/primitives/Flex.astro +64 -0
- package/src/primitives/FocusRing.astro +63 -0
- package/src/primitives/FocusTrap.astro +64 -0
- package/src/primitives/Footer.astro +155 -0
- package/src/primitives/Form.astro +68 -0
- package/src/primitives/FormDescription.astro +26 -0
- package/src/primitives/FormError.astro +106 -0
- package/src/primitives/FormField.astro +72 -0
- package/src/primitives/Grid.astro +64 -0
- package/src/primitives/Heading.astro +45 -0
- package/src/primitives/IconButton.astro +48 -0
- package/src/primitives/Image.astro +125 -0
- package/src/primitives/Input.astro +86 -0
- package/src/primitives/Label.astro +50 -0
- package/src/primitives/Link.astro +81 -0
- package/src/primitives/LinkButton.astro +66 -0
- package/src/primitives/List.astro +39 -0
- package/src/primitives/ListItem.astro +178 -0
- package/src/primitives/MediaObject.astro +66 -0
- package/src/primitives/MetricCard.astro +278 -0
- package/src/primitives/NavLink.astro +81 -0
- package/src/primitives/NavMenu.astro +109 -0
- package/src/primitives/Navbar.astro +197 -0
- package/src/primitives/Panel.astro +153 -0
- package/src/primitives/Picture.astro +167 -0
- package/src/primitives/Popover.astro +95 -0
- package/src/primitives/Prose.astro +45 -0
- package/src/primitives/Radio.astro +21 -0
- package/src/primitives/Rating.astro +135 -0
- package/src/primitives/ReducedMotion.astro +90 -0
- package/src/primitives/SegmentedControl.astro +132 -0
- package/src/primitives/Select.astro +109 -0
- package/src/primitives/Sheet.astro +45 -0
- package/src/primitives/SkipLink.astro +31 -0
- package/src/primitives/Slider.astro +186 -0
- package/src/primitives/Spacer.astro +35 -0
- package/src/primitives/Stack.astro +51 -0
- package/src/primitives/Surface.astro +70 -0
- package/src/primitives/Switch.astro +22 -0
- package/src/primitives/Table.astro +382 -0
- package/src/primitives/Tabs.astro +126 -0
- package/src/primitives/Text.astro +56 -0
- package/src/primitives/Textarea.astro +75 -0
- package/src/primitives/Thumbnail.astro +154 -0
- package/src/primitives/Toggle.astro +99 -0
- package/src/primitives/Tooltip.astro +50 -0
- package/src/primitives/VisuallyHidden.astro +29 -0
- package/src/primitives/index.ts +103 -0
- package/src/primitives/internal/AccordionScript.astro +7 -0
- package/src/primitives/internal/ChoiceField.astro +91 -0
- package/src/primitives/internal/FocusTrapScript.astro +8 -0
- package/src/primitives/internal/FormValidationScript.astro +10 -0
- package/src/primitives/internal/IndeterminateScript.astro +13 -0
- package/src/primitives/internal/ModalPanel.astro +114 -0
- package/src/primitives/internal/OverlayScript.astro +7 -0
- package/src/primitives/internal/ReducedMotionScript.astro +7 -0
- package/src/primitives/internal/SliderScript.astro +7 -0
- package/src/primitives/internal/SparklineScript.astro +7 -0
- package/src/primitives/internal/TableSortScript.astro +7 -0
- package/src/primitives/internal/TabsScript.astro +7 -0
- package/src/primitives/internal/TooltipScript.astro +7 -0
- package/src/primitives/internal/image-plan.ts +82 -0
- package/src/primitives/internal/image.ts +129 -0
- package/src/primitives/internal/slider.ts +170 -0
- package/src/primitives/lib/deprecate.ts +47 -0
- package/src/primitives/lib/focus-trap.ts +197 -0
- package/src/primitives/lib/focus.ts +60 -0
- package/src/primitives/lib/motion.ts +68 -0
- package/src/primitives/scripts/accordion.ts +123 -0
- package/src/primitives/scripts/form-validation.ts +225 -0
- package/src/primitives/scripts/overlay.ts +71 -0
- package/src/primitives/scripts/reduced-motion.ts +59 -0
- package/src/primitives/scripts/slider.ts +150 -0
- package/src/primitives/scripts/sparkline.ts +131 -0
- package/src/primitives/scripts/table-sort.ts +68 -0
- package/src/primitives/scripts/tabs.ts +151 -0
- package/src/primitives/scripts/tooltip.ts +28 -0
- package/src/primitives/styles/a11y.css +104 -0
- package/src/primitives/styles/accordion.css +53 -0
- package/src/primitives/styles/breadcrumbs.css +59 -0
- package/src/primitives/styles/bullet-list.css +89 -0
- package/src/primitives/styles/button.css +237 -0
- package/src/primitives/styles/choice.css +164 -0
- package/src/primitives/styles/cluster.css +24 -0
- package/src/primitives/styles/container.css +19 -0
- package/src/primitives/styles/data.css +849 -0
- package/src/primitives/styles/disclosure.css +140 -0
- package/src/primitives/styles/divider.css +50 -0
- package/src/primitives/styles/flex.css +42 -0
- package/src/primitives/styles/form.css +241 -0
- package/src/primitives/styles/grid.css +36 -0
- package/src/primitives/styles/media.css +247 -0
- package/src/primitives/styles/nav.css +792 -0
- package/src/primitives/styles/overlay.css +362 -0
- package/src/primitives/styles/prose.css +146 -0
- package/src/primitives/styles/scale.css +175 -0
- package/src/primitives/styles/segmented.css +165 -0
- package/src/primitives/styles/slider.css +170 -0
- package/src/primitives/styles/spacer.css +17 -0
- package/src/primitives/styles/stack.css +25 -0
- package/src/primitives/styles/surface.css +403 -0
- package/src/primitives/styles/tabs.css +223 -0
- package/src/primitives/styles/typography.css +144 -0
- package/src/primitives/styles/utilities.css +24 -0
- package/src/primitives/types.ts +385 -0
- package/src/primitives/utils.ts +254 -0
- package/src/seo/JSONLD.astro +35 -0
- package/src/seo/SEOHead.astro +47 -0
- package/src/seo/cms.ts +59 -0
- package/src/seo/index.ts +10 -0
- package/src/seo/integration.ts +268 -0
- package/src/seo/internal/url.ts +68 -0
- package/src/seo/lib/jsonld.ts +342 -0
- package/src/seo/lib/meta.ts +205 -0
- package/src/seo/lib/redirects.ts +293 -0
- package/src/seo/lib/robots.ts +33 -0
- package/src/seo/lib/rss.ts +98 -0
- package/src/seo/lib/sitemap.ts +105 -0
- package/src/seo/schema.ts +43 -0
- package/src/tokens/base.css +71 -0
- package/src/tokens/tokens.css +210 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* Image, Picture, Thumbnail, MediaObject. */
|
|
2
|
+
/* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
|
|
3
|
+
@layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
|
|
4
|
+
|
|
5
|
+
@layer sinn.primitives {
|
|
6
|
+
/* ================= Image / Picture ================= */
|
|
7
|
+
:where(.sinn-image) {
|
|
8
|
+
display: block;
|
|
9
|
+
max-inline-size: 100%;
|
|
10
|
+
block-size: auto;
|
|
11
|
+
object-fit: cover;
|
|
12
|
+
object-position: center;
|
|
13
|
+
}
|
|
14
|
+
:where(.sinn-picture) { display: block; }
|
|
15
|
+
:where(.sinn-picture) > :where(img) { display: block; max-inline-size: 100%; block-size: auto; }
|
|
16
|
+
|
|
17
|
+
:where([data-layout='full']) :where(img),
|
|
18
|
+
:where(img[data-layout='full']) { inline-size: 100%; }
|
|
19
|
+
|
|
20
|
+
/* Visual crop. width/height attributes already carry the same ratio, so space is reserved
|
|
21
|
+
before the file loads. */
|
|
22
|
+
:where(img[data-aspect]) { inline-size: 100%; }
|
|
23
|
+
:where(img[data-aspect='1/1']) { aspect-ratio: 1; }
|
|
24
|
+
:where(img[data-aspect='4/3']) { aspect-ratio: 4 / 3; }
|
|
25
|
+
:where(img[data-aspect='3/2']) { aspect-ratio: 3 / 2; }
|
|
26
|
+
:where(img[data-aspect='16/9']) { aspect-ratio: 16 / 9; }
|
|
27
|
+
:where(img[data-aspect='21/9']) { aspect-ratio: 21 / 9; }
|
|
28
|
+
:where(img[data-aspect='3/4']) { aspect-ratio: 3 / 4; }
|
|
29
|
+
:where(img[data-aspect='2/3']) { aspect-ratio: 2 / 3; }
|
|
30
|
+
:where(img[data-aspect='4/5']) { aspect-ratio: 4 / 5; }
|
|
31
|
+
|
|
32
|
+
:where(img[data-fit='contain']) { object-fit: contain; }
|
|
33
|
+
:where(img[data-position='top']) { object-position: top; }
|
|
34
|
+
:where(img[data-position='bottom']) { object-position: bottom; }
|
|
35
|
+
:where(img[data-position='start']) { object-position: left; }
|
|
36
|
+
:where(img[data-position='end']) { object-position: right; }
|
|
37
|
+
:where(img[data-position='start']:dir(rtl)) { object-position: right; }
|
|
38
|
+
:where(img[data-position='end']:dir(rtl)) { object-position: left; }
|
|
39
|
+
|
|
40
|
+
:where(img[data-radius='s']) { border-radius: var(--sinn-radius-s); }
|
|
41
|
+
:where(img[data-radius='m']) { border-radius: var(--sinn-radius-m); }
|
|
42
|
+
:where(img[data-radius='l']) { border-radius: var(--sinn-radius-l); }
|
|
43
|
+
:where(img[data-radius='full']) { border-radius: 50%; }
|
|
44
|
+
|
|
45
|
+
/* Neutral fill while the file loads (off for transparent images: placeholder={false}). */
|
|
46
|
+
:where(img[data-placeholder]) { background-color: var(--sinn-color-skeleton); }
|
|
47
|
+
|
|
48
|
+
:where(.sinn-figure) {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: var(--sinn-space-2xs);
|
|
52
|
+
margin: 0;
|
|
53
|
+
}
|
|
54
|
+
:where(.sinn-figure__caption) {
|
|
55
|
+
margin: 0;
|
|
56
|
+
color: var(--sinn-color-text-muted);
|
|
57
|
+
font-size: var(--sinn-text-s);
|
|
58
|
+
line-height: var(--sinn-leading-snug);
|
|
59
|
+
}
|
|
60
|
+
:where(.sinn-figure__credit) { color: var(--sinn-color-text-muted); font-size: var(--sinn-text-xs); }
|
|
61
|
+
|
|
62
|
+
/* ================= Thumbnail ================= */
|
|
63
|
+
:where(.sinn-thumb) {
|
|
64
|
+
--sinn-p-thumb: 4rem;
|
|
65
|
+
--sinn-p-thumb-radius: var(--sinn-radius-m);
|
|
66
|
+
position: relative;
|
|
67
|
+
display: inline-grid;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
place-items: center;
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
inline-size: var(--sinn-p-thumb);
|
|
72
|
+
aspect-ratio: 1;
|
|
73
|
+
border-radius: var(--sinn-p-thumb-radius);
|
|
74
|
+
background-color: var(--sinn-color-skeleton);
|
|
75
|
+
color: var(--sinn-color-text-muted);
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
isolation: isolate;
|
|
78
|
+
vertical-align: middle;
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
}
|
|
81
|
+
:where(.sinn-thumb[data-size='xs']) { --sinn-p-thumb: 2.5rem; --sinn-p-thumb-radius: var(--sinn-radius-s); }
|
|
82
|
+
:where(.sinn-thumb[data-size='s']) { --sinn-p-thumb: 3rem; --sinn-p-thumb-radius: var(--sinn-radius-s); }
|
|
83
|
+
:where(.sinn-thumb[data-size='l']) { --sinn-p-thumb: 6rem; }
|
|
84
|
+
:where(.sinn-thumb[data-size='xl']) { --sinn-p-thumb: 8rem; --sinn-p-thumb-radius: var(--sinn-radius-l); }
|
|
85
|
+
:where(.sinn-thumb[data-shape='circle']) { --sinn-p-thumb-radius: 50%; }
|
|
86
|
+
:where(.sinn-thumb[data-shape='square']) { --sinn-p-thumb-radius: 0; }
|
|
87
|
+
/* Landscape shapes keep the size as their height, so mixed thumbnails line up in a strip
|
|
88
|
+
(the generated image is sized the same way). Portrait keeps it as the width. */
|
|
89
|
+
:where(.sinn-thumb:is([data-aspect='4/3'], [data-aspect='16/9'])) { inline-size: auto; block-size: var(--sinn-p-thumb); }
|
|
90
|
+
:where(.sinn-thumb[data-aspect='4/3']) { aspect-ratio: 4 / 3; }
|
|
91
|
+
:where(.sinn-thumb[data-aspect='16/9']) { aspect-ratio: 16 / 9; }
|
|
92
|
+
:where(.sinn-thumb[data-aspect='3/4']) { aspect-ratio: 3 / 4; }
|
|
93
|
+
|
|
94
|
+
:where(.sinn-thumb) > :where(img) {
|
|
95
|
+
grid-area: 1 / 1;
|
|
96
|
+
inline-size: 100%;
|
|
97
|
+
block-size: 100%;
|
|
98
|
+
object-fit: cover;
|
|
99
|
+
transition: transform var(--sinn-duration-base) var(--sinn-ease-standard);
|
|
100
|
+
}
|
|
101
|
+
/* Hairline inner edge so light images don't melt into a light page. */
|
|
102
|
+
:where(.sinn-thumb)::after {
|
|
103
|
+
content: '';
|
|
104
|
+
position: absolute;
|
|
105
|
+
inset: 0;
|
|
106
|
+
z-index: 3;
|
|
107
|
+
border-radius: inherit;
|
|
108
|
+
box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 0.08), oklch(1 0 0 / 0.1));
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Overlays: dark scrims with white text hold ≥ 4.5:1 over any image. */
|
|
113
|
+
:where(.sinn-thumb__badge) {
|
|
114
|
+
position: absolute;
|
|
115
|
+
inset-block-end: 0.25rem;
|
|
116
|
+
inset-inline-end: 0.25rem;
|
|
117
|
+
z-index: 2;
|
|
118
|
+
padding: 0.05rem 0.3rem;
|
|
119
|
+
border-radius: var(--sinn-radius-s);
|
|
120
|
+
background-color: oklch(0 0 0 / 0.75);
|
|
121
|
+
color: oklch(1 0 0);
|
|
122
|
+
font-size: 0.6875rem;
|
|
123
|
+
font-weight: var(--sinn-weight-semibold);
|
|
124
|
+
line-height: 1.35;
|
|
125
|
+
font-variant-numeric: tabular-nums;
|
|
126
|
+
}
|
|
127
|
+
:where(.sinn-thumb__play) {
|
|
128
|
+
position: relative;
|
|
129
|
+
z-index: 2;
|
|
130
|
+
grid-area: 1 / 1;
|
|
131
|
+
display: grid;
|
|
132
|
+
place-items: center;
|
|
133
|
+
inline-size: clamp(1.5rem, 42%, 3rem);
|
|
134
|
+
aspect-ratio: 1;
|
|
135
|
+
border-radius: 50%;
|
|
136
|
+
background-color: oklch(0 0 0 / 0.6);
|
|
137
|
+
color: oklch(1 0 0);
|
|
138
|
+
}
|
|
139
|
+
:where(.sinn-thumb__play) :where(svg) { inline-size: 45%; block-size: 45%; margin-inline-start: 8%; }
|
|
140
|
+
:where(.sinn-thumb__more) {
|
|
141
|
+
position: relative;
|
|
142
|
+
z-index: 2;
|
|
143
|
+
grid-area: 1 / 1;
|
|
144
|
+
display: grid;
|
|
145
|
+
place-items: center;
|
|
146
|
+
inline-size: 100%;
|
|
147
|
+
block-size: 100%;
|
|
148
|
+
background-color: oklch(0 0 0 / 0.55);
|
|
149
|
+
color: oklch(1 0 0);
|
|
150
|
+
font-size: calc(var(--sinn-p-thumb) * 0.28);
|
|
151
|
+
font-weight: var(--sinn-weight-semibold);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* File tile (no preview image). */
|
|
155
|
+
:where(.sinn-thumb[data-kind='file']) {
|
|
156
|
+
background-color: var(--sinn-color-neutral-soft);
|
|
157
|
+
color: var(--sinn-color-text-muted);
|
|
158
|
+
}
|
|
159
|
+
:where(.sinn-thumb__file) {
|
|
160
|
+
grid-area: 1 / 1;
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
align-items: center;
|
|
164
|
+
gap: 0.1rem;
|
|
165
|
+
}
|
|
166
|
+
:where(.sinn-thumb__file) :where(svg) { inline-size: calc(var(--sinn-p-thumb) * 0.4); block-size: auto; }
|
|
167
|
+
:where(.sinn-thumb__ext) {
|
|
168
|
+
font-size: max(0.625rem, calc(var(--sinn-p-thumb) * 0.16));
|
|
169
|
+
font-weight: var(--sinn-weight-bold);
|
|
170
|
+
letter-spacing: 0.04em;
|
|
171
|
+
text-transform: uppercase;
|
|
172
|
+
color: var(--sinn-color-text);
|
|
173
|
+
}
|
|
174
|
+
:where(.sinn-thumb[data-file='pdf']) :where(.sinn-thumb__ext) { color: var(--sinn-color-danger-text); }
|
|
175
|
+
|
|
176
|
+
/* Interactive thumbnails */
|
|
177
|
+
:where(a.sinn-thumb, button.sinn-thumb) { cursor: pointer; border: 0; padding: 0; font: inherit; }
|
|
178
|
+
:where(a.sinn-thumb:focus-visible, button.sinn-thumb:focus-visible) {
|
|
179
|
+
outline: var(--sinn-focus-width) solid var(--sinn-color-focus);
|
|
180
|
+
outline-offset: var(--sinn-focus-offset);
|
|
181
|
+
}
|
|
182
|
+
@media (hover: hover) {
|
|
183
|
+
:where(a.sinn-thumb:hover, button.sinn-thumb:hover) > :where(img) { transform: scale(calc(1 + 0.05 * var(--sinn-motion-scale, 1))); }
|
|
184
|
+
}
|
|
185
|
+
:where(.sinn-thumb[aria-current='true']) {
|
|
186
|
+
outline: var(--sinn-border-width-thick) solid var(--sinn-color-accent);
|
|
187
|
+
outline-offset: 2px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* ================= MediaObject ================= */
|
|
191
|
+
:where(.sinn-media-object) {
|
|
192
|
+
--sinn-p-media-w: 6rem;
|
|
193
|
+
container-type: inline-size;
|
|
194
|
+
}
|
|
195
|
+
:where(.sinn-media-object__inner) {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: flex-start;
|
|
198
|
+
gap: var(--sinn-p-gap, var(--sinn-space-s));
|
|
199
|
+
}
|
|
200
|
+
:where(.sinn-media-object[data-align='center']) > :where(.sinn-media-object__inner) { align-items: center; }
|
|
201
|
+
:where(.sinn-media-object[data-media-position='end']) > :where(.sinn-media-object__inner) { flex-direction: row-reverse; }
|
|
202
|
+
|
|
203
|
+
:where(.sinn-media-object[data-media-width='xs']) { --sinn-p-media-w: 3rem; }
|
|
204
|
+
:where(.sinn-media-object[data-media-width='s']) { --sinn-p-media-w: 4.5rem; }
|
|
205
|
+
:where(.sinn-media-object[data-media-width='l']) { --sinn-p-media-w: 10rem; }
|
|
206
|
+
:where(.sinn-media-object[data-media-width='xl']) { --sinn-p-media-w: 16rem; }
|
|
207
|
+
:where(.sinn-media-object[data-media-width='third']) { --sinn-p-media-w: 33%; }
|
|
208
|
+
:where(.sinn-media-object[data-media-width='half']) { --sinn-p-media-w: 50%; }
|
|
209
|
+
|
|
210
|
+
:where(.sinn-media-object__media) {
|
|
211
|
+
flex: 0 0 var(--sinn-p-media-w);
|
|
212
|
+
min-inline-size: 0;
|
|
213
|
+
}
|
|
214
|
+
:where(.sinn-media-object[data-media-width='auto']) :where(.sinn-media-object__media) { flex-basis: auto; }
|
|
215
|
+
:where(.sinn-media-object__media) > :where(img, picture, svg, video, .sinn-picture, .sinn-figure) {
|
|
216
|
+
display: block;
|
|
217
|
+
inline-size: 100%;
|
|
218
|
+
block-size: auto;
|
|
219
|
+
}
|
|
220
|
+
:where(.sinn-media-object__body) {
|
|
221
|
+
display: flex;
|
|
222
|
+
flex: 1 1 0;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: var(--sinn-space-3xs);
|
|
225
|
+
min-inline-size: 0;
|
|
226
|
+
}
|
|
227
|
+
:where(.sinn-media-object__body) > :where(*) { margin-block: 0; }
|
|
228
|
+
|
|
229
|
+
/* Stack media above the text when the MediaObject itself is narrow. */
|
|
230
|
+
@container (width < 24rem) {
|
|
231
|
+
:where(.sinn-media-object[data-stack-below='s']) > :where(.sinn-media-object__inner) { flex-direction: column; align-items: stretch; }
|
|
232
|
+
:where(.sinn-media-object[data-stack-below='s']) :where(.sinn-media-object__media) { flex-basis: auto; }
|
|
233
|
+
}
|
|
234
|
+
@container (width < 32rem) {
|
|
235
|
+
:where(.sinn-media-object[data-stack-below='m']) > :where(.sinn-media-object__inner) { flex-direction: column; align-items: stretch; }
|
|
236
|
+
:where(.sinn-media-object[data-stack-below='m']) :where(.sinn-media-object__media) { flex-basis: auto; }
|
|
237
|
+
}
|
|
238
|
+
@container (width < 44rem) {
|
|
239
|
+
:where(.sinn-media-object[data-stack-below='l']) > :where(.sinn-media-object__inner) { flex-direction: column; align-items: stretch; }
|
|
240
|
+
:where(.sinn-media-object[data-stack-below='l']) :where(.sinn-media-object__media) { flex-basis: auto; }
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@media (forced-colors: active) {
|
|
244
|
+
:where(.sinn-thumb) { border: 1px solid CanvasText; }
|
|
245
|
+
:where(.sinn-thumb__badge, .sinn-thumb__more, .sinn-thumb__play) { forced-color-adjust: none; }
|
|
246
|
+
}
|
|
247
|
+
}
|