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
- Add the missing purples to the palette in
src/theme/index.ts (e.g. purple.700: '#3D35A0', purple.800: '#1a1560', names TBD).
- Define semantic tokens for table styling (e.g.
tableBorder, tableHeader, tableSurface) so renderers can drop useColorModeValue and just reference a single token.
- 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.
Follow-up to #199 / PR for
fix/markdown-tables.The current markdown table styling in
src/styles/MDStyles.tsxpartly uses theme palette names (purple.300,gray.50) but still hardcodes the dark-mode purples#3D35A0and#1a1560because they are not in the palette. The same two hex values also appear duplicated across:src/components/survey/SurveyDataTable.tsxsrc/components/survey/SurveyTableOfContents.tsxsrc/components/survey/SurveyChartWrapper.tsxProposed cleanup
src/theme/index.ts(e.g.purple.700: '#3D35A0',purple.800: '#1a1560', names TBD).tableBorder,tableHeader,tableSurface) so renderers can dropuseColorModeValueand just reference a single token.MDStyles.tsxand 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.