src/tailwind-preset.cjs drifted from tailwind-preset.ts — missing `info` and `chart` color scales
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- tailwindcss, typescript
Research direction
Compare the info and chart color scales in src/tailwind-preset.ts with src/tailwind-preset.cjs, and check the border-info/40 safelist entry near line 603 of the .cjs file. The quick fix is to copy the missing scales into the .cjs. Done means node -e "require('./src/tailwind-preset.cjs')" lists info and chart under theme.extend.colors, and the resolved theme matches the compiled .ts output. Confirm the choice between the quick copy and generating the .cjs from the .ts with the maintainers before choosing the durable option.
Written by the indexing model from the issue text.
Description
Problem
There are two copies of the Tailwind preset:
src/tailwind-preset.ts— source of truth. tsup compiles it todist/tailwind-preset.cjs/.js, which is what package consumers get via the./tailwind-presetexport. Complete.src/tailwind-preset.cjs— a hand-maintained CJS twin used only by this repo's owntailwind.config.js(presets: [require('./src/tailwind-preset.cjs')]) for dev/Storybook builds.
The info and chart color scales were added to the .ts in 5ef64bff (2026-01-24, Card expansion) but never mirrored into the .cjs, which has never had them.
Impact
- Consumers: none. The published preset is built from the
.tsand is correct. - In-repo dev/Storybook builds: the preset doesn't define
info-*/chart-*colors, so those utilities aren't generated from the preset. Notably the.cjssafelist even includesborder-info/40(~line 603) for a color it doesn't define.
Found while generating the mieweb-ui-tokens skill for #545 — the generator deliberately imports src/tailwind-preset.ts (via Node type stripping) specifically to avoid this drifted copy.
Fix options
- Quick: copy the
infoandchartscales from the.tsinto the.cjs. - Durable (preferred): eliminate the second copy — generate
src/tailwind-preset.cjsfrom the.ts(or pointtailwind.config.jsat a build output) so it can't drift again.scripts/rtl-scan.mjsalso reminds contributors to update "BOTH" files, which is the smell.
Verify
node -e "const p=require('./src/tailwind-preset.cjs'); console.log(Object.keys(p.theme.extend.colors))"listsinfoandchart- Storybook:
info/chartutilities render (e.g.bg-info-500,text-chart-1) - Diff the resolved theme of
.cjsvs compiled.tsto confirm zero remaining drift
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 4
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 72
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mieweb/ui
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
MIEUI R&D TicketOpen
Difficulty 1/5 Under an hour Newbie friendliness 8/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
Similar issues
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
frostney/GocciaScript#1746 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
agilepathway/label-checker#739 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
CopilotKit/OpenBot#800 ·
Maintainers usually reply within 1 day
-
Endpoint links in the tag operations list are below the 24px target sizePossibly taken @AdzerKI claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
ehmpathy/rhachet-roles-bhuild#471 ·
Maintainers usually reply within 1 day