Sheath rule
native-border-requires-pair
NativePHP borders need both width and color, with theme classes ordered before
explicit widths.
#Why
A native border renders only when its style contains both values. A
border-theme-* class supplies both, but it also resets an earlier explicit
width to 1.
#Examples
#Bad
{{-- Two borders are incomplete; the theme class resets border-4 to width 1. --}}
<native:column class="border-2" />
<native:column class="border-red-500" />
<native:column class="border-4 border-theme-outline" />
#Good
{{-- Each border has width and color, with the final width applied last. --}}
<native:column class="border-2 border-red-500" />
<native:column class="border-theme-outline border-4" />
Literal or bound borderWidth and borderColor attributes override
class-derived values, matching NativePHP's final style precedence.
#Platform And Conditional Paths
iOS and Android classes are evaluated separately. A border can therefore be complete on one platform and incomplete on the other.
Conditional attribute paths are checked when their relationship is known. Opaque class values and independently complex conditions are skipped.
#Options
All NativePHP rules accept nativeViewPaths. The default is
['views/native/']. See Native View Detection
for path configuration.
#See Also
Related rules validate border tokens and themes:
- native-dead-class: Report unsupported border utilities
- native-unknown-theme-token: Verify theme colors