@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,140 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Disclosure and Accordion: native <details>/<summary>.
|
|
3
|
+
* Opening animates with ::details-content + interpolate-size where supported (Chrome 131+);
|
|
4
|
+
* elsewhere it's instant. Durations are 0 under reduced motion (tokens), so no extra rule.
|
|
5
|
+
*/
|
|
6
|
+
/* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
|
|
7
|
+
@layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
|
|
8
|
+
|
|
9
|
+
@layer sinn.primitives {
|
|
10
|
+
:where(.sinn-disclosure) {
|
|
11
|
+
interpolate-size: allow-keywords;
|
|
12
|
+
--sinn-p-pad-x: 0px;
|
|
13
|
+
--sinn-p-pad-y: var(--sinn-space-2xs);
|
|
14
|
+
font-size: var(--sinn-text-m);
|
|
15
|
+
}
|
|
16
|
+
:where(.sinn-disclosure[data-size='s']) { font-size: var(--sinn-text-s); }
|
|
17
|
+
:where(.sinn-disclosure[data-size='l']) { font-size: var(--sinn-text-l); }
|
|
18
|
+
|
|
19
|
+
:where(.sinn-disclosure__summary) {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 0.5em;
|
|
23
|
+
min-block-size: 1.5rem;
|
|
24
|
+
padding-block: var(--sinn-p-pad-y);
|
|
25
|
+
padding-inline: var(--sinn-p-pad-x);
|
|
26
|
+
list-style: none;
|
|
27
|
+
font-weight: var(--sinn-weight-semibold);
|
|
28
|
+
line-height: var(--sinn-leading-snug);
|
|
29
|
+
color: var(--sinn-color-text);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
border-radius: var(--sinn-radius-s);
|
|
32
|
+
-webkit-tap-highlight-color: transparent;
|
|
33
|
+
}
|
|
34
|
+
:where(.sinn-disclosure__summary)::-webkit-details-marker { display: none; }
|
|
35
|
+
:where(.sinn-disclosure__summary):focus-visible {
|
|
36
|
+
outline: var(--sinn-focus-width) solid var(--sinn-color-focus);
|
|
37
|
+
outline-offset: var(--sinn-focus-offset);
|
|
38
|
+
}
|
|
39
|
+
:where(.sinn-disclosure__title) { flex: 1 1 auto; min-inline-size: 0; }
|
|
40
|
+
/* A heading inside the summary (Accordion `headingLevel`) keeps the summary's type. */
|
|
41
|
+
:where(.sinn-disclosure__title) > :where(h1, h2, h3, h4, h5, h6) { margin: 0; font: inherit; color: inherit; }
|
|
42
|
+
|
|
43
|
+
:where(.sinn-disclosure__icon) {
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
inline-size: 1em;
|
|
46
|
+
block-size: 1em;
|
|
47
|
+
color: var(--sinn-color-text-muted);
|
|
48
|
+
transition: rotate var(--sinn-duration-base) var(--sinn-ease-standard);
|
|
49
|
+
}
|
|
50
|
+
/* Chevron at the start points to the text (inline-end) when closed, down when open. */
|
|
51
|
+
:where(.sinn-disclosure[data-icon='start']) :where(.sinn-disclosure__icon) { order: -1; rotate: -90deg; }
|
|
52
|
+
:where(.sinn-disclosure[data-icon='start']:dir(rtl)) :where(.sinn-disclosure__icon) { rotate: 90deg; }
|
|
53
|
+
:where(.sinn-disclosure[data-icon='start'][open]) > :where(.sinn-disclosure__summary) :where(.sinn-disclosure__icon) { rotate: 0deg; }
|
|
54
|
+
/* At the end it points down when closed, up when open. */
|
|
55
|
+
:where(.sinn-disclosure[data-icon='end'][open]) > :where(.sinn-disclosure__summary) :where(.sinn-disclosure__icon) { rotate: 180deg; }
|
|
56
|
+
|
|
57
|
+
:where(.sinn-disclosure__content) {
|
|
58
|
+
padding-block: var(--sinn-space-2xs) var(--sinn-space-s);
|
|
59
|
+
padding-inline: var(--sinn-p-pad-x);
|
|
60
|
+
line-height: var(--sinn-leading-normal);
|
|
61
|
+
}
|
|
62
|
+
:where(.sinn-disclosure__content) > :where(:first-child) { margin-block-start: 0; }
|
|
63
|
+
:where(.sinn-disclosure__content) > :where(:last-child) { margin-block-end: 0; }
|
|
64
|
+
|
|
65
|
+
/* ---------- Opening animation ---------- */
|
|
66
|
+
:where(.sinn-disclosure)::details-content {
|
|
67
|
+
block-size: 0;
|
|
68
|
+
overflow-y: clip;
|
|
69
|
+
transition:
|
|
70
|
+
block-size var(--sinn-duration-base) var(--sinn-ease-standard),
|
|
71
|
+
content-visibility var(--sinn-duration-base) allow-discrete;
|
|
72
|
+
}
|
|
73
|
+
:where(.sinn-disclosure[open])::details-content { block-size: auto; }
|
|
74
|
+
/* Opened by a deep link: no animation, so the target can be scrolled to at once. */
|
|
75
|
+
:where(.sinn-disclosure[data-instant])::details-content { transition: none; }
|
|
76
|
+
|
|
77
|
+
/* ---------- plain: a quiet text toggle, content set off by a rule ---------- */
|
|
78
|
+
:where(.sinn-disclosure[data-variant='plain']) > :where(.sinn-disclosure__summary) {
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
color: var(--sinn-color-accent-text);
|
|
81
|
+
font-weight: var(--sinn-weight-medium);
|
|
82
|
+
}
|
|
83
|
+
:where(.sinn-disclosure[data-variant='plain']) > :where(.sinn-disclosure__summary) :where(.sinn-disclosure__title) {
|
|
84
|
+
text-decoration: underline;
|
|
85
|
+
text-decoration-thickness: 1px;
|
|
86
|
+
text-underline-offset: 0.2em;
|
|
87
|
+
}
|
|
88
|
+
:where(.sinn-disclosure[data-variant='plain']) :where(.sinn-disclosure__icon) { color: currentColor; }
|
|
89
|
+
@media (hover: hover) {
|
|
90
|
+
:where(.sinn-disclosure[data-variant='plain']) > :where(.sinn-disclosure__summary:hover) :where(.sinn-disclosure__title) { text-decoration-thickness: 2px; }
|
|
91
|
+
}
|
|
92
|
+
:where(.sinn-disclosure[data-variant='plain']) > :where(.sinn-disclosure__content) {
|
|
93
|
+
margin-block-start: var(--sinn-space-2xs);
|
|
94
|
+
margin-inline-start: calc(0.5em - 2px);
|
|
95
|
+
padding-block: var(--sinn-space-2xs);
|
|
96
|
+
padding-inline-start: calc(1em + 0.5em - 2px);
|
|
97
|
+
border-inline-start: 4px solid var(--sinn-color-border-subtle);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ---------- divided: rules above and below (the accordion look) ---------- */
|
|
101
|
+
:where(.sinn-disclosure[data-variant='divided']) {
|
|
102
|
+
--sinn-p-pad-y: var(--sinn-space-s);
|
|
103
|
+
border-block: var(--sinn-border-width-thin) solid var(--sinn-color-border-subtle);
|
|
104
|
+
}
|
|
105
|
+
:where(.sinn-disclosure[data-variant='divided'] + .sinn-disclosure[data-variant='divided']) { border-block-start: 0; }
|
|
106
|
+
|
|
107
|
+
/* ---------- card: a boxed panel ---------- */
|
|
108
|
+
:where(.sinn-disclosure[data-variant='card']) {
|
|
109
|
+
--sinn-p-pad-x: var(--sinn-space-m);
|
|
110
|
+
--sinn-p-pad-y: var(--sinn-space-s);
|
|
111
|
+
border: var(--sinn-border-width-thin) solid var(--sinn-color-border-subtle);
|
|
112
|
+
border-radius: var(--sinn-radius-l);
|
|
113
|
+
background-color: var(--sinn-color-surface-raised);
|
|
114
|
+
}
|
|
115
|
+
:where(.sinn-disclosure[data-variant='card']) > :where(.sinn-disclosure__summary) { border-radius: calc(var(--sinn-radius-l) - 1px); }
|
|
116
|
+
:where(.sinn-disclosure[data-variant='card']) > :where(.sinn-disclosure__summary):focus-visible { outline-offset: -2px; }
|
|
117
|
+
:where(.sinn-disclosure[data-variant='card']) > :where(.sinn-disclosure__content) { padding-block-start: 0; padding-block-end: var(--sinn-space-m); }
|
|
118
|
+
|
|
119
|
+
@media (hover: hover) {
|
|
120
|
+
:where(.sinn-disclosure:is([data-variant='divided'], [data-variant='card'])) > :where(.sinn-disclosure__summary:hover) :where(.sinn-disclosure__icon) {
|
|
121
|
+
color: var(--sinn-color-text);
|
|
122
|
+
}
|
|
123
|
+
:where(.sinn-disclosure:is([data-variant='divided'], [data-variant='card'])) > :where(.sinn-disclosure__summary:hover) :where(.sinn-disclosure__title) {
|
|
124
|
+
text-decoration: underline;
|
|
125
|
+
text-decoration-thickness: 1px;
|
|
126
|
+
text-underline-offset: 0.2em;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Print the content of closed panels too, where the browser lets CSS reach it. */
|
|
131
|
+
@media print {
|
|
132
|
+
:where(.sinn-disclosure)::details-content { content-visibility: visible; block-size: auto; }
|
|
133
|
+
:where(.sinn-disclosure__icon) { display: none; }
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (forced-colors: active) {
|
|
137
|
+
:where(.sinn-disclosure__icon) { color: CanvasText; }
|
|
138
|
+
:where(.sinn-disclosure[data-variant='plain']) > :where(.sinn-disclosure__summary) { color: LinkText; }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
|
|
2
|
+
@layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
|
|
3
|
+
|
|
4
|
+
@layer sinn.primitives {
|
|
5
|
+
:where(.sinn-divider) {
|
|
6
|
+
--sinn-p-color: var(--sinn-color-border);
|
|
7
|
+
--sinn-p-width: var(--sinn-border-width-thin);
|
|
8
|
+
--sinn-p-style: solid;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
border: 0;
|
|
11
|
+
margin-inline: 0;
|
|
12
|
+
margin-block: var(--sinn-p-space);
|
|
13
|
+
border-block-start: var(--sinn-p-width) var(--sinn-p-style) var(--sinn-p-color);
|
|
14
|
+
color: var(--sinn-color-text-muted);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.sinn-divider[data-emphasis='subtle']) { --sinn-p-color: var(--sinn-color-border-subtle); }
|
|
18
|
+
:where(.sinn-divider[data-emphasis='strong']) { --sinn-p-color: var(--sinn-color-border-strong); }
|
|
19
|
+
:where(.sinn-divider[data-thickness='thick']) { --sinn-p-width: var(--sinn-border-width-thick); }
|
|
20
|
+
:where(.sinn-divider[data-variant='dashed']) { --sinn-p-style: dashed; }
|
|
21
|
+
:where(.sinn-divider[data-variant='dotted']) { --sinn-p-style: dotted; }
|
|
22
|
+
|
|
23
|
+
/* Vertical: stretches to the height of a flex/grid row. */
|
|
24
|
+
:where(.sinn-divider[data-orientation='vertical']) {
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
inline-size: 0;
|
|
27
|
+
min-block-size: 1lh;
|
|
28
|
+
margin-block: 0;
|
|
29
|
+
margin-inline: var(--sinn-p-space);
|
|
30
|
+
border-block-start: 0;
|
|
31
|
+
border-inline-start: var(--sinn-p-width) var(--sinn-p-style) var(--sinn-p-color);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Labelled: "—— or ——". The lines are pseudo-elements, the text is the accessible name. */
|
|
35
|
+
:where(.sinn-divider[data-label]) {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: var(--sinn-space-xs);
|
|
39
|
+
border-block-start: 0;
|
|
40
|
+
font-size: 0.875em;
|
|
41
|
+
}
|
|
42
|
+
:where(.sinn-divider[data-label])::before,
|
|
43
|
+
:where(.sinn-divider[data-label])::after {
|
|
44
|
+
content: '';
|
|
45
|
+
flex: 1;
|
|
46
|
+
border-block-start: var(--sinn-p-width) var(--sinn-p-style) var(--sinn-p-color);
|
|
47
|
+
}
|
|
48
|
+
:where(.sinn-divider[data-label][data-label-align='start'])::before { flex: 0 0 var(--sinn-space-s); }
|
|
49
|
+
:where(.sinn-divider[data-label][data-label-align='end'])::after { flex: 0 0 var(--sinn-space-s); }
|
|
50
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
|
|
2
|
+
@layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
|
|
3
|
+
|
|
4
|
+
@layer sinn.primitives {
|
|
5
|
+
:where(.sinn-flex) {
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: var(--sinn-p-row-gap) var(--sinn-p-gap);
|
|
8
|
+
}
|
|
9
|
+
:where(.sinn-flex[data-inline]) { display: inline-flex; }
|
|
10
|
+
|
|
11
|
+
:where(.sinn-flex[data-direction='column']) { flex-direction: column; }
|
|
12
|
+
:where(.sinn-flex[data-direction='row-reverse']) { flex-direction: row-reverse; }
|
|
13
|
+
:where(.sinn-flex[data-direction='column-reverse']) { flex-direction: column-reverse; }
|
|
14
|
+
:where(.sinn-flex[data-wrap]) { flex-wrap: wrap; }
|
|
15
|
+
|
|
16
|
+
:where(.sinn-flex[data-justify='start']) { justify-content: flex-start; }
|
|
17
|
+
:where(.sinn-flex[data-justify='center']) { justify-content: center; }
|
|
18
|
+
:where(.sinn-flex[data-justify='end']) { justify-content: flex-end; }
|
|
19
|
+
:where(.sinn-flex[data-justify='between']) { justify-content: space-between; }
|
|
20
|
+
:where(.sinn-flex[data-justify='around']) { justify-content: space-around; }
|
|
21
|
+
:where(.sinn-flex[data-justify='evenly']) { justify-content: space-evenly; }
|
|
22
|
+
|
|
23
|
+
:where(.sinn-flex[data-align='start']) { align-items: flex-start; }
|
|
24
|
+
:where(.sinn-flex[data-align='center']) { align-items: center; }
|
|
25
|
+
:where(.sinn-flex[data-align='end']) { align-items: flex-end; }
|
|
26
|
+
:where(.sinn-flex[data-align='stretch']) { align-items: stretch; }
|
|
27
|
+
:where(.sinn-flex[data-align='baseline']) { align-items: baseline; }
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Switch mode: children sit in a row while the Flex is wider than the
|
|
31
|
+
* measure, and stack once it is narrower. Responds to its own width,
|
|
32
|
+
* not the viewport, so it works in any slot without media or container queries.
|
|
33
|
+
*/
|
|
34
|
+
:where(.sinn-flex[data-switch]) { flex-wrap: wrap; }
|
|
35
|
+
:where(.sinn-flex[data-switch]) > :where(*) {
|
|
36
|
+
flex-grow: 1;
|
|
37
|
+
flex-basis: calc((var(--sinn-p-switch) - 100%) * 999);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Opt-in per child: <div data-flex-grow> takes the remaining space. */
|
|
41
|
+
:where(.sinn-flex) > :where([data-flex-grow]) { flex-grow: 1; min-inline-size: 0; }
|
|
42
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/* Form, FormField, Input, Textarea, Select, Fieldset, FormDescription, FormError. */
|
|
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
|
+
/* ---------- Form & field layout ---------- */
|
|
7
|
+
:where(.sinn-form) {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--sinn-p-gap);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where(.sinn-field) {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--sinn-space-3xs);
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
}
|
|
19
|
+
:where(.sinn-field) > :where(.sinn-label) { align-self: flex-start; }
|
|
20
|
+
|
|
21
|
+
/* ---------- Shared control look: Input, Textarea, Select ---------- */
|
|
22
|
+
:where(.sinn-control) {
|
|
23
|
+
--sinn-p-h: var(--sinn-control-m);
|
|
24
|
+
--sinn-p-px: var(--sinn-space-xs);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
inline-size: 100%;
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
min-block-size: var(--sinn-p-h);
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding-block: 0.25rem;
|
|
31
|
+
padding-inline: var(--sinn-p-px);
|
|
32
|
+
border: var(--sinn-border-width-thin) solid var(--sinn-color-border-strong);
|
|
33
|
+
border-radius: var(--sinn-radius-control);
|
|
34
|
+
background-color: var(--sinn-color-surface);
|
|
35
|
+
color: var(--sinn-color-text);
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
/* ≥ 16px: iOS Safari zooms into smaller inputs on focus. */
|
|
38
|
+
font-size: max(1rem, var(--sinn-text-m));
|
|
39
|
+
line-height: 1.4;
|
|
40
|
+
transition: border-color var(--sinn-duration-fast) var(--sinn-ease-standard);
|
|
41
|
+
}
|
|
42
|
+
:where(.sinn-control[data-size='s']) { --sinn-p-h: var(--sinn-control-s); --sinn-p-px: var(--sinn-space-2xs); }
|
|
43
|
+
:where(.sinn-control[data-size='l']) { --sinn-p-h: var(--sinn-control-l); --sinn-p-px: var(--sinn-space-s); }
|
|
44
|
+
|
|
45
|
+
:where(.sinn-control::placeholder) { color: var(--sinn-color-text-muted); opacity: 1; }
|
|
46
|
+
|
|
47
|
+
@media (hover: hover) {
|
|
48
|
+
:where(.sinn-control:hover:not(:disabled, :focus)) {
|
|
49
|
+
border-color: color-mix(in oklch, var(--sinn-color-border-strong), var(--sinn-color-text) 40%);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
:where(.sinn-control:focus-visible) {
|
|
53
|
+
outline: var(--sinn-focus-width) solid var(--sinn-color-focus);
|
|
54
|
+
outline-offset: var(--sinn-focus-offset);
|
|
55
|
+
}
|
|
56
|
+
:where(.sinn-control[aria-invalid='true']) { border-color: var(--sinn-color-danger); }
|
|
57
|
+
:where(.sinn-control:disabled) { opacity: 0.55; cursor: not-allowed; }
|
|
58
|
+
:where(.sinn-control:read-only:not(select)) { background-color: var(--sinn-color-neutral-soft); }
|
|
59
|
+
|
|
60
|
+
/* ---------- Input with start/end addons ---------- */
|
|
61
|
+
:where(.sinn-control-group) {
|
|
62
|
+
--sinn-p-h: var(--sinn-control-m);
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
min-block-size: var(--sinn-p-h);
|
|
67
|
+
border: var(--sinn-border-width-thin) solid var(--sinn-color-border-strong);
|
|
68
|
+
border-radius: var(--sinn-radius-control);
|
|
69
|
+
background-color: var(--sinn-color-surface);
|
|
70
|
+
transition: border-color var(--sinn-duration-fast) var(--sinn-ease-standard);
|
|
71
|
+
}
|
|
72
|
+
:where(.sinn-control-group[data-size='s']) { --sinn-p-h: var(--sinn-control-s); }
|
|
73
|
+
:where(.sinn-control-group[data-size='l']) { --sinn-p-h: var(--sinn-control-l); }
|
|
74
|
+
:where(.sinn-control-group) > :where(.sinn-control) {
|
|
75
|
+
flex: 1;
|
|
76
|
+
min-block-size: calc(var(--sinn-p-h) - 2 * var(--sinn-border-width-thin));
|
|
77
|
+
border: 0;
|
|
78
|
+
background: transparent;
|
|
79
|
+
outline: none;
|
|
80
|
+
}
|
|
81
|
+
:where(.sinn-control-group:focus-within) {
|
|
82
|
+
outline: var(--sinn-focus-width) solid var(--sinn-color-focus);
|
|
83
|
+
outline-offset: var(--sinn-focus-offset);
|
|
84
|
+
}
|
|
85
|
+
:where(.sinn-control-group:has([aria-invalid='true'])) { border-color: var(--sinn-color-danger); }
|
|
86
|
+
:where(.sinn-control-group:has(:disabled)) { opacity: 0.55; }
|
|
87
|
+
:where(.sinn-control-group__addon) {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
gap: var(--sinn-space-3xs);
|
|
92
|
+
padding-inline: var(--sinn-space-xs);
|
|
93
|
+
color: var(--sinn-color-text-muted);
|
|
94
|
+
font-size: var(--sinn-text-s);
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
}
|
|
97
|
+
:where(.sinn-control-group__addon:first-child) { padding-inline-end: 0; }
|
|
98
|
+
:where(.sinn-control-group__addon:last-child) { padding-inline-start: 0; }
|
|
99
|
+
:where(.sinn-control-group__addon svg) { inline-size: 1.25em; block-size: 1.25em; }
|
|
100
|
+
|
|
101
|
+
/* ---------- Textarea ---------- */
|
|
102
|
+
:where(textarea.sinn-control) {
|
|
103
|
+
min-block-size: calc(3lh + 1rem);
|
|
104
|
+
padding-block: 0.5rem;
|
|
105
|
+
resize: vertical;
|
|
106
|
+
}
|
|
107
|
+
:where(textarea.sinn-control[data-resize='none']) { resize: none; }
|
|
108
|
+
:where(textarea.sinn-control[data-resize='both']) { resize: both; }
|
|
109
|
+
/* Grows with its content where supported (Chromium 123+); elsewhere `rows` applies. */
|
|
110
|
+
:where(textarea.sinn-control[data-autosize]) {
|
|
111
|
+
field-sizing: content;
|
|
112
|
+
max-block-size: 20lh;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ---------- Select ---------- */
|
|
116
|
+
:where(.sinn-select) {
|
|
117
|
+
position: relative;
|
|
118
|
+
display: block;
|
|
119
|
+
min-inline-size: 0;
|
|
120
|
+
}
|
|
121
|
+
:where(.sinn-select) > :where(select.sinn-control) {
|
|
122
|
+
appearance: none;
|
|
123
|
+
padding-inline-end: calc(var(--sinn-p-px) + 1.5rem);
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
}
|
|
126
|
+
/* Chevron drawn with borders: no data-URI image, so no img-src exception in the CSP. */
|
|
127
|
+
:where(.sinn-select:not([data-multiple]))::after {
|
|
128
|
+
content: '';
|
|
129
|
+
position: absolute;
|
|
130
|
+
inset-block-start: 50%;
|
|
131
|
+
inset-inline-end: var(--sinn-space-xs);
|
|
132
|
+
inline-size: 0.45rem;
|
|
133
|
+
block-size: 0.45rem;
|
|
134
|
+
border-inline-end: 2px solid var(--sinn-color-text-muted);
|
|
135
|
+
border-block-end: 2px solid var(--sinn-color-text-muted);
|
|
136
|
+
transform: translateY(-70%) rotate(45deg);
|
|
137
|
+
pointer-events: none;
|
|
138
|
+
}
|
|
139
|
+
:where(.sinn-select[data-multiple]) > :where(select.sinn-control) {
|
|
140
|
+
padding-block: var(--sinn-space-3xs);
|
|
141
|
+
padding-inline-end: var(--sinn-p-px);
|
|
142
|
+
}
|
|
143
|
+
:where(.sinn-select:has(:disabled))::after { opacity: 0.55; }
|
|
144
|
+
|
|
145
|
+
/* ---------- Fieldset ---------- */
|
|
146
|
+
:where(.sinn-fieldset) {
|
|
147
|
+
min-inline-size: 0;
|
|
148
|
+
margin: 0;
|
|
149
|
+
padding: 0;
|
|
150
|
+
border: 0;
|
|
151
|
+
}
|
|
152
|
+
:where(.sinn-fieldset__legend) { padding: 0; }
|
|
153
|
+
:where(.sinn-fieldset__legend[data-size='l']) { font-weight: var(--sinn-weight-semibold); }
|
|
154
|
+
:where(.sinn-fieldset__description) { margin-block-start: var(--sinn-space-3xs); }
|
|
155
|
+
:where(.sinn-fieldset__items) {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
gap: var(--sinn-p-gap);
|
|
159
|
+
margin-block-start: var(--sinn-space-2xs);
|
|
160
|
+
}
|
|
161
|
+
:where(.sinn-fieldset[data-orientation='horizontal']) > :where(.sinn-fieldset__items) {
|
|
162
|
+
flex-direction: row;
|
|
163
|
+
flex-wrap: wrap;
|
|
164
|
+
column-gap: var(--sinn-space-m);
|
|
165
|
+
}
|
|
166
|
+
/* Context spacing carries one class of specificity so it beats the base `margin: 0` resets below
|
|
167
|
+
(and in other files) whatever order the bundler emits them in. */
|
|
168
|
+
:where(.sinn-fieldset) > .sinn-form-error { margin-block-start: var(--sinn-space-2xs); }
|
|
169
|
+
|
|
170
|
+
/* ---------- FormDescription ---------- */
|
|
171
|
+
:where(.sinn-form-description) { margin: 0; }
|
|
172
|
+
|
|
173
|
+
/* ---------- FormError: field ---------- */
|
|
174
|
+
:where(.sinn-form-error) {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: flex-start;
|
|
177
|
+
gap: 0.35em;
|
|
178
|
+
margin: 0;
|
|
179
|
+
color: var(--sinn-color-danger-text);
|
|
180
|
+
font-size: var(--sinn-text-s);
|
|
181
|
+
font-weight: var(--sinn-weight-medium);
|
|
182
|
+
line-height: var(--sinn-leading-snug);
|
|
183
|
+
}
|
|
184
|
+
:where(.sinn-form-error__icon) {
|
|
185
|
+
flex-shrink: 0;
|
|
186
|
+
inline-size: 1.1em;
|
|
187
|
+
block-size: 1.1em;
|
|
188
|
+
margin-block-start: 0.1em;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* ---------- FormError: form-level summary ---------- */
|
|
192
|
+
:where(.sinn-form-error[data-variant='form']) {
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: var(--sinn-space-2xs);
|
|
195
|
+
padding: var(--sinn-space-s);
|
|
196
|
+
border: var(--sinn-border-width-thick) solid var(--sinn-color-danger);
|
|
197
|
+
border-radius: var(--sinn-radius-m);
|
|
198
|
+
background-color: var(--sinn-color-danger-soft);
|
|
199
|
+
color: var(--sinn-color-text);
|
|
200
|
+
font-size: var(--sinn-text-m);
|
|
201
|
+
font-weight: var(--sinn-weight-regular);
|
|
202
|
+
}
|
|
203
|
+
:where(.sinn-form-error[data-variant='form']:focus-visible) {
|
|
204
|
+
outline: var(--sinn-focus-width) solid var(--sinn-color-focus);
|
|
205
|
+
outline-offset: var(--sinn-focus-offset);
|
|
206
|
+
}
|
|
207
|
+
:where(.sinn-form-error__title) {
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
gap: 0.4em;
|
|
211
|
+
margin: 0;
|
|
212
|
+
color: var(--sinn-color-danger-text);
|
|
213
|
+
font-weight: var(--sinn-weight-semibold);
|
|
214
|
+
}
|
|
215
|
+
:where(.sinn-form-error__body) { margin: 0; }
|
|
216
|
+
:where(.sinn-form-error__list) {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
gap: var(--sinn-space-3xs);
|
|
220
|
+
margin: 0;
|
|
221
|
+
padding-inline-start: 1.25em;
|
|
222
|
+
}
|
|
223
|
+
:where(.sinn-form-error__list a) {
|
|
224
|
+
color: var(--sinn-color-danger-text);
|
|
225
|
+
font-weight: var(--sinn-weight-medium);
|
|
226
|
+
text-decoration-line: underline;
|
|
227
|
+
text-underline-offset: 0.18em;
|
|
228
|
+
}
|
|
229
|
+
:where(.sinn-form-error__list a:focus-visible) {
|
|
230
|
+
outline: var(--sinn-focus-width) solid var(--sinn-color-focus);
|
|
231
|
+
outline-offset: var(--sinn-focus-offset);
|
|
232
|
+
border-radius: var(--sinn-radius-s);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* ---------- Forced colors ---------- */
|
|
236
|
+
@media (forced-colors: active) {
|
|
237
|
+
:where(.sinn-select) > :where(select.sinn-control) { appearance: auto; padding-inline-end: var(--sinn-p-px); }
|
|
238
|
+
:where(.sinn-select)::after { display: none; }
|
|
239
|
+
:where(.sinn-control-group:focus-within) { outline-color: Highlight; }
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
|
|
2
|
+
@layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
|
|
3
|
+
|
|
4
|
+
@layer sinn.primitives {
|
|
5
|
+
:where(.sinn-grid) {
|
|
6
|
+
display: grid;
|
|
7
|
+
gap: var(--sinn-p-row-gap) var(--sinn-p-gap);
|
|
8
|
+
/* min(…, 100%) stops a wide min from forcing horizontal scroll at 320px / 200% zoom. */
|
|
9
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--sinn-p-min), 100%), 1fr));
|
|
10
|
+
}
|
|
11
|
+
:where(.sinn-grid[data-fit]) {
|
|
12
|
+
grid-template-columns: repeat(auto-fit, minmax(min(var(--sinn-p-min), 100%), 1fr));
|
|
13
|
+
}
|
|
14
|
+
:where(.sinn-grid:is(ul, ol)) { list-style: none; padding-inline-start: 0; margin-block: 0; }
|
|
15
|
+
|
|
16
|
+
/* Cap the column count: items never get narrower than --min, and never more than N per row. */
|
|
17
|
+
:where(.sinn-grid[data-cols]) {
|
|
18
|
+
grid-template-columns: repeat(
|
|
19
|
+
auto-fill,
|
|
20
|
+
minmax(
|
|
21
|
+
min(100%, max(var(--sinn-p-min), (100% - (var(--sinn-p-cols) - 1) * var(--sinn-p-gap)) / var(--sinn-p-cols))),
|
|
22
|
+
1fr
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
:where(.sinn-grid[data-cols='1']) { --sinn-p-cols: 1; }
|
|
27
|
+
:where(.sinn-grid[data-cols='2']) { --sinn-p-cols: 2; }
|
|
28
|
+
:where(.sinn-grid[data-cols='3']) { --sinn-p-cols: 3; }
|
|
29
|
+
:where(.sinn-grid[data-cols='4']) { --sinn-p-cols: 4; }
|
|
30
|
+
:where(.sinn-grid[data-cols='5']) { --sinn-p-cols: 5; }
|
|
31
|
+
:where(.sinn-grid[data-cols='6']) { --sinn-p-cols: 6; }
|
|
32
|
+
|
|
33
|
+
:where(.sinn-grid[data-align='start']) { align-items: start; }
|
|
34
|
+
:where(.sinn-grid[data-align='center']) { align-items: center; }
|
|
35
|
+
:where(.sinn-grid[data-align='end']) { align-items: end; }
|
|
36
|
+
}
|