Skip to content

[BUG] [alpha] CortexThemePicker accent color swatch buttons use hardcoded 32px dimensions instead of spacing token #67

@hconsulting987654321-blip

Description

Description

In CortexThemePicker.tsx line 57, the accent color swatch buttons use hardcoded inline width: "32px" and height: "32px" instead of the design system spacing token var(--cortex-space-8) (which equals 32px in cortex-tokens.css).

// Line 57
style={{
  width: "32px", height: "32px", "border-radius": "50%",
  background: s.color, padding: "0", cursor: "pointer",
  transition: "all 150ms ease",
  ...
}}

Hardcoded pixel values bypass the design token system, preventing consistent scaling if the spacing scale is updated globally. The custom color input on line 67 uses a different hardcoded size (28px), creating a visual inconsistency between two adjacent color selection controls.

Expected: Use var(--cortex-space-8) for the swatch dimensions, or reference the token via the tokens object.

Steps to Reproduce

  1. Open Cortex IDE
  2. Click the Themes icon in the sidebar (paintbrush icon)
  3. Inspect the accent color swatch buttons in the "Accent Color" section
  4. Observe width: 32px; height: 32px are set as inline styles, not via design tokens

System Information

  • Cortex IDE alpha (latest)
  • OS: Linux x86_64
  • Browser engine: Chromium

theme-swatch-hardcoded

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions