All rules

Sheath rule

native-unknown-theme-token

NativePHP theme utilities must reference a token resolved by the active application theme.
Package
NativePHP
Category
Native
Default severity
error by default
Auto-fix
Auto-fix available

when a close configured token can replace one unambiguous static class

#Why

A missing theme token produces no color. A token available only in a dark configuration is also unavailable to a base light-theme utility.

#Examples

#Bad

{{-- surfase is not a configured theme token. --}}
<native:column class="bg-theme-surfase">
<native:text>Account</native:text>
</native:column>

#Good

{{-- surface resolves through the active theme. --}}
<native:column class="bg-theme-surface">
<native:text>Account</native:text>
</native:column>

#Theme Authority

Available tokens come from the installed NativePHP theme when present. Otherwise, light-theme tokens come from native-ui.theme.

Background, text, and border theme utilities are checked, including platform and dark prefixes and opacity suffixes. If neither source supplies any tokens, theme classes are reported as unresolvable.

#Notes

Dynamic class values and theme classes that NativePHP rejects for another reason are skipped.

#Options

All NativePHP rules accept nativeViewPaths. The default is ['views/native/']. See Native View Detection for path configuration.

#See Also

Related rules cover theme adoption and unsupported classes: