shadcn-ui/lint's `no-raw-colors` rule and its interpretation of custom `--text-*` CSS variables within Tailwind v4 `@theme` blocks.
Raw Developer Origin & Technical Request
GitHub Issue
Sep 14, 2026
The following report is AI-generated, let me know if you need more details!
## Summary
When a Tailwind v4 theme defines a custom font-size scale with `--text-*`
variables, `no-raw-colors` reports those `text-` classes as undeclared
theme colors. Tailwind reads them as font sizes, but the linter reads them as
text colors.
## Reproduction
`src/index.css` (the `tailwind.css` entry in `components.json`):
```css
@import "tailwindcss";
@theme inline {
--color-foreground: var(--foreground);
}
@theme {
--text-heading: 1.875rem;
--text-heading--line-height: 0.9;
--text-body: 0.875rem;
--text-body--line-height: 1.4;
}
```
`src/page.tsx`:
```tsx
export function Page() {
return (
Title
Body
)
}
```
`eslint.config.js`:
```js
rules: {
"shadcn/no-raw-colors": "error",
}
```
## Expected
No reports. Tailwind generates `text-heading` and `text-body` as font-size
utilities from `--text-heading` and `--text-body`.
## Actual
```text
"text-heading" is not a declared theme color. Use one of: foreground (+…). To add a color, declare --color- in src/index.css first
"text-body" is not a declared theme color. Use one of: foreground (+…). To add a color, declare --color- in src/index.css first
```
## Cause
The class group comes from `cn`'s `defaultConfig()`, not from the theme. That
config only knows Tailwind's built-in font sizes (`text-xs` to `tex...
Developer Debate & Comments
No active discussions extracted for this entry yet.
Adjacent Repository Pain Points
Other highly discussed features and pain points extracted from shadcn-ui/lint.
Frequently Asked Questions
Market intelligence mapped to shadcn-ui/lint's `no-raw-colors` rule and its interpretation of custom `--text-*` CSS variables within Tailwind v4 `@theme` blocks..
What problem does shadcn-ui/lint's `no-raw-colors` rule and its interpretation of custom `--text-*` CSS variables within Tailwind v4 `@theme` blocks. solve?
Are engineers actively discussing shadcn-ui/lint's `no-raw-colors` rule and its interpretation of custom `--text-*` CSS variables within Tailwind v4 `@theme` blocks.?
What architecture is tied to shadcn-ui/lint's `no-raw-colors` rule and its interpretation of custom `--text-*` CSS variables within Tailwind v4 `@theme` blocks.?
Engagement Signals
Cross-Market Term Frequency
Quantifies the cross-market adoption of foundational terms like no-raw-colors and @theme inline by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.
SaaS Metrics