Sheath rule
native-dead-class
#Why
NativePHP supports a native utility subset rather than browser CSS. Unsupported responsive variants, web-only utilities, and misspelled classes have no effect on the device.
#Examples
#Bad
{{-- These browser-only utilities produce no native style. --}}
<native:column class="grid-cols-3 hover:bg-red-500 sm:px-4">
<native:text>Account</native:text>
</native:column>
#Good
{{-- Every utility produces a supported native style. --}}
<native:column class="gap-3 bg-theme-surface px-4">
<native:text>Account</native:text>
</native:column>
#Supported Utilities
Utility support follows the installed NativePHP version on both iOS and Android. A class is reported only when it produces no style on either platform.
This includes platform variants, theme tokens, glass effects, and utilities registered by the application.
#Notes
Interpolated class attributes are skipped because the runtime token set is not
known. Duplicate class writes follow NativePHP's final attribute behavior.
Classes inside raw webview content and registered child-component slots are not
checked as native element styles.
#Options
All NativePHP rules accept nativeViewPaths. The default is
['views/native/']. See Native View Detection
for path configuration.
#See Also
Related rules catch accepted classes with unintended semantics:
- native-misrender-class: Check arbitrary numeric values
- native-dark-variant-target: Check discarded dark-mode properties
- native-typography-target: Move text styles to a consumer