Varrunan Projects 67803eac81
fix(brand): detect token sources under unlisted CSS filenames (#523)
The overwrite guard added in #501 scans a hardcoded list of CSS entry points
for `:root` custom properties and Tailwind v4 `@theme` blocks. The list only
held the plural `globals.css` spellings, so a project whose entry point is
`src/styles/global.css` — one letter apart — was never scanned. The guard
silently passed and `assets/design-tokens.{json,css}` was generated alongside
an existing palette, leaving two competing token systems and no warning.

Copying the same file to `src/index.css` made the guard fire correctly, which
confirms the detection logic was fine and only its candidate set was too narrow.

Widen the list with the singular spellings and `main.css` / `app.css`, then
shallow-scan a set of conventional style directories for any `*.css` so the
guard no longer depends on an exact filename. Detection itself is unchanged, so
the existing false-positive behaviour still holds: stylesheets with no custom
properties, commented-out `:root` blocks, and properties outside `:root` do not
block a sync.

Co-authored-by: Varrunan Projects <200937066+Varrunan-bit@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 06:05:22 +07:00
..