triniwiz / triniwiz/nativescript-plugins

Yoga child's does not respect the width or justify-content

Open
#57 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
87
Forks
57
Avg merge
1h 36m
Merged PRs (30d)
4

Description

I am tested designs with yoga and it is not respecting the width of the children, put the width that you put always occupies 100% of the father. here is what i'm trying to do

    <View
          style="
        flex: 1;
        width: 500;
        height: 500;
        justify-content: space-between;
        align-items: flex-start;
        padding: 20;
        background: black"
      >
        <View style="flex: 1; width: 10; height: 100; background: red"/>
        <View style="flex: 1; width: 10; height: 100; background: blue"/>
      </View>

it looks like this
image

and it should look like this
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Yoga playground and the NativeScript View reproduction in the issue, comparing the reported layout with the expected image. Trace how child width and justify-content are handled, then verify that the two children retain width 10 and are spaced as shown in the expected result.

Written by the indexing model from the issue text.

Assessment

Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.