Skip to content

selfAlign needs to be split in two: selfAlignHorizontal and selfAlignVertical #13761

Description

@vrnDhmn

<View style={{selfAlign: 'center', height: 100, width: 100}} />
This view can never be placed in centre of screen without a parent View.

If we get screen width, below is the only way to centre an standalone element:
<View style={{selfAlign: 'center', left: (screenHeight / 2) - 50, height: 100, width: 100}} />

If we had selfAlignHorizontal and selfAlignVertical:
<View style={{selfAlignHorizontal: 'center', selfAlignVertical: 'center', height: 100, width: 100}} />

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions