Status
Pending review — scope, order, and acceptance criteria for each component are subject to change before implementation begins. This issue consolidates all component-related tracking into one place.
Supersedes / consolidates: #354, #355, #358, #247, #220, #219
Overview
optional/components.css and optional/tokens.components.css are currently entirely commented out (0 live rules). The @layer slashed.components slot is real and ordered. Components land incrementally as additive minor releases — no breaking changes, no JS, BEM-first throughout.
All components:
- Live in
@layer slashed.components
- Use only
--sf-* tokens (color / spacing / radius / border / shadow)
- Use logical properties for spacing/sizing/inset
- Must pass WCAG 2.2 (min 24px target size, visible focus, forced-colors safe)
- Must respect
prefers-reduced-motion where animation is involved
- Require tests (light + dark) under
tests/ and documentation in docs/components.md
- Ship via a
MINOR bump only
Components
3. .sf-badge
Modifiers: --success, --warning, --error, --info, --neutral
No token block or stub exists yet.
4. .sf-tag
Modifiers: --clickable, --removable, --s, --m
No token block or stub exists yet.
5. .sf-alert
Modifiers: --success, --warning, --error, --info, --dismissible · Slots: __icon, __close
No token block or stub exists yet.
6. .sf-avatar
Modifiers: --xs, --s, --m, --l, --xl, --square
No token block or stub exists yet.
7. .sf-modal
Modifiers: --s, --m, --l, --full · Slots: __header, __body, __footer, __close
No token block or stub exists yet. Depends on native <dialog> element.
8. .sf-skeleton
Modifiers: --text, --avatar, --card, --line
Reserved commented stub exists in optional/components.css (0 live rules).
9. Custom checkbox, radio, and toggle
New file: optional/forms-custom.css (opt-in, optional/forms.css accent-color approach stays as default)
10. @starting-style entry/exit animations
Depends on: --sf-transition-overlay token · Ships alongside .sf-modal (and any future dialog/popover)
Acceptance criteria (shared)
Status
Supersedes / consolidates: #354, #355, #358, #247, #220, #219
Overview
optional/components.cssandoptional/tokens.components.cssare currently entirely commented out (0 live rules). The@layer slashed.componentsslot is real and ordered. Components land incrementally as additive minor releases — no breaking changes, no JS, BEM-first throughout.All components:
@layer slashed.components--sf-*tokens (color / spacing / radius / border / shadow)prefers-reduced-motionwhere animation is involvedtests/and documentation indocs/components.mdMINORbump onlyComponents
3.
.sf-badgeNo token block or stub exists yet.
--sf-badge-*tokens inoptional/tokens.components.css.sf-badge+ semantic colour modifiers using--sf-color-*tokens--sf-radius-fullor--sf-badge-radius4.
.sf-tagNo token block or stub exists yet.
--sf-tag-*tokens inoptional/tokens.components.css--clickable: button semantics, hover/focus state--removable: includes an×action target meeting WCAG 2.2 target size--sf-tag-*tokens5.
.sf-alertNo token block or stub exists yet.
--sf-alert-*tokens inoptional/tokens.components.css--sf-color-*equivalents__closeslot: WCAG 2.2 target size,aria-label--dismissible: no JS required — usedetails/summaryor note JS dependency explicitly6.
.sf-avatarNo token block or stub exists yet.
--sf-avatar-*tokens:size,radius,bg,border-color,border-width,font-size--sf-avatar-sizecustom property per modifier--square:border-radius: 0or--sf-radius-s; default is circular<img>, initials text, and icon children7.
.sf-modalNo token block or stub exists yet. Depends on native
<dialog>element.--sf-modal-*tokens:width,padding,radius,shadow,backdrop-color<dialog>— no JS API, just CSS; consumer handlesshowModal()/close()max-inline-size@starting-styleentry animation (fade + translate-y) respectingprefers-reduced-motion::backdropstyled via--sf-modal-backdrop-color8.
.sf-skeletonReserved commented stub exists in
optional/components.css(0 live rules)..sf-skeleton+ shape modifiersbackground-imageanimation using--sf-color-*surface tokensprefers-reduced-motion: reduce(static muted fill instead)img.sf-skeleton, .sf-skeleton img { opacity: 0 }to suppress native image rendering9. Custom checkbox, radio, and toggle
appearance: none+:checked+ SVG checkmark viabackground-imageappearance: none+:checked+ filled dot:checked:indeterminate)--sf-color-action,--sf-color-surface,--sf-radius-*,--sf-duration-fast,--sf-ease-outprefers-reduced-motionsafe (disable thumb animation)10.
@starting-styleentry/exit animationsopacity+translate) on[open]/:popover-open:not([open])/:not(:popover-open)withdisplay: nonetransitionprefers-reduced-motion— instant show/hide when reducedAcceptance criteria (shared)
core/, zero breaking token renamesoptional/tokens.components.cssoptional/components.cssdocs/components.mdupdated with usage + HTML examples per componenttests/for each (light + dark modes minimum)MINORversion bump per batch shippednpm run check:versionpasses before each commit