Skip to content

Scaled box results in child elements collapsing on each other. #72

Description

@oveddan

Given this code, tryable in this sandbox where I want to scale a box and all of it's children down:

     <Flex flexDirection="row">
        <Box flexDirection="column" scale-x={0.5} scale-y={0.5}>
          <Box>
            <mesh>
              <meshBasicMaterial color="yellow" />
              <boxBufferGeometry />
            </mesh>
          </Box>
          <Box>
            <mesh>
              <meshBasicMaterial color="red" />
              <boxBufferGeometry />
            </mesh>
          </Box>
        </Box>
      </Flex>

The resulting scene looks like:

Screen Shot 2021-10-25 at 2 34 29 PM

When I'd expect the boxes to not be collapsed on each other, but stacked vertically.

Is there a way to scale down a box properly and have its children properly aligned?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions