actual-css 0.3.0 → 0.4.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 +78 -3
- package/README.md +35 -30
- package/dist/actual.css +98 -4882
- package/dist/actual.full.css +7090 -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/cascade-layer.md +35 -13
- package/docs/design-notes/column-layout.md +677 -0
- package/docs/design-notes/forced-colors.md +3 -0
- package/docs/design-notes/grid.md +612 -0
- package/docs/design-notes/naming.md +15 -0
- package/docs/design-notes/widget-primitives.md +1 -0
- package/docs/navigation.json +5 -1
- package/docs/pages/components/alert.md +16 -14
- package/docs/pages/components/aura.md +1 -1
- package/docs/pages/components/avatar.md +6 -6
- package/docs/pages/components/badge.md +7 -7
- package/docs/pages/components/button.md +22 -17
- package/docs/pages/components/card.md +29 -13
- 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 +7 -7
- package/docs/pages/components/navbar.md +9 -8
- package/docs/pages/components/pagination.md +4 -3
- package/docs/pages/components/skeleton.md +4 -4
- package/docs/pages/components/spinner.md +5 -5
- package/docs/pages/components/table.md +30 -5
- package/docs/pages/enhancements/flyout.md +13 -13
- 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 +6 -6
- package/docs/pages/enhancements/tooltip.md +1 -1
- package/docs/pages/examples/overview.md +41 -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 +1 -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 +41 -45
- 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 +29 -7
- 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 +186 -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-shell.md +1 -1
- package/docs/pages/layout/center.md +1 -1
- package/docs/pages/layout/choosing.md +39 -0
- package/docs/pages/layout/cluster.md +4 -2
- package/docs/pages/layout/column-layout.md +206 -0
- package/docs/pages/layout/frame.md +6 -1
- package/docs/pages/layout/grid.md +100 -102
- package/docs/pages/layout/list.md +1 -1
- package/docs/pages/layout/media.md +10 -3
- 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 +20 -19
- package/docs/pages/layout/stack.md +90 -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/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 +1 -1
- 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 -7
- 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 +261 -0
- package/src/cli/actual-css.js +133 -0
- package/src/css/actual.css +1 -28
- package/src/css/actual.full.css +11 -2
- package/src/css/components/alert.css +33 -10
- package/src/css/components/badge.css +38 -19
- package/src/css/components/breadcrumb.css +1 -1
- package/src/css/components/button.css +35 -13
- package/src/css/components/card.css +37 -4
- package/src/css/components/drawer.css +27 -2
- package/src/css/components/flyout.css +5 -0
- package/src/css/components/index.css +32 -27
- package/src/css/components/join.css +8 -1
- package/src/css/components/key.css +2 -0
- package/src/css/components/menu.css +11 -1
- package/src/css/components/meter.css +4 -1
- package/src/css/components/modal.css +5 -0
- package/src/css/components/navbar.css +13 -5
- package/src/css/components/pagination.css +11 -0
- package/src/css/components/spinner.css +5 -0
- package/src/css/components/status-bar.css +5 -0
- package/src/css/components/surface.css +5 -0
- package/src/css/components/table.css +6 -0
- package/src/css/components/tooltip.css +5 -0
- package/src/css/core/index.css +9 -0
- package/src/css/core/print.css +18 -0
- package/src/css/{theme.css → core/theme.css} +20 -10
- package/src/css/{tokens.css → core/tokens.css} +15 -2
- package/src/css/{variants.css → core/variants.css} +27 -13
- package/src/css/effects/index.css +2 -0
- package/src/css/forms/base.css +8 -0
- package/src/css/forms/choice-card.css +5 -4
- package/src/css/forms/choice.css +49 -37
- package/src/css/forms/control.css +6 -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 +20 -16
- package/src/css/forms/switch.css +31 -29
- package/src/css/layout/app-shell.css +6 -0
- package/src/css/layout/center.css +13 -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 +13 -0
- package/src/css/layout/frame.css +19 -0
- package/src/css/layout/grid.css +141 -0
- package/src/css/layout/index.css +42 -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 +31 -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 +10 -4
- package/src/css/{prose.css → typography/prose.css} +53 -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 +4 -32
- package/src/js/tooltip.js +65 -24
- 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/src/css/grid.css +0 -96
- package/src/css/layout.css +0 -108
- 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 -43
- 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/{optional → components}/chat.css +0 -0
- /package/src/css/{optional → components}/fab.css +0 -0
- /package/src/css/{base.css → core/base.css} +0 -0
- /package/src/css/{focus.css → core/focus.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 → effects}/aura.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.
|
package/src/css/grid.css
DELETED
|
@@ -1,96 +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
|
-
.grid {
|
|
9
|
-
display: grid;
|
|
10
|
-
gap: var(--gap);
|
|
11
|
-
grid-template-columns: var(
|
|
12
|
-
--grid-columns,
|
|
13
|
-
repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr))
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Fixed-column grids at their full count by default: .grid-2/3/4/6 stay at
|
|
18
|
-
2/3/4/6 columns unless wrapped in .container-query, which collapses the
|
|
19
|
-
column count on narrow wrappers (a 2-col intermediate step for
|
|
20
|
-
.grid-3/.grid-4; .grid-6 starts at 2 columns because it is meant for
|
|
21
|
-
compact items that do not need a full single-column stack). */
|
|
22
|
-
.grid-2,
|
|
23
|
-
.grid-3,
|
|
24
|
-
.grid-4,
|
|
25
|
-
.grid-6 {
|
|
26
|
-
display: grid;
|
|
27
|
-
gap: var(--gap);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.grid-2 {
|
|
31
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
32
|
-
}
|
|
33
|
-
.grid-3 {
|
|
34
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
35
|
-
}
|
|
36
|
-
.grid-4 {
|
|
37
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
38
|
-
}
|
|
39
|
-
.grid-6 {
|
|
40
|
-
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* Container queries are the preferred responsive path; browsers without them
|
|
44
|
-
ignore these rules and get the equivalent @media rules from the
|
|
45
|
-
@supports not (container-type) block below — same columns, same breakpoints. */
|
|
46
|
-
@container (width < 28rem) {
|
|
47
|
-
.container-query .grid-2,
|
|
48
|
-
.container-query .grid-3,
|
|
49
|
-
.container-query .grid-4 {
|
|
50
|
-
grid-template-columns: 1fr;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.container-query .grid-6 {
|
|
54
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@container (28rem <= width < 48rem) {
|
|
59
|
-
.container-query .grid-3,
|
|
60
|
-
.container-query .grid-4 {
|
|
61
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@container (28rem <= width < 64rem) {
|
|
66
|
-
.container-query .grid-6 {
|
|
67
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@supports not (container-type: inline-size) {
|
|
72
|
-
@media (max-width: 63.999rem) {
|
|
73
|
-
.container-query .grid-6 {
|
|
74
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
@media (max-width: 47.999rem) {
|
|
79
|
-
.container-query .grid-3,
|
|
80
|
-
.container-query .grid-4 {
|
|
81
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@media (max-width: 27.999rem) {
|
|
86
|
-
.container-query .grid-2,
|
|
87
|
-
.container-query .grid-3,
|
|
88
|
-
.container-query .grid-4 {
|
|
89
|
-
grid-template-columns: 1fr;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.container-query .grid-6 {
|
|
93
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
package/src/css/layout.css
DELETED
|
@@ -1,108 +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 margins are reset, spacing comes
|
|
17
|
-
* from --gap.
|
|
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
|
-
.container-query {
|
|
24
|
-
container-type: inline-size;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.stack {
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
gap: var(--gap);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.stack > * {
|
|
34
|
-
margin: 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.cluster {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-wrap: var(--cluster-wrap, wrap);
|
|
40
|
-
align-items: var(--cluster-align, center);
|
|
41
|
-
justify-content: var(--cluster-justify, flex-start);
|
|
42
|
-
gap: var(--gap);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.cluster > * {
|
|
46
|
-
margin: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.center {
|
|
50
|
-
box-sizing: content-box;
|
|
51
|
-
max-inline-size: var(--center-size, 72rem);
|
|
52
|
-
margin-inline: auto;
|
|
53
|
-
padding-inline: var(--center-pad, 1rem);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.frame {
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
aspect-ratio: var(--frame-ratio, 16 / 9);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.frame > :where(img, video, iframe, canvas, svg) {
|
|
62
|
-
inline-size: 100%;
|
|
63
|
-
block-size: 100%;
|
|
64
|
-
object-fit: cover;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.app-shell {
|
|
68
|
-
min-block-size: var(--viewport-block);
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Media object: fixed-width leading element (avatar, icon, image) + flexible
|
|
74
|
-
trailing content. Replaces the repeated "auto minmax(0, 1fr)" pattern in
|
|
75
|
-
author cards, comments, meta rows, and similar compositions. */
|
|
76
|
-
.media {
|
|
77
|
-
display: grid;
|
|
78
|
-
grid-template-columns: auto minmax(0, 1fr);
|
|
79
|
-
gap: var(--gap);
|
|
80
|
-
align-items: start;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Sidebar layout: content + aside using grid. Use this when the aside is
|
|
84
|
-
sticky or the content is multi-section. The aside width is tunable with
|
|
85
|
-
--sidebar-layout-size. */
|
|
86
|
-
.sidebar-layout {
|
|
87
|
-
display: grid;
|
|
88
|
-
gap: var(--gap);
|
|
89
|
-
grid-template-columns: minmax(0, 1fr);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* Container queries are the preferred path; without them the @supports not
|
|
93
|
-
block below restores the same columns at the same viewport breakpoint. */
|
|
94
|
-
@container (width >= 64rem) {
|
|
95
|
-
.container-query .sidebar-layout {
|
|
96
|
-
grid-template-columns: minmax(0, 1fr) var(--sidebar-layout-size, 18rem);
|
|
97
|
-
align-items: start;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@supports not (container-type: inline-size) {
|
|
102
|
-
@media (min-width: 64rem) {
|
|
103
|
-
.container-query .sidebar-layout {
|
|
104
|
-
grid-template-columns: minmax(0, 1fr) var(--sidebar-layout-size, 18rem);
|
|
105
|
-
align-items: start;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -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
|
-
}
|
package/src/css/themes/edge.css
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/* Edge - paired light/dark theme that demonstrates component-local
|
|
2
|
-
* border-accent tokens. Buttons become surface controls with an
|
|
3
|
-
* intent-colored lower edge (.solid remains available when an action needs a
|
|
4
|
-
* filled treatment), text controls (input/textarea/select) pick up the same
|
|
5
|
-
* lower-edge accent via --control-border-block-end-*, alerts get an
|
|
6
|
-
* intent-colored leading flag via --alert-border-inline-start-*. The focus
|
|
7
|
-
* ring keeps the shared width — edge only drops the border-color flip so the
|
|
8
|
-
* intent-colored lower edge stays dominant. */
|
|
9
|
-
[data-theme="edge"] {
|
|
10
|
-
color-scheme: light dark;
|
|
11
|
-
|
|
12
|
-
--primary: hsl(224 72% 42%);
|
|
13
|
-
--primary-fg: white;
|
|
14
|
-
--secondary: hsl(166 54% 30%);
|
|
15
|
-
--secondary-fg: white;
|
|
16
|
-
--success: hsl(145 46% 32%);
|
|
17
|
-
--success-fg: white;
|
|
18
|
-
--warning: hsl(36 80% 38%);
|
|
19
|
-
--warning-fg: hsl(34 35% 10%);
|
|
20
|
-
--danger: hsl(354 62% 46%);
|
|
21
|
-
--danger-fg: white;
|
|
22
|
-
--neutral: hsl(228 9% 42%);
|
|
23
|
-
--neutral-fg: white;
|
|
24
|
-
|
|
25
|
-
--surface: hsl(40 20% 99%);
|
|
26
|
-
--surface-raised: hsl(0 0% 100%);
|
|
27
|
-
--surface-subtle: hsl(220 24% 95%);
|
|
28
|
-
--surface-solid: hsl(228 26% 12%);
|
|
29
|
-
|
|
30
|
-
--text: hsl(228 24% 12%);
|
|
31
|
-
--text-muted: hsl(228 9% 42%);
|
|
32
|
-
--text-subtle: hsl(228 7% 56%);
|
|
33
|
-
|
|
34
|
-
--border: hsl(220 14% 86%);
|
|
35
|
-
--focus: var(--primary);
|
|
36
|
-
--focus-ring: hsl(224 72% 42% / 0.22);
|
|
37
|
-
--hover-overlay: hsl(228 30% 10% / 0.04);
|
|
38
|
-
|
|
39
|
-
--radius: 0.375rem;
|
|
40
|
-
--radius-sm: 0.25rem;
|
|
41
|
-
--radius-lg: 0.625rem;
|
|
42
|
-
|
|
43
|
-
--btn-default-bg: var(--surface-subtle);
|
|
44
|
-
--btn-default-border: transparent;
|
|
45
|
-
--btn-border-color: transparent;
|
|
46
|
-
--btn-border-block-end-width: 2px;
|
|
47
|
-
|
|
48
|
-
--control-border-block-end-color: var(--primary);
|
|
49
|
-
--control-border-block-end-width: 2px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Intent-dependent button tokens must resolve on the button itself. If these
|
|
53
|
-
live on [data-theme], var(--intent) computes before local intent classes
|
|
54
|
-
apply and every button keeps the same primary edge. */
|
|
55
|
-
[data-theme="edge"] .btn:not(.link) {
|
|
56
|
-
--btn-border-block-end-color: var(--intent, var(--primary));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
[data-theme="edge"] .btn:not(:where(.solid, .soft, .outline, .ghost, .link)) {
|
|
60
|
-
--btn-default-fg: var(--intent, var(--text));
|
|
61
|
-
--ui-hover-bg: var(--surface-raised);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
[data-theme="edge"]
|
|
65
|
-
.btn:not(
|
|
66
|
-
:where(:disabled, [aria-disabled="true"], .solid, .soft, .outline, .ghost, .link)
|
|
67
|
-
):hover {
|
|
68
|
-
box-shadow: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Intent-dependent alert token, same reasoning as the button rule above:
|
|
72
|
-
must resolve on the alert itself so local intent classes (.danger, etc.)
|
|
73
|
-
win over the bare --primary fallback. */
|
|
74
|
-
[data-theme="edge"] .alert {
|
|
75
|
-
--alert-border-inline-start-color: var(--intent, var(--primary));
|
|
76
|
-
--alert-border-inline-start-width: 4px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Focus recipe override — the base recipe (control.css) flips --control-border
|
|
80
|
-
to --focus and draws a box-shadow ring. Edge drops the border-color flip and
|
|
81
|
-
thickens the accent edge instead so the intent-coloured lower edge stays
|
|
82
|
-
dominant; the focus ring and its 3px width remain the same as the default. */
|
|
83
|
-
[data-theme="edge"] :is(.input, .textarea, .select):focus-visible {
|
|
84
|
-
--control-border: var(--border);
|
|
85
|
-
--control-border-block-end-width: 3px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@supports (color: light-dark(red, blue)) {
|
|
89
|
-
[data-theme="edge"] {
|
|
90
|
-
--primary: light-dark(hsl(224 72% 42%), hsl(220 80% 76%));
|
|
91
|
-
--primary-fg: light-dark(white, hsl(224 35% 10%));
|
|
92
|
-
--secondary: light-dark(hsl(166 54% 30%), hsl(166 58% 70%));
|
|
93
|
-
--secondary-fg: light-dark(white, hsl(166 35% 9%));
|
|
94
|
-
--success: light-dark(hsl(145 46% 32%), hsl(145 48% 64%));
|
|
95
|
-
--success-fg: light-dark(white, hsl(145 35% 8%));
|
|
96
|
-
--warning: light-dark(hsl(36 80% 38%), hsl(40 72% 66%));
|
|
97
|
-
--warning-fg: light-dark(hsl(34 35% 10%), hsl(38 35% 10%));
|
|
98
|
-
--danger: light-dark(hsl(354 62% 46%), hsl(354 66% 72%));
|
|
99
|
-
--danger-fg: light-dark(white, hsl(354 35% 10%));
|
|
100
|
-
--neutral: light-dark(hsl(228 9% 42%), hsl(228 12% 72%));
|
|
101
|
-
--neutral-fg: light-dark(white, hsl(228 24% 10%));
|
|
102
|
-
|
|
103
|
-
--surface: light-dark(hsl(40 20% 99%), hsl(228 20% 8%));
|
|
104
|
-
--surface-raised: light-dark(hsl(0 0% 100%), hsl(228 17% 11%));
|
|
105
|
-
--surface-subtle: light-dark(hsl(220 24% 95%), hsl(228 14% 16%));
|
|
106
|
-
--surface-solid: light-dark(hsl(228 26% 12%), hsl(0 0% 96%));
|
|
107
|
-
|
|
108
|
-
--text: light-dark(hsl(228 24% 12%), hsl(0 0% 96%));
|
|
109
|
-
--text-muted: light-dark(hsl(228 9% 42%), hsl(228 8% 68%));
|
|
110
|
-
--text-subtle: light-dark(hsl(228 7% 56%), hsl(228 7% 55%));
|
|
111
|
-
|
|
112
|
-
--border: light-dark(hsl(220 14% 86%), hsl(228 12% 24%));
|
|
113
|
-
--focus-ring: light-dark(hsl(224 72% 42% / 0.22), hsl(220 80% 76% / 0.28));
|
|
114
|
-
--hover-overlay: light-dark(hsl(228 30% 10% / 0.04), hsl(0 0% 100% / 0.06));
|
|
115
|
-
--shadow-color: light-dark(hsl(228 30% 10%), hsl(0 0% 0%));
|
|
116
|
-
}
|
|
117
|
-
}
|