Closed joemckie closed 7 years ago
hi @joemckie
It seems redundant because we can replace division with multiply:
const styles = EStyleSheet.create({
label: {
$height: 30,
borderRadius: '$height * 0.5',
height: '$height',
}
});
Hmm... true. It is a little confusing that it initially appears to be broken though. If it won't be implemented perhaps it needs to be made clearer in the docs? On Wed, 12 Apr 2017 at 09:40, Vitaliy Potapov notifications@github.com wrote:
hi @joemckie https://github.com/joemckie
It seems redundant because we can replace division with multiply:
const styles = EStyleSheet.create({ label: { $height: 30, borderRadius: '$height * 0.5', height: '$height', } });
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vitalets/react-native-extended-stylesheet/issues/37#issuecomment-293499160, or mute the thread https://github.com/notifications/unsubscribe-auth/AEv_ighQHZRvwNIoaaVUN_dxjSmb45ioks5rvH_8gaJpZM4M7DjC .
Agree. Now will add to docs. Also just looked on code, it seems rather cheap to support division. I think it's better as nobody read docs :)
Yeah I agree, it seems weird to not implement it, even if it does just
coerce / 2
to * 0.5
behind the scenes. :)
On Wed, 12 Apr 2017 at 10:36, Vitaliy Potapov notifications@github.com
wrote:
Agree. Now will add to docs. Also just looked on code, it seems rather cheap to support division. I think it's better as nobody read docs :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vitalets/react-native-extended-stylesheet/issues/37#issuecomment-293511280, or mute the thread https://github.com/notifications/unsubscribe-auth/AEv_iqbt90_TbwMucP8pvcpWl5_JUJ2fks5rvI0hgaJpZM4M7DjC .
Is there currently any way to implement division with a variable? Take the following example which creates a label with rounded sides:
This is throwing an error that says
$height / 2
is an unresolved variable. The docs also suggest that division isn't implemented.Is there a reason for that or is it just unimplemented? I could take a look into it if there's nothing blocking it.