Summary
Several components contain dead code, deprecated patterns, unused CSS selectors, and legacy workarounds that should be cleaned up to reduce maintenance burden and bundle size.
Goal
Remove all dead code, unused styles, deprecated patterns, and legacy workarounds across the component library.
Affected Components
| Component |
Issue |
Details |
| ThemeProvider (#646) |
item 4 |
Obsolete -o- (Opera) vendor prefix in transition disabling |
| Text (#644) |
items 4, 5 |
Outdated JSDoc comments; numeric size variants coexist with named sizes — formalize deprecation |
| FilterChip (#616) |
item 2 |
Unused CSS classes not referenced by component |
| EmptyState (#615) |
item 2 |
Unused CSS classes not referenced by component |
| DropdownMenu (#614) |
item 1 |
TODO workaround for Radix Dialog focus lock — Dialog now uses Base UI |
| Callout (#603) |
items 4, 6 |
width prop duplicates style; duplicate .callout-gradient CSS block |
| Button (#601) |
item 3 |
maxWidth and width props duplicate style |
| Box (#599) |
items 2, 3 |
"Old component just copied in v1 folder" — clarify status; only adds box-sizing: border-box |
Common Patterns
1. Remove obsolete vendor prefixes
/* Remove — no modern browser needs this */
-o-transition: none;
-webkit-transition: none; /* Check if still needed */
2. Remove unused CSS classes
Audit all CSS modules against their component's JSX to find dead selectors.
3. Remove redundant props that duplicate style
Props like width, maxWidth that just get merged into style add API surface without value.
4. Remove stale workarounds
When the underlying issue is fixed (e.g., Dialog migrated from Radix to Base UI), remove the workaround.
5. Formalize deprecations
Mark deprecated APIs with JSDoc @deprecated tags and console warnings in development.
Acceptance Criteria
Summary
Several components contain dead code, deprecated patterns, unused CSS selectors, and legacy workarounds that should be cleaned up to reduce maintenance burden and bundle size.
Goal
Remove all dead code, unused styles, deprecated patterns, and legacy workarounds across the component library.
Affected Components
-o-(Opera) vendor prefix in transition disablingwidthprop duplicatesstyle; duplicate.callout-gradientCSS blockmaxWidthandwidthprops duplicatestylebox-sizing: border-boxCommon Patterns
1. Remove obsolete vendor prefixes
2. Remove unused CSS classes
Audit all CSS modules against their component's JSX to find dead selectors.
3. Remove redundant props that duplicate
styleProps like
width,maxWidththat just get merged intostyleadd API surface without value.4. Remove stale workarounds
When the underlying issue is fixed (e.g., Dialog migrated from Radix to Base UI), remove the workaround.
5. Formalize deprecations
Mark deprecated APIs with JSDoc
@deprecatedtags and console warnings in development.Acceptance Criteria
@deprecated