Skip to content

Styles with percentage values #364

@fnky

Description

@fnky

When using a property with the type of number, it's not possible to use percentage-based values.

var styles = StyleSheet.create({
  myStyle: {
    position: 'absolute',
    width: '100%' // throws an error
  }
});

It would be nice to support this, so you don't have to calculate the value to px yourself. Using a string would also allow other units to be used — If using number type, it would still be px-based value.

This would also make it easy to make things responsive.

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