Sheath rule
native-dark-variant-target
NativePHP
dark: variants must target properties included in the device style
payload.
#Why
NativePHP sends dark values for background, text color, border color, opacity, and font size to the device. Other dark properties are discarded.
#Examples
#Bad
{{-- NativePHP discards dark radius, font weight, and spacing values. --}}
<native:column class="dark:rounded-lg dark:font-bold dark:-mt-4">
<native:text>Account</native:text>
</native:column>
#Good
{{-- NativePHP preserves dark background, opacity, and text color. --}}
<native:column class="dark:bg-slate-900 dark:opacity-90">
<native:text class="dark:text-white">Account</native:text>
</native:column>
#Notes
This finding applies only when a token produces a dark style whose entire result is discarded. Tokens without any native effect are outside its scope.
iOS and Android platform prefixes are evaluated independently.
#Options
All NativePHP rules accept nativeViewPaths. The default is
['views/native/']. See Native View Detection
for path configuration.
#See Also
Related rules cover other native class failures:
- native-dead-class: Report classes with no parsed effect
- native-misrender-class: Report accepted arbitrary values with changed meaning