Skip to content

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

@oveddan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions