The offmargin flag sets a style to marginVertical: 0, while the component has a marginTop and marginBottom properties set. The the styles are flattened, the result is:
The component FeedbackContent has its vertical margins zeroed.
A "ghost" margin with the previous marginTop and marginBottom values remains rendered
The following image shows the gap between the title and the FeedbackContent component, while there is no margins or paddings applied:
The following image demonstrates the component's margins are zero.
By making other tests I have found a pattern:
Overrinding properties works from general properties to specific properties, but not conversely
The following component
FeedbackContent
uses a flatten style method to aggregate conditional styles likeoffmargin
, as you can see bellow:The
offmargin
flag sets a style tomarginVertical: 0
, while the component has amarginTop
andmarginBottom
properties set. The the styles are flattened, the result is:FeedbackContent
has its vertical margins zeroed.marginTop
andmarginBottom
values remains renderedThe following image shows the gap between the title and the
FeedbackContent
component, while there is no margins or paddings applied:The following image demonstrates the component's margins are zero.
By making other tests I have found a pattern:
See the following Expo snack with the tests: https://snack.expo.dev/@alexruzenhack/margin-rules-application
I have fixed this issue in the following commit: https://github.com/HathorNetwork/hathor-wallet-mobile/pull/495/commits/5e90771c43cb7c7d795c493ee22114bb2e55f3fb