Skip to content

Centralize table colors via theme tokens #203

Description

@czepluch

Follow-up to #199 / PR for fix/markdown-tables.

The current markdown table styling in src/styles/MDStyles.tsx partly uses theme palette names (purple.300, gray.50) but still hardcodes the dark-mode purples #3D35A0 and #1a1560 because they are not in the palette. The same two hex values also appear duplicated across:

  • src/components/survey/SurveyDataTable.tsx
  • src/components/survey/SurveyTableOfContents.tsx
  • src/components/survey/SurveyChartWrapper.tsx

Proposed cleanup

  1. Add the missing purples to the palette in src/theme/index.ts (e.g. purple.700: '#3D35A0', purple.800: '#1a1560', names TBD).
  2. Define semantic tokens for table styling (e.g. tableBorder, tableHeader, tableSurface) so renderers can drop useColorModeValue and just reference a single token.
  3. Migrate MDStyles.tsx and the three survey components to the new tokens.

Constraint

Verify that the color codes used correspond to the codes defined in the Solidity style guide. Where the current values diverge from the canonical brand palette, prefer the style guide values and update both this fix and the survey components accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions