actual-css 0.3.1 → 0.4.1
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 +109 -3
- package/README.md +35 -30
- package/dist/actual.css +66 -4958
- package/dist/actual.full.css +7548 -0
- package/dist/actual.full.js +1 -0
- package/dist/actual.full.min.css +1 -0
- package/dist/actual.js +1 -1
- package/dist/actual.min.css +1 -1
- package/docs/design-notes/app-ui.md +33 -0
- package/docs/design-notes/cascade-layer.md +34 -13
- package/docs/design-notes/column-layout.md +677 -0
- package/docs/design-notes/enhancement-contract.md +25 -0
- package/docs/design-notes/forced-colors.md +3 -0
- package/docs/design-notes/grid.md +785 -0
- package/docs/design-notes/naming.md +15 -0
- package/docs/design-notes/references.md +1 -1
- package/docs/design-notes/widget-primitives.md +1 -0
- package/docs/navigation.json +12 -2
- package/docs/pages/components/alert.md +21 -14
- package/docs/pages/components/app-navigation.md +34 -0
- package/docs/pages/components/aura.md +1 -1
- package/docs/pages/components/avatar.md +16 -6
- package/docs/pages/components/badge.md +9 -7
- package/docs/pages/components/button.md +46 -16
- package/docs/pages/components/card.md +17 -9
- package/docs/pages/components/chat.md +8 -8
- package/docs/pages/components/dialog.md +7 -7
- package/docs/pages/components/drawer.md +3 -3
- package/docs/pages/components/fab.md +9 -7
- package/docs/pages/components/indicator.md +52 -0
- package/docs/pages/components/list.md +62 -0
- package/docs/pages/components/navbar.md +15 -8
- package/docs/pages/components/pagination.md +4 -3
- package/docs/pages/components/rating.md +68 -0
- package/docs/pages/components/skeleton.md +4 -4
- package/docs/pages/components/spinner.md +5 -5
- package/docs/pages/components/steps.md +57 -0
- package/docs/pages/components/table.md +30 -5
- package/docs/pages/enhancements/flyout.md +15 -15
- package/docs/pages/enhancements/overview.md +1 -1
- package/docs/pages/enhancements/scrollspy.md +6 -6
- package/docs/pages/enhancements/status-bar.md +5 -1
- package/docs/pages/enhancements/tabs.md +7 -8
- package/docs/pages/enhancements/tooltip.md +1 -1
- package/docs/pages/examples/overview.md +47 -22
- package/docs/pages/forms/choice-cards.md +11 -6
- package/docs/pages/forms/controls.md +1 -1
- package/docs/pages/forms/detached-actions.md +1 -1
- package/docs/pages/forms/floating-field.md +10 -5
- package/docs/pages/forms/form-actions.md +1 -1
- package/docs/pages/forms/input-policy.md +1 -1
- package/docs/pages/forms/joined-controls.md +4 -4
- package/docs/pages/forms/labels.md +6 -6
- package/docs/pages/forms/otp.md +33 -1
- package/docs/pages/forms/overview.md +19 -19
- package/docs/pages/forms/password.md +1 -1
- package/docs/pages/forms/range.md +1 -1
- package/docs/pages/forms/states-and-sizes.md +44 -48
- package/docs/pages/forms/sticky-actions.md +3 -3
- package/docs/pages/forms/switch.md +110 -2
- package/docs/pages/forms/validation.md +9 -9
- package/docs/pages/foundations/philosophy.md +1 -1
- package/docs/pages/foundations/theming.md +17 -2
- package/docs/pages/foundations/tokens.md +22 -10
- package/docs/pages/foundations/typography.md +50 -20
- package/docs/pages/guides/bootstrap.md +11 -11
- package/docs/pages/guides/integrating-actual-css.md +192 -0
- package/docs/pages/guides/introduction.md +23 -26
- package/docs/pages/guides/modular-import.md +173 -0
- package/docs/pages/guides/progressive-enhancement.md +81 -78
- package/docs/pages/guides/tailwind.md +6 -8
- package/docs/pages/layout/app-layout.md +57 -0
- package/docs/pages/layout/app-shell.md +28 -7
- package/docs/pages/layout/center.md +12 -1
- package/docs/pages/layout/choosing.md +54 -0
- package/docs/pages/layout/column-layout.md +206 -0
- package/docs/pages/layout/frame.md +6 -1
- package/docs/pages/layout/grid.md +133 -102
- package/docs/pages/layout/media.md +1 -1
- package/docs/pages/layout/overview.md +15 -2
- package/docs/pages/layout/scroll-snap.md +2 -2
- package/docs/pages/layout/scroll-target.md +45 -0
- package/docs/pages/layout/sidebar-layout.md +38 -18
- package/docs/pages/layout/stack.md +70 -1
- package/docs/pages/layout/switcher.md +10 -26
- package/docs/pages/layout/topbar.md +2 -2
- package/docs/pages/patterns/actions.md +1 -1
- package/docs/pages/patterns/code-block.md +1 -1
- package/docs/pages/patterns/exclusive-accordion.md +1 -1
- package/docs/pages/patterns/hierarchical-nav.md +1 -1
- package/docs/pages/patterns/icon-input.md +1 -1
- package/docs/pages/patterns/icon-slot.md +61 -0
- package/docs/pages/patterns/intent-nesting.md +1 -1
- package/docs/pages/patterns/navigation-list.md +1 -1
- package/docs/pages/patterns/overview.md +1 -1
- package/docs/pages/patterns/structured-lists.md +38 -40
- package/docs/pages/utilities/accessibility.md +3 -3
- package/docs/pages/utilities/flex.md +15 -15
- package/docs/pages/utilities/links.md +4 -4
- package/docs/pages/utilities/list.md +8 -8
- package/docs/pages/utilities/overflow.md +8 -8
- package/docs/pages/utilities/overview.md +1 -1
- package/docs/pages/utilities/shape.md +3 -3
- package/docs/pages/utilities/sizing-wrapping.md +23 -16
- package/docs/pages/utilities/spacing.md +20 -20
- package/docs/pages/utilities/text.md +10 -10
- package/llms.txt +46 -4
- package/package.json +43 -13
- package/scripts/reserved-classes.json +278 -0
- package/src/cli/actual-css.js +133 -0
- package/src/css/actual.css +1 -31
- package/src/css/actual.full.css +11 -2
- package/src/css/components/alert.css +17 -4
- package/src/css/components/app-nav.css +76 -0
- package/src/css/components/avatar.css +4 -0
- package/src/css/components/badge.css +19 -19
- package/src/css/components/breadcrumb.css +1 -1
- package/src/css/components/button.css +20 -32
- package/src/css/components/card.css +34 -9
- package/src/css/{optional → components}/chat.css +0 -6
- package/src/css/components/drawer.css +24 -5
- package/src/css/{optional → components}/fab.css +1 -7
- package/src/css/components/flyout.css +5 -0
- package/src/css/components/index.css +37 -27
- package/src/css/components/indicator.css +47 -0
- package/src/css/components/join.css +8 -1
- package/src/css/components/key.css +2 -0
- package/src/css/components/list.css +83 -0
- package/src/css/components/menu.css +11 -8
- package/src/css/components/meter.css +4 -1
- package/src/css/components/modal.css +5 -17
- package/src/css/components/navbar.css +6 -15
- package/src/css/components/pagination.css +11 -0
- package/src/css/components/rating.css +101 -0
- package/src/css/components/spinner.css +5 -0
- package/src/css/components/status-bar.css +5 -0
- package/src/css/components/steps.css +122 -0
- package/src/css/components/surface.css +5 -0
- package/src/css/components/tab.css +20 -22
- package/src/css/components/table.css +6 -0
- package/src/css/components/tooltip.css +3 -7
- package/src/css/{focus.css → core/focus.css} +0 -8
- package/src/css/core/index.css +9 -0
- package/src/css/core/print.css +18 -0
- package/src/css/{theme.css → core/theme.css} +19 -19
- package/src/css/{tokens.css → core/tokens.css} +16 -4
- package/src/css/{variants.css → core/variants.css} +3 -2
- package/src/css/{optional → effects}/aura.css +1 -10
- package/src/css/effects/index.css +2 -0
- package/src/css/forms/base.css +8 -0
- package/src/css/forms/choice-card.css +7 -15
- package/src/css/forms/choice.css +49 -37
- package/src/css/forms/control.css +4 -1
- package/src/css/forms/custom-select.css +2 -0
- package/src/css/{optional → forms}/floating-field.css +25 -7
- package/src/css/forms/index.css +10 -13
- package/src/css/forms/native.css +15 -2
- package/src/css/{optional → forms}/otp.css +25 -16
- package/src/css/forms/range.css +14 -4
- package/src/css/forms/switch.css +31 -29
- package/src/css/layout/app-layout.css +102 -0
- package/src/css/layout/app-shell.css +6 -0
- package/src/css/layout/center.css +14 -0
- package/src/css/layout/cluster.css +21 -0
- package/src/css/layout/column-layout.css +144 -0
- package/src/css/layout/container-query.css +15 -0
- package/src/css/layout/frame.css +19 -0
- package/src/css/layout/grid.css +155 -0
- package/src/css/layout/index.css +44 -0
- package/src/css/layout/measure.css +9 -0
- package/src/css/layout/media.css +10 -0
- package/src/css/layout/scroll-target.css +15 -0
- package/src/css/layout/scroller.css +41 -0
- package/src/css/layout/sidebar-layout.css +52 -0
- package/src/css/layout/stack.css +21 -0
- package/src/css/layout/switcher.css +23 -0
- package/src/css/{optional/layout-extra.css → layout/topbar.css} +0 -20
- package/src/css/typography/index.css +5 -0
- package/src/css/typography/lead.css +7 -0
- package/src/css/{components → typography}/overline.css +2 -2
- package/src/css/{prose.css → typography/prose.css} +57 -38
- package/src/css/{utilities.css → utilities/base.css} +2 -0
- package/src/css/utilities/index.css +3 -0
- package/src/js/escape.js +36 -0
- package/src/js/flyout.js +22 -12
- package/src/js/full.js +26 -0
- package/src/js/index.js +5 -21
- package/src/js/surface.js +1 -31
- package/src/js/tooltip.js +48 -19
- package/src/js/validation.js +1 -1
- package/src/tooling/css-bundle.js +308 -0
- package/dist/actual-themes.min.css +0 -1
- package/dist/optional.css +0 -1048
- package/dist/optional.min.css +0 -1
- package/docs/pages/guides/optional-components.md +0 -33
- package/docs/pages/layout/list.md +0 -41
- package/src/css/grid.css +0 -109
- package/src/css/layout.css +0 -123
- package/src/css/optional/index.css +0 -10
- package/src/css/optional/scroller.css +0 -63
- package/src/css/print.css +0 -47
- package/src/css/themes/corporate.css +0 -60
- package/src/css/themes/cyberpunk.css +0 -60
- package/src/css/themes/dim.css +0 -33
- package/src/css/themes/edge.css +0 -117
- package/src/css/themes/forest.css +0 -65
- package/src/css/themes/gradient.css +0 -97
- package/src/css/themes/index.css +0 -47
- package/src/css/themes/indigo.css +0 -33
- package/src/css/themes/lavender.css +0 -66
- package/src/css/themes/mono.css +0 -60
- package/src/css/themes/neon.css +0 -66
- package/src/css/themes/ocean.css +0 -60
- package/src/css/themes/petrol.css +0 -64
- package/src/css/themes/spruce.css +0 -64
- package/src/css/themes/square.css +0 -65
- package/src/css/themes/sunset.css +0 -66
- /package/src/css/{base.css → core/base.css} +0 -0
- /package/src/css/{intents.css → core/intents.css} +0 -0
- /package/src/css/{reset.css → core/reset.css} +0 -0
- /package/src/css/{optional → layout}/scroll-snap.css +0 -0
- /package/src/css/{optional/typography-fluid.css → typography/fluid.css} +0 -0
- /package/src/css/{optional/utilities-extra.css → utilities/extra.css} +0 -0
package/dist/optional.min.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.otp { --otp-cell-size: var(--control-size); --otp-gap: var(--space-10); --otp-font-size: 1.5rem; --otp-cell-border: var(--border); --otp-cell-bg: var(--surface); position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: var(--otp-cell-size); inline-size: fit-content; max-inline-size: 100%; gap: var(--otp-gap); border-radius: var(--radius); direction: ltr; } .otp > span { inline-size: var(--otp-cell-size); block-size: var(--otp-cell-size); border: var(--border-width) solid var(--otp-cell-border); border-radius: var(--radius); background: var(--otp-cell-bg); transition: border-color var(--duration), background-color var(--duration), box-shadow var(--duration); } .otp > input { position: absolute; z-index: 1; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; padding: 0 calc((var(--otp-cell-size) - 1ch) / 2); border: 0; outline: 2px solid transparent; box-shadow: none; background: transparent; color: var(--text); font-family: var(--font-mono); font-size: var(--otp-font-size); font-variant-numeric: tabular-nums; line-height: var(--otp-cell-size); letter-spacing: calc(var(--otp-cell-size) + var(--otp-gap) - 1ch); text-align: start; appearance: none; } .otp:focus-within { box-shadow: var(--focus-ring-shadow); } .otp > input:focus ~ span { --otp-cell-border: var(--focus); } .otp > input[aria-invalid="true"] ~ span, .needs-validation.was-validated .otp > input:invalid ~ span { --otp-cell-border: var(--danger); } @supports selector(:user-invalid) { .needs-validation .otp > input:user-invalid ~ span { --otp-cell-border: var(--danger); } } .otp > input:disabled { color: var(--state-disabled); cursor: not-allowed; } .otp > input:disabled ~ span { --otp-cell-bg: var(--surface-subtle); opacity: var(--disabled-opacity); } @media (forced-colors: active) { .otp:focus-within { outline: var(--focus-outline); outline-offset: var(--focus-outline-offset); box-shadow: none; } .otp > input:focus ~ span { --otp-cell-border: Highlight; } .otp > input[aria-invalid="true"] ~ span, .needs-validation.was-validated .otp > input:invalid ~ span { --otp-cell-border: Mark; } } .chat { --chat-gap: var(--space-30); --chat-max-size: min(85%, 40rem); display: grid; grid-auto-rows: min-content; column-gap: var(--chat-gap); } .chat-start { grid-template-columns: auto minmax(0, 1fr); justify-items: start; } .chat-end { grid-template-columns: minmax(0, 1fr) auto; justify-items: end; } .chat-avatar { grid-row: 1 / span 3; align-self: end; } .chat-start > .chat-avatar { grid-column: 1; } .chat-end > .chat-avatar { grid-column: 2; } .chat-header, .chat-footer { display: flex; gap: var(--space-10); color: var(--text-muted); font-size: var(--font-size-xs); } .chat-start > :is(.chat-header, .chat-bubble, .chat-footer) { grid-column: 2; } .chat-end > :is(.chat-header, .chat-bubble, .chat-footer) { grid-column: 1; } :where(.chat-bubble) { --intent: initial; --intent-fg: initial; --ui-bg: initial; --ui-fg: initial; --ui-border: initial; } .chat-bubble { --chat-bubble-bg: var(--ui-bg, var(--intent, var(--surface-subtle))); --chat-bubble-fg: var(--ui-fg, var(--intent-fg, var(--text))); --chat-bubble-border: var(--ui-border, transparent); inline-size: fit-content; max-inline-size: var(--chat-max-size); padding: var(--space-20) var(--space-30); border: var(--border-width) solid var(--chat-bubble-border); border-radius: var(--radius-lg); background: var(--chat-bubble-bg); color: var(--chat-bubble-fg); overflow-wrap: anywhere; } .chat-start > .chat-bubble { border-end-start-radius: var(--radius-sm); } .chat-end > .chat-bubble { border-end-end-radius: var(--radius-sm); } @supports selector(:has(*)) { .chat:not(:has(> .chat-avatar)) { column-gap: 0; } } @media (forced-colors: active) { .chat-bubble { border-color: CanvasText; } } @property --aura-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; } :where(.aura) { --intent: initial; --intent-fg: initial; } .aura { --aura-color: var(--intent, var(--primary)); --aura-width: 2px; --aura-blur: 0.75rem; --aura-radius: var(--radius-lg); --aura-duration: 6s; position: relative; isolation: isolate; display: inline-grid; padding: var(--aura-width); border-radius: calc(var(--aura-radius) + var(--aura-width)); background: var(--aura-color); background: conic-gradient(from var(--aura-angle), transparent 0 65%, var(--aura-color)); } .aura::before { position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: inherit; filter: blur(var(--aura-blur)); opacity: 0.45; pointer-events: none; content: ""; } .aura > * { position: relative; } .aura-glow { background: var(--aura-color); } @media (prefers-reduced-motion: no-preference) { .aura:not(.aura-glow) { animation: aura-rotate var(--aura-duration) linear infinite; } } @keyframes aura-rotate { to { --aura-angle: 360deg; } } @supports selector(:has(*)) { .aura:has(> .btn) { --aura-radius: var(--radius); } .aura:has(> :is(.card, .alert)) { --aura-radius: var(--radius-lg); } .aura:has(> .badge) { --aura-radius: var(--radius-full); } } @media (forced-colors: active) { .aura { background: CanvasText; } .aura::before { display: none; } } .fab { --fab-offset: var(--space-40); --fab-gap: var(--space-20); position: fixed; z-index: var(--z-menu); inset-block-end: max(var(--fab-offset), env(safe-area-inset-bottom)); inset-inline-end: var(--fab-offset); } .fab > summary { list-style: none; cursor: pointer; } .fab > summary::-webkit-details-marker { display: none; } .fab > summary > [aria-hidden="true"]:only-child { display: inline-block; transition: transform var(--duration); } .fab-actions { position: absolute; inset-inline-end: 0; inset-block-end: calc(100% + var(--fab-gap)); display: flex; flex-direction: column; align-items: flex-end; gap: var(--fab-gap); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(var(--space-10)); transition: opacity var(--duration), transform var(--duration), visibility 0s linear var(--duration); } .fab-action { display: flex; align-items: center; justify-content: flex-end; gap: var(--fab-gap); inline-size: max-content; max-inline-size: calc(var(--viewport-inline) - var(--fab-offset) - var(--fab-offset)); } .fab-label { flex: 0 1 auto; overflow: hidden; max-inline-size: 16rem; padding: var(--space-10) var(--space-20); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); text-overflow: ellipsis; white-space: nowrap; } .fab[open] > .fab-actions { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; } .fab[open] > summary > [aria-hidden="true"]:only-child { transform: rotate(45deg); } @media (forced-colors: active) { .fab-label { border: var(--border-width) solid CanvasText; box-shadow: none; } } @media print { .fab { display: none; } } .floating-field { --floating-pad-block-start: calc(var(--control-size) / 2 + var(--space-20)); position: relative; display: grid; } .floating-field > :is(.input, .textarea, .select) { padding-block-start: var(--floating-pad-block-start); padding-block-end: var(--space-10); } .floating-field > .field-label { position: absolute; inset-block-start: 50%; inset-inline-start: calc(var(--space-30) + var(--border-width)); transform: translateY(-50%); color: var(--text-muted); font-size: var(--control-font-size); font-weight: var(--font-weight); pointer-events: none; transition: inset-block-start var(--duration), transform var(--duration), font-size var(--duration), color var(--duration); } .floating-field > .textarea + .field-label { inset-block-start: var(--floating-pad-block-start); transform: none; } .floating-field > :is(.input, .textarea):is(:focus, :autofill, :not(:placeholder-shown)) + .field-label { inset-block-start: var(--space-10); transform: none; font-size: var(--font-size-xs); } .floating-field > :is( .select, .input[type="date"], .input[type="time"], .input[type="datetime-local"], .input[type="month"], .input[type="week"] ) + .field-label { inset-block-start: var(--space-10); transform: none; font-size: var(--font-size-xs); } .scroller { --scroller-size: 0.625rem; --scroller-padding: 0.125rem; --scroller-track: transparent; --scroller-thumb: var(--border); --scroller-thumb-hover: var(--text-muted); scrollbar-color: var(--scroller-thumb) var(--scroller-track); scrollbar-width: thin; } .scroller.stable-gutter { scrollbar-gutter: stable; } .scroller::-webkit-scrollbar { width: var(--scroller-size); height: var(--scroller-size); } .scroller::-webkit-scrollbar-track { background: var(--scroller-track); } .scroller::-webkit-scrollbar-thumb { border: var(--scroller-padding) solid transparent; border-radius: var(--radius-full); background: var(--scroller-thumb); background-clip: content-box; } .scroller::-webkit-scrollbar-thumb:hover { background: var(--scroller-thumb-hover); background-clip: content-box; } .scroller::-webkit-scrollbar-corner { background: var(--scroller-track); } @supports (color: color-mix(in oklch, red, white)) { .scroller { --scroller-thumb: color-mix(in oklch, var(--text-muted), transparent 55%); --scroller-thumb-hover: color-mix(in oklch, var(--text-muted), transparent 30%); } } .scroll-snap { --scroll-snap-gap: var(--gap); --scroll-snap-align: start; --scroll-snap-item-size: auto; display: flex; gap: var(--scroll-snap-gap); overflow-x: auto; } .scroll-snap > * { flex: 0 0 var(--scroll-snap-item-size); } @supports (scroll-snap-type: x mandatory) { .scroll-snap { overscroll-behavior-inline: contain; scroll-padding-inline: var(--scroll-snap-padding, var(--scroll-snap-gap)); scroll-snap-type: x mandatory; } .scroll-snap > * { scroll-snap-align: var(--scroll-snap-align); } .scroll-snap[data-snap="center"] { --scroll-snap-align: center; } } @supports (scroll-snap-type: inline mandatory) { .scroll-snap { scroll-snap-type: inline mandatory; } } .scroll-snap[data-scrollbar="hidden"] { scrollbar-width: none; } .scroll-snap[data-scrollbar="hidden"]::-webkit-scrollbar { display: none; } :root { --fluid-display: clamp(2.75rem, calc(2.25rem + 2.222vw), 4.25rem); --fluid-title: clamp(2rem, calc(1.75rem + 1.111vw), 2.75rem); --fluid-lead: clamp(1.125rem, calc(1.0833rem + 0.185vw), 1.25rem); } @supports (inline-size: 100vi) { :root { --fluid-display: clamp(2.75rem, calc(2.25rem + 2.222vi), 4.25rem); --fluid-title: clamp(2rem, calc(1.75rem + 1.111vi), 2.75rem); --fluid-lead: clamp(1.125rem, calc(1.0833rem + 0.185vi), 1.25rem); } } .text-display { font-size: var(--fluid-display); line-height: var(--line-height-tight); text-wrap: balance; } .text-title { font-size: var(--fluid-title); line-height: var(--line-height-tight); text-wrap: balance; } .text-lead { font-size: var(--fluid-lead); line-height: var(--line-height-relaxed); } .display-block { display: block; } .display-inline { display: inline; } .display-inline-block { display: inline-block; } .display-flex { display: flex; } .display-inline-flex { display: inline-flex; } .display-grid { display: grid; } .position-relative { position: relative; } .position-absolute { position: absolute; } .position-fixed { position: fixed; } .position-sticky { position: sticky; } .inline-size-full { inline-size: 100%; } .block-size-full { block-size: 100%; } .min-inline-size-0 { min-inline-size: 0; } .min-block-size-0 { min-block-size: 0; } .max-inline-size-none { max-inline-size: none; } .flex-wrap { flex-wrap: wrap; } .flex-nowrap { flex-wrap: nowrap; } .gap-sm { gap: var(--space-20); } .gap-md { gap: var(--space-40); } .gap-lg { gap: var(--space-50); } .justify-content-start { --cluster-justify: flex-start; justify-content: flex-start; } .justify-content-center { --cluster-justify: center; justify-content: center; } .justify-content-end { --cluster-justify: flex-end; justify-content: flex-end; } .justify-content-space-between { --cluster-justify: space-between; justify-content: space-between; } .align-self-start { align-self: start; } .align-self-center { align-self: center; } .align-self-end { align-self: end; } .padding-context { padding: var(--density-space); } .margin-inline-auto { margin-inline: auto; } .margin-inline-start-auto { margin-inline-start: auto; } .margin-inline-end-auto { margin-inline-end: auto; } .margin-block-start-auto { margin-block-start: auto; } .margin-block-end-auto { margin-block-end: auto; } .gap-context { gap: var(--gap); } .row-gap-context { row-gap: var(--gap); } .column-gap-context { column-gap: var(--gap); } .overflow-hidden { overflow: hidden; } .overflow-clip { overflow: clip; } .overflow-x-auto { overflow-x: auto; } .overflow-y-auto { overflow-y: auto; } .white-space-normal { white-space: normal; } .text-break { overflow-wrap: break-word; } .text-uppercase { text-transform: uppercase; } .text-lowercase { text-transform: lowercase; } .text-capitalize { text-transform: capitalize; } .font-weight-normal { font-weight: var(--font-weight); } .font-weight-medium { font-weight: var(--font-weight-medium); } .font-weight-strong { font-weight: var(--font-weight-strong); } .font-weight-bold { font-weight: var(--font-weight-bold); } .radius-sm-context { border-radius: var(--radius-sm); } .radius-context { border-radius: var(--radius); } .radius-lg-context { border-radius: var(--radius-lg); } .border-context { border: var(--border-width) solid var(--border); } .border-block-start { border-block-start: var(--border-width) solid var(--border); } .border-block-end { border-block-end: var(--border-width) solid var(--border); } .border-inline-start { border-inline-start: var(--border-width) solid var(--border); } .border-inline-end { border-inline-end: var(--border-width) solid var(--border); } .background-surface { background: var(--surface); color: var(--text); } .background-raised { background: var(--surface-raised); color: var(--text); } .background-subtle { background: var(--surface-subtle); color: var(--text); } .shadow-context { box-shadow: var(--shadow); } .shadow-popout-context { box-shadow: var(--shadow-popout); } .cursor-pointer { cursor: pointer; } .pointer-events-none { pointer-events: none; } .user-select-none { -webkit-user-select: none; user-select: none; } .display-none { display: none; } .visibility-hidden { visibility: hidden; } .switcher { display: flex; flex-wrap: wrap; gap: var(--gap); } .switcher > * { flex-basis: calc((var(--switcher-threshold, 40rem) - 100%) * 999); flex-grow: 1; min-inline-size: 0; } .topbar { position: sticky; inset-block-start: 0; z-index: var(--z-sticky); isolation: isolate; display: flex; align-items: center; gap: var(--gap); padding-block: var(--space-30); padding-inline: var(--space-40); border-block-end: var(--border-width) solid var(--border); background: var(--surface); } @supports ((backdrop-filter: blur(1rem)) or (-webkit-backdrop-filter: blur(1rem))) and (background: color-mix(in oklch, red 50%, transparent)) { .topbar { background: color-mix(in oklch, var(--surface) 88%, transparent); backdrop-filter: blur(0.75rem); -webkit-backdrop-filter: blur(0.75rem); } }
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Optional components
|
|
2
|
-
|
|
3
|
-
Optional components extend Actual with specialized patterns while keeping the
|
|
4
|
-
same tokens, intents, variants, and density grammar as the core. They add no
|
|
5
|
-
global design tokens and require no JavaScript.
|
|
6
|
-
|
|
7
|
-
Import the complete optional layer after the core:
|
|
8
|
-
|
|
9
|
-
```css
|
|
10
|
-
@import "actual-css/css";
|
|
11
|
-
@import "actual-css/css/optional";
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
`actual-css/css/optional` resolves to the minified optional bundle
|
|
15
|
-
(`dist/optional.min.css`). Alternatively, import only the modules a project
|
|
16
|
-
uses from the source tree:
|
|
17
|
-
|
|
18
|
-
```css
|
|
19
|
-
@import "actual-css/css/optional/fab";
|
|
20
|
-
@import "actual-css/css/optional/floating-field";
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
| Module | Use | Import | Documentation |
|
|
24
|
-
|---|---|---|---|
|
|
25
|
-
| OTP | One native one-time-code input with visual cells | `actual-css/css/optional/otp` | [OTP](../forms/otp.md) |
|
|
26
|
-
| Chat | Start/end message rows and bubbles | `actual-css/css/optional/chat` | [Chat](../components/chat.md) |
|
|
27
|
-
| Aura | Decorative intent-colored frame and glow | `actual-css/css/optional/aura` | [Aura](../components/aura.md) |
|
|
28
|
-
| FAB | Fixed action placement and native speed dial | `actual-css/css/optional/fab` | [FAB](../components/fab.md) |
|
|
29
|
-
| Floating field | Floating labels over the text controls | `actual-css/css/optional/floating-field` | [Floating labels](../forms/floating-field.md) |
|
|
30
|
-
|
|
31
|
-
Component-prefixed custom properties documented on each page are author hooks.
|
|
32
|
-
Color and sizing otherwise stay with the existing intent, variant, control,
|
|
33
|
-
and button APIs.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# List
|
|
2
|
-
|
|
3
|
-
Lists stay native by default. Compose visual list rows from existing primitives.
|
|
4
|
-
|
|
5
|
-
Use `.list-reset` only when markers are not part of the content. Combine `.stack`, `.media`, `.cluster`, spacing helpers, and local styles for application-style rows.
|
|
6
|
-
|
|
7
|
-
```html demo
|
|
8
|
-
<figure class="stack">
|
|
9
|
-
<figcaption><strong>Most played songs this week</strong></figcaption>
|
|
10
|
-
|
|
11
|
-
<ul class="list-reset stack gap-none">
|
|
12
|
-
<li class="media items-center py" style="border-block-end: var(--border-width) solid var(--border)">
|
|
13
|
-
<div class="avatar">
|
|
14
|
-
<img src="https://i.pravatar.cc/48?img=5" alt="Dio Lupa" />
|
|
15
|
-
</div>
|
|
16
|
-
<div class="cluster">
|
|
17
|
-
<div class="stack grow" style="--gap: var(--space-10)">
|
|
18
|
-
<strong>Dio Lupa</strong>
|
|
19
|
-
<span class="muted">Remaining Reason</span>
|
|
20
|
-
</div>
|
|
21
|
-
<span class="muted">3:45</span>
|
|
22
|
-
</div>
|
|
23
|
-
</li>
|
|
24
|
-
|
|
25
|
-
<li class="media items-center py" style="border-block-end: var(--border-width) solid var(--border)">
|
|
26
|
-
<div class="avatar">
|
|
27
|
-
<img src="https://i.pravatar.cc/48?img=10" alt="Astral Planes" />
|
|
28
|
-
</div>
|
|
29
|
-
<div class="cluster">
|
|
30
|
-
<div class="stack grow" style="--gap: var(--space-10)">
|
|
31
|
-
<strong>Astral Planes</strong>
|
|
32
|
-
<span class="muted">Neon Drift</span>
|
|
33
|
-
</div>
|
|
34
|
-
<span class="muted">4:12</span>
|
|
35
|
-
</div>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</figure>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Keep semantic lists unstyled when the markers carry meaning.
|
package/src/css/grid.css
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Responsive equal-width grids, with fixed-column presets below.
|
|
3
|
-
*
|
|
4
|
-
* Public hooks:
|
|
5
|
-
* --grid-min
|
|
6
|
-
* --grid-columns
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/* --grid-columns replaces the intrinsic auto-fit template: once set, the
|
|
10
|
-
grid no longer collapses on its own — the author owns narrow-container
|
|
11
|
-
collapse. Prefer .sidebar-layout inside .container-query for content +
|
|
12
|
-
aside layouts; reserve --grid-columns for genuinely fixed or asymmetric
|
|
13
|
-
templates. */
|
|
14
|
-
|
|
15
|
-
/* Recipe:
|
|
16
|
-
- N equal cards that collapse when narrow -> .grid (auto-fit, tune
|
|
17
|
-
--grid-min) or .grid-2/3/4/6 inside .container-query
|
|
18
|
-
- content + aside -> .sidebar-layout inside .container-query
|
|
19
|
-
- fixed or asymmetric columns -> --grid-columns with an explicit collapse
|
|
20
|
-
rule of your own */
|
|
21
|
-
.grid {
|
|
22
|
-
display: grid;
|
|
23
|
-
gap: var(--gap);
|
|
24
|
-
grid-template-columns: var(
|
|
25
|
-
--grid-columns,
|
|
26
|
-
repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr))
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Fixed-column grids at their full count by default: .grid-2/3/4/6 stay at
|
|
31
|
-
2/3/4/6 columns unless wrapped in .container-query, which collapses the
|
|
32
|
-
column count on narrow wrappers (a 2-col intermediate step for
|
|
33
|
-
.grid-3/.grid-4; .grid-6 starts at 2 columns because it is meant for
|
|
34
|
-
compact items that do not need a full single-column stack). */
|
|
35
|
-
.grid-2,
|
|
36
|
-
.grid-3,
|
|
37
|
-
.grid-4,
|
|
38
|
-
.grid-6 {
|
|
39
|
-
display: grid;
|
|
40
|
-
gap: var(--gap);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.grid-2 {
|
|
44
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
45
|
-
}
|
|
46
|
-
.grid-3 {
|
|
47
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
48
|
-
}
|
|
49
|
-
.grid-4 {
|
|
50
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
51
|
-
}
|
|
52
|
-
.grid-6 {
|
|
53
|
-
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Container queries are the preferred responsive path; browsers without them
|
|
57
|
-
ignore these rules and get the equivalent @media rules from the
|
|
58
|
-
@supports not (container-type) block below — same columns, same breakpoints. */
|
|
59
|
-
@container (width < 28rem) {
|
|
60
|
-
.container-query .grid-2,
|
|
61
|
-
.container-query .grid-3,
|
|
62
|
-
.container-query .grid-4 {
|
|
63
|
-
grid-template-columns: 1fr;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.container-query .grid-6 {
|
|
67
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@container (28rem <= width < 48rem) {
|
|
72
|
-
.container-query .grid-3,
|
|
73
|
-
.container-query .grid-4 {
|
|
74
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
@container (28rem <= width < 64rem) {
|
|
79
|
-
.container-query .grid-6 {
|
|
80
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@supports not (container-type: inline-size) {
|
|
85
|
-
@media (max-width: 63.999rem) {
|
|
86
|
-
.container-query .grid-6 {
|
|
87
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
@media (max-width: 47.999rem) {
|
|
92
|
-
.container-query .grid-3,
|
|
93
|
-
.container-query .grid-4 {
|
|
94
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@media (max-width: 27.999rem) {
|
|
99
|
-
.container-query .grid-2,
|
|
100
|
-
.container-query .grid-3,
|
|
101
|
-
.container-query .grid-4 {
|
|
102
|
-
grid-template-columns: 1fr;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.container-query .grid-6 {
|
|
106
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
package/src/css/layout.css
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Core layout primitives: stack, cluster, center, frame, app-shell, media,
|
|
3
|
-
* sidebar-layout. Each primitive owns a single, readable behavior; they are
|
|
4
|
-
* meant to compose in markup.
|
|
5
|
-
*
|
|
6
|
-
* Public hooks:
|
|
7
|
-
* --cluster-align
|
|
8
|
-
* --cluster-justify
|
|
9
|
-
* --cluster-wrap
|
|
10
|
-
* --center-size
|
|
11
|
-
* --center-pad
|
|
12
|
-
* --frame-ratio
|
|
13
|
-
* --sidebar-layout-size
|
|
14
|
-
*
|
|
15
|
-
* Child contracts:
|
|
16
|
-
* .stack owns vertical rhythm: direct-child block-axis margins are reset,
|
|
17
|
-
* spacing comes from --gap, inline margins stay free.
|
|
18
|
-
* .cluster owns inline rhythm: direct-child margins are reset, spacing comes
|
|
19
|
-
* from --gap.
|
|
20
|
-
* .frame sizes direct media children (img/video/iframe/canvas/svg) to fill the
|
|
21
|
-
* frame.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/* Responsive recipes:
|
|
25
|
-
- avatar/icon + flexible content -> .media
|
|
26
|
-
- inline items that wrap when space runs out -> .cluster (keep wrapping)
|
|
27
|
-
- content + aside -> .sidebar-layout inside .container-query
|
|
28
|
-
- row that becomes a column when constrained -> .switcher (optional module)
|
|
29
|
-
|
|
30
|
-
Anti-patterns:
|
|
31
|
-
- viewport breakpoints for ordinary composition
|
|
32
|
-
- fixed grid templates (--grid-columns) where .grid/.sidebar-layout express
|
|
33
|
-
the layout
|
|
34
|
-
- nowrap on page-level compositions; prefer wrapping and container-aware
|
|
35
|
-
primitives */
|
|
36
|
-
.container-query {
|
|
37
|
-
container-type: inline-size;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.stack {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
gap: var(--gap);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* .stack owns the block axis only: block margins reset, inline margins stay
|
|
47
|
-
free (self-centering children via margin-inline: auto keep working). */
|
|
48
|
-
.stack > * {
|
|
49
|
-
margin-block: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.cluster {
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-wrap: var(--cluster-wrap, wrap);
|
|
55
|
-
align-items: var(--cluster-align, center);
|
|
56
|
-
justify-content: var(--cluster-justify, flex-start);
|
|
57
|
-
gap: var(--gap);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.cluster > * {
|
|
61
|
-
margin: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.center {
|
|
65
|
-
box-sizing: content-box;
|
|
66
|
-
max-inline-size: var(--center-size, 72rem);
|
|
67
|
-
margin-inline: auto;
|
|
68
|
-
padding-inline: var(--center-pad, 1rem);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.frame {
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
aspect-ratio: var(--frame-ratio, 16 / 9);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.frame > :where(img, video, iframe, canvas, svg) {
|
|
77
|
-
inline-size: 100%;
|
|
78
|
-
block-size: 100%;
|
|
79
|
-
object-fit: cover;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.app-shell {
|
|
83
|
-
min-block-size: var(--viewport-block);
|
|
84
|
-
display: flex;
|
|
85
|
-
flex-direction: column;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* Media object: fixed-width leading element (avatar, icon, image) + flexible
|
|
89
|
-
trailing content. Replaces the repeated "auto minmax(0, 1fr)" pattern in
|
|
90
|
-
author cards, comments, meta rows, and similar compositions. */
|
|
91
|
-
.media {
|
|
92
|
-
display: grid;
|
|
93
|
-
grid-template-columns: auto minmax(0, 1fr);
|
|
94
|
-
gap: var(--gap);
|
|
95
|
-
align-items: start;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* Sidebar layout: content + aside using grid. Use this when the aside is
|
|
99
|
-
sticky or the content is multi-section. The aside width is tunable with
|
|
100
|
-
--sidebar-layout-size. */
|
|
101
|
-
.sidebar-layout {
|
|
102
|
-
display: grid;
|
|
103
|
-
gap: var(--gap);
|
|
104
|
-
grid-template-columns: minmax(0, 1fr);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Container queries are the preferred path; without them the @supports not
|
|
108
|
-
block below restores the same columns at the same viewport breakpoint. */
|
|
109
|
-
@container (width >= 64rem) {
|
|
110
|
-
.container-query .sidebar-layout {
|
|
111
|
-
grid-template-columns: minmax(0, 1fr) var(--sidebar-layout-size, 18rem);
|
|
112
|
-
align-items: start;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@supports not (container-type: inline-size) {
|
|
117
|
-
@media (min-width: 64rem) {
|
|
118
|
-
.container-query .sidebar-layout {
|
|
119
|
-
grid-template-columns: minmax(0, 1fr) var(--sidebar-layout-size, 18rem);
|
|
120
|
-
align-items: start;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
@import "otp.css";
|
|
2
|
-
@import "chat.css";
|
|
3
|
-
@import "aura.css";
|
|
4
|
-
@import "fab.css";
|
|
5
|
-
@import "floating-field.css";
|
|
6
|
-
@import "scroller.css";
|
|
7
|
-
@import "scroll-snap.css";
|
|
8
|
-
@import "typography-fluid.css";
|
|
9
|
-
@import "utilities-extra.css";
|
|
10
|
-
@import "layout-extra.css";
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Scroller — optional custom scrollbar styling for overflow regions.
|
|
3
|
-
*
|
|
4
|
-
* Apply to any scroll container (.overflow-auto, sidebars, long tables). Both
|
|
5
|
-
* scrollbar-color (Firefox) and ::-webkit-scrollbar (Safari/Chromium) are
|
|
6
|
-
* styled; the thumb lands as a thin, theme-aware affordance with a hover
|
|
7
|
-
* state.
|
|
8
|
-
*
|
|
9
|
-
* Public hooks:
|
|
10
|
-
* --scroller-size
|
|
11
|
-
* --scroller-padding
|
|
12
|
-
* --scroller-track
|
|
13
|
-
* --scroller-thumb
|
|
14
|
-
* --scroller-thumb-hover
|
|
15
|
-
*/
|
|
16
|
-
.scroller {
|
|
17
|
-
--scroller-size: 0.625rem;
|
|
18
|
-
--scroller-padding: 0.125rem;
|
|
19
|
-
--scroller-track: transparent;
|
|
20
|
-
--scroller-thumb: var(--border);
|
|
21
|
-
--scroller-thumb-hover: var(--text-muted);
|
|
22
|
-
|
|
23
|
-
scrollbar-color: var(--scroller-thumb) var(--scroller-track);
|
|
24
|
-
scrollbar-width: thin;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Opt-in gutter: reserves space so the layout does not shift when
|
|
28
|
-
the scrollbar appears. Use alongside a known-overflow container. */
|
|
29
|
-
.scroller.stable-gutter {
|
|
30
|
-
scrollbar-gutter: stable;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.scroller::-webkit-scrollbar {
|
|
34
|
-
width: var(--scroller-size);
|
|
35
|
-
height: var(--scroller-size);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.scroller::-webkit-scrollbar-track {
|
|
39
|
-
background: var(--scroller-track);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.scroller::-webkit-scrollbar-thumb {
|
|
43
|
-
border: var(--scroller-padding) solid transparent;
|
|
44
|
-
border-radius: var(--radius-full);
|
|
45
|
-
background: var(--scroller-thumb);
|
|
46
|
-
background-clip: content-box;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.scroller::-webkit-scrollbar-thumb:hover {
|
|
50
|
-
background: var(--scroller-thumb-hover);
|
|
51
|
-
background-clip: content-box;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.scroller::-webkit-scrollbar-corner {
|
|
55
|
-
background: var(--scroller-track);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@supports (color: color-mix(in oklch, red, white)) {
|
|
59
|
-
.scroller {
|
|
60
|
-
--scroller-thumb: color-mix(in oklch, var(--text-muted), transparent 55%);
|
|
61
|
-
--scroller-thumb-hover: color-mix(in oklch, var(--text-muted), transparent 30%);
|
|
62
|
-
}
|
|
63
|
-
}
|
package/src/css/print.css
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@media print {
|
|
2
|
-
:root,
|
|
3
|
-
body {
|
|
4
|
-
/* Save some ink in dark mode */
|
|
5
|
-
color-scheme: light;
|
|
6
|
-
background: #fff;
|
|
7
|
-
color: #000;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.flyout,
|
|
11
|
-
.tooltip,
|
|
12
|
-
.surface-backdrop,
|
|
13
|
-
.status-bar,
|
|
14
|
-
.spinner,
|
|
15
|
-
dialog.modal[open],
|
|
16
|
-
dialog.drawer[open] {
|
|
17
|
-
display: none !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
button.btn,
|
|
21
|
-
input[type="button"].btn,
|
|
22
|
-
input[type="submit"].btn,
|
|
23
|
-
input[type="reset"].btn {
|
|
24
|
-
display: none !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
a.btn[href^="http"]::after {
|
|
28
|
-
content: " (" attr(href) ")";
|
|
29
|
-
font-size: 0.875em;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.card,
|
|
33
|
-
.alert,
|
|
34
|
-
.badge {
|
|
35
|
-
border: var(--border-width) solid CanvasText;
|
|
36
|
-
break-inside: avoid;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h1,
|
|
40
|
-
h2,
|
|
41
|
-
h3,
|
|
42
|
-
h4,
|
|
43
|
-
h5,
|
|
44
|
-
h6 {
|
|
45
|
-
break-after: avoid;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
[data-theme="corporate"] {
|
|
2
|
-
color-scheme: light dark;
|
|
3
|
-
|
|
4
|
-
--primary: hsl(214 82% 44%);
|
|
5
|
-
--primary-fg: white;
|
|
6
|
-
--secondary: hsl(250 45% 48%);
|
|
7
|
-
--secondary-fg: white;
|
|
8
|
-
--success: hsl(152 62% 32%);
|
|
9
|
-
--success-fg: white;
|
|
10
|
-
--warning: hsl(40 94% 48%);
|
|
11
|
-
--warning-fg: hsl(35 30% 12%);
|
|
12
|
-
--danger: hsl(355 70% 50%);
|
|
13
|
-
--danger-fg: white;
|
|
14
|
-
--neutral: hsl(220 12% 42%);
|
|
15
|
-
--neutral-fg: white;
|
|
16
|
-
|
|
17
|
-
--surface: hsl(0 0% 100%);
|
|
18
|
-
--surface-raised: hsl(214 30% 98%);
|
|
19
|
-
--surface-subtle: hsl(214 35% 95%);
|
|
20
|
-
--surface-solid: hsl(220 24% 12%);
|
|
21
|
-
|
|
22
|
-
--text: hsl(220 24% 12%);
|
|
23
|
-
--text-muted: hsl(220 10% 42%);
|
|
24
|
-
--text-subtle: hsl(220 8% 55%);
|
|
25
|
-
|
|
26
|
-
--border: hsl(220 16% 86%);
|
|
27
|
-
--focus: var(--primary);
|
|
28
|
-
--focus-ring: hsl(214 82% 44% / 0.22);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@supports (color: light-dark(red, blue)) {
|
|
32
|
-
[data-theme="corporate"] {
|
|
33
|
-
--primary: light-dark(hsl(214 82% 44%), hsl(214 75% 80%));
|
|
34
|
-
--primary-fg: light-dark(white, hsl(214 30% 12%));
|
|
35
|
-
--secondary: light-dark(hsl(250 45% 48%), hsl(250 53% 80%));
|
|
36
|
-
--secondary-fg: light-dark(white, hsl(250 30% 12%));
|
|
37
|
-
--success: light-dark(hsl(152 62% 32%), hsl(152 70% 80%));
|
|
38
|
-
--success-fg: light-dark(white, hsl(152 30% 12%));
|
|
39
|
-
--warning: light-dark(hsl(40 94% 48%), hsl(40 75% 80%));
|
|
40
|
-
--warning-fg: light-dark(hsl(35 30% 12%), hsl(40 30% 12%));
|
|
41
|
-
--danger: light-dark(hsl(355 70% 50%), hsl(355 75% 80%));
|
|
42
|
-
--danger-fg: light-dark(white, hsl(355 30% 12%));
|
|
43
|
-
--neutral: light-dark(hsl(220 12% 42%), hsl(220 20% 80%));
|
|
44
|
-
--neutral-fg: light-dark(white, hsl(220 30% 12%));
|
|
45
|
-
|
|
46
|
-
--surface: light-dark(hsl(0 0% 100%), hsl(214 18% 8%));
|
|
47
|
-
--surface-raised: light-dark(hsl(214 30% 98%), hsl(214 16% 11%));
|
|
48
|
-
--surface-subtle: light-dark(hsl(214 35% 95%), hsl(214 14% 16%));
|
|
49
|
-
--surface-solid: light-dark(hsl(220 24% 12%), hsl(0 0% 96%));
|
|
50
|
-
|
|
51
|
-
--text: light-dark(hsl(220 24% 12%), hsl(0 0% 96%));
|
|
52
|
-
--text-muted: light-dark(hsl(220 10% 42%), hsl(214 8% 68%));
|
|
53
|
-
--text-subtle: light-dark(hsl(220 8% 55%), hsl(214 7% 55%));
|
|
54
|
-
|
|
55
|
-
--border: light-dark(hsl(220 16% 86%), hsl(214 12% 24%));
|
|
56
|
-
--focus-ring: light-dark(hsl(214 82% 44% / 0.22), hsl(214 75% 80% / 0.28));
|
|
57
|
-
--hover-overlay: light-dark(hsl(220 30% 10% / 0.04), hsl(0 0% 100% / 0.06));
|
|
58
|
-
--shadow-color: light-dark(hsl(220 30% 10%), hsl(0 0% 0%));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/* Cyberpunk — light-only stress-test theme (single block, color-scheme: light,
|
|
2
|
-
* same shape as indigo.css). Illustrative rather than production: it exists to
|
|
3
|
-
* prove the token contract survives an extreme spec — a saturated yellow
|
|
4
|
-
* canvas, near-black text and borders, dark-on-bright intent pairs, zero
|
|
5
|
-
* radius, 2px strokes, and hard offset shadows — without touching a single
|
|
6
|
-
* component rule. */
|
|
7
|
-
[data-theme="cyberpunk"] {
|
|
8
|
-
color-scheme: light;
|
|
9
|
-
|
|
10
|
-
/* Bright intents carry dark ink. Each -fg pair is hand-tuned: danger keeps
|
|
11
|
-
a light fg because saturated red is too dark for near-black text, and
|
|
12
|
-
neutral inverts the canvas (black chip, yellow text). */
|
|
13
|
-
--primary: hsl(330 100% 60%);
|
|
14
|
-
--primary-fg: hsl(330 100% 10%);
|
|
15
|
-
--secondary: hsl(187 100% 42%);
|
|
16
|
-
--secondary-fg: hsl(187 100% 8%);
|
|
17
|
-
--success: hsl(150 100% 35%);
|
|
18
|
-
--success-fg: hsl(150 100% 6%);
|
|
19
|
-
--warning: hsl(25 95% 50%);
|
|
20
|
-
--warning-fg: hsl(25 100% 8%);
|
|
21
|
-
--danger: hsl(0 85% 44%);
|
|
22
|
-
--danger-fg: hsl(0 0% 98%);
|
|
23
|
-
--neutral: hsl(56 30% 8%);
|
|
24
|
-
--neutral-fg: hsl(56 100% 55%);
|
|
25
|
-
|
|
26
|
-
/* Yellow canvas. Raised surfaces go paler instead of shadowed — elevation
|
|
27
|
-
is carried by the hard offset shadow below. */
|
|
28
|
-
--surface: hsl(56 100% 50%);
|
|
29
|
-
--surface-raised: hsl(54 100% 64%);
|
|
30
|
-
--surface-subtle: hsl(53 100% 80%);
|
|
31
|
-
--surface-solid: hsl(56 30% 8%);
|
|
32
|
-
|
|
33
|
-
--text: hsl(56 60% 6%);
|
|
34
|
-
--text-muted: hsl(56 25% 22%);
|
|
35
|
-
--text-subtle: hsl(56 14% 34%);
|
|
36
|
-
|
|
37
|
-
--border: hsl(56 60% 6%);
|
|
38
|
-
--focus: hsl(330 100% 42%);
|
|
39
|
-
--focus-ring: hsl(330 100% 42% / 0.3);
|
|
40
|
-
--hover-overlay: hsl(56 100% 8% / 0.08);
|
|
41
|
-
|
|
42
|
-
/* Structure: sharp corners, thick strokes, print-like offset shadows.
|
|
43
|
-
Overriding --shadow directly bypasses the color-mix shadow recipe in
|
|
44
|
-
tokens.css (themes load later, so these flat values win). */
|
|
45
|
-
--radius: 0;
|
|
46
|
-
--radius-sm: 0;
|
|
47
|
-
--radius-lg: 0;
|
|
48
|
-
--border-width: 2px;
|
|
49
|
-
--shadow: 0.25rem 0.25rem 0 hsl(56 60% 6%);
|
|
50
|
-
--shadow-popout: 0.25rem 0.25rem 0 hsl(56 60% 6%);
|
|
51
|
-
--shadow-color: hsl(56 60% 6%);
|
|
52
|
-
|
|
53
|
-
/* Soft surfaces mix against a saturated yellow, so the default recipe reads
|
|
54
|
-
as more yellow — pull more intent in for tints that stay legible. */
|
|
55
|
-
--soft-bg-mix: 78%;
|
|
56
|
-
--soft-border-mix: 40%;
|
|
57
|
-
|
|
58
|
-
--selection-bg: hsl(56 60% 6%);
|
|
59
|
-
--selection-fg: hsl(56 100% 50%);
|
|
60
|
-
}
|
package/src/css/themes/dim.css
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* Dim — a dark theme variant that lifts the surface tones up a few percentage
|
|
2
|
-
* points. Same shape as indigo.css (dark-only, single block) so authors can
|
|
3
|
-
* drop it in when the canonical dark is too dense. Demonstrates how a theme
|
|
4
|
-
* can recolor the same token set without changing structure. */
|
|
5
|
-
[data-theme="dim"] {
|
|
6
|
-
color-scheme: dark;
|
|
7
|
-
|
|
8
|
-
--primary: hsl(210 92% 70%);
|
|
9
|
-
--primary-fg: hsl(218 28% 10%);
|
|
10
|
-
--secondary: hsl(270 70% 74%);
|
|
11
|
-
--secondary-fg: hsl(270 30% 10%);
|
|
12
|
-
--success: hsl(150 56% 58%);
|
|
13
|
-
--success-fg: hsl(150 38% 9%);
|
|
14
|
-
--warning: hsl(40 92% 64%);
|
|
15
|
-
--warning-fg: hsl(35 35% 10%);
|
|
16
|
-
--danger: hsl(0 74% 68%);
|
|
17
|
-
--danger-fg: hsl(0 35% 10%);
|
|
18
|
-
--neutral: hsl(220 10% 72%);
|
|
19
|
-
--neutral-fg: hsl(220 24% 10%);
|
|
20
|
-
|
|
21
|
-
--surface: hsl(220 20% 13%);
|
|
22
|
-
--surface-raised: hsl(220 18% 16%);
|
|
23
|
-
--surface-subtle: hsl(220 16% 20%);
|
|
24
|
-
--surface-solid: hsl(0 0% 96%);
|
|
25
|
-
|
|
26
|
-
--text: hsl(220 18% 94%);
|
|
27
|
-
--text-muted: hsl(220 10% 70%);
|
|
28
|
-
--text-subtle: hsl(220 8% 58%);
|
|
29
|
-
--border: hsl(220 12% 28%);
|
|
30
|
-
--focus: var(--primary);
|
|
31
|
-
--focus-ring: hsl(210 92% 70% / 0.28);
|
|
32
|
-
--hover-overlay: hsl(0 0% 100% / 0.06);
|
|
33
|
-
}
|