Open pravdomil opened 3 years ago
Hi, I'm coming from Bootstrap and I'm missing one feature that I used a lot.
What if el [ padding { left = 8, right = 8, top = 8, bottom = 16 } ] becomes el [ padding 8, paddingBottom 16 ].
el [ padding { left = 8, right = 8, top = 8, bottom = 16 } ]
el [ padding 8, paddingBottom 16 ]
Than I can use just add a border at top, or add more padding at bottom to some reusable view: reusableView [ borderTop 1, paddingBottom 18 ]
reusableView [ borderTop 1, paddingBottom 18 ]
Also I can have composable spacing utils, for example I can define my view as: row [ defaultPadding, biggerBottomPadding ]
row [ defaultPadding, biggerBottomPadding ]
And for me is easier to read [ padding 8, paddingBottom 16 ] then [ padding { left = 8, right = 8, top = 8, bottom = 16 }].
[ padding 8, paddingBottom 16 ]
[ padding { left = 8, right = 8, top = 8, bottom = 16 }]
Here are new function names:
Element.padding and Border.width: propXY becomes propXY, propX, propY propEach becomes propLeft, propRight, propTop, propBottom
propXY
propX
propY
propEach
propLeft
propRight
propTop
propBottom
Element.spacing: spacingXY becomes spacingXY, spacingX, spacingY
spacingXY
spacingX
spacingY
Border.rounded: roundEach becomes roundedTopLeft, roundedTopRight, roundedBottomLeft, roundedBottomRight
roundEach
roundedTopLeft
roundedTopRight
roundedBottomLeft
roundedBottomRight
Hi, I'm coming from Bootstrap and I'm missing one feature that I used a lot.
What if
el [ padding { left = 8, right = 8, top = 8, bottom = 16 } ]
becomesel [ padding 8, paddingBottom 16 ]
.Than I can use just add a border at top, or add more padding at bottom to some reusable view:
reusableView [ borderTop 1, paddingBottom 18 ]
Also I can have composable spacing utils, for example I can define my view as:
row [ defaultPadding, biggerBottomPadding ]
And for me is easier to read
[ padding 8, paddingBottom 16 ]
then[ padding { left = 8, right = 8, top = 8, bottom = 16 }]
.Here are new function names:
Element.padding and Border.width:
propXY
becomespropXY
,propX
,propY
propEach
becomespropLeft
,propRight
,propTop
,propBottom
Element.spacing:
spacingXY
becomesspacingXY
,spacingX
,spacingY
Border.rounded:
roundEach
becomesroundedTopLeft
,roundedTopRight
,roundedBottomLeft
,roundedBottomRight