vitalets / react-native-extended-stylesheet

Extended StyleSheets for React Native
MIT License
2.93k stars 132 forks source link

Add 'left', 'right', 'bottom', 'up' to SCALABLE_PROPS #87

Closed SNY7 closed 5 years ago

vitalets commented 6 years ago

hi @SNY7 ! Could you share your experience is scaling of positioning props always needed? Maybe in some cases only sizing props should be scaled.

SNY7 commented 6 years ago

@vitalets It's only used in absolute positioning, otherwise elements' position will shifting. Very useful in my projects.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

vitalets commented 5 years ago

I'm concerning will not it break the layout. @SNY7 could you show an example?

SNY7 commented 5 years ago

@vitalets I use it for some elements with absolute position, for example:

  button: {
    position: 'absolute',
    width: 700,
    left: 25,
    backgroundColor: 'black',
    paddingTop: 10,
    paddingBottom: 10,
    bottom: 110,
    zIndex: 1,
  },
  alertBg: {
    position: 'absolute',
    backgroundColor: 'rgba(0,0,0,0.3)',
    top: 0,
    left: 0,
    flex: 1,
    width: '100%',
    height: '100%',
    justifyContent: 'flex-end',
    alignItems: 'center',
  },

If the SCALABLE_PROPS don't have these items, then the values will not calculate by the scale.calc function.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.