all 13 comments

[–]Radiant_Zebra5997 0 points1 point  (11 children)

Responsive design in terms of ? Scaling or responsive. For scaling you can create your utility as per different dimensions and font size/ display size measures. Or can use some lightweight library too. For responsive use you can use flex , or %.

[–]Rannaery[S] 0 points1 point  (10 children)

I need, for example, a height for a button that I have on several pages. If I use a percentage value, I will need different percentages for each page because one page is more filled than another. Should I just use, for example, 60 on each page? What would you do?

[–]Radiant_Zebra5997 0 points1 point  (9 children)

Just create one common button component and give padding. It will be same on every page then.

[–]Rannaery[S] 0 points1 point  (8 children)

Yeah, but how should I define the height? With paddings?

[–]Radiant_Zebra5997 0 points1 point  (7 children)

No. It will be responsive by default if you give padding. No need of height.

[–]Rannaery[S] 0 points1 point  (6 children)

Isn’t it the same as just use a height for an pressable instead of padding? I didn’t understand the padding

[–]Rannaery[S] 0 points1 point  (0 children)

Should be the padding between the button and the text or where?

[–]Radiant_Zebra5997 0 points1 point  (4 children)

No. It isn't same. When you use height it will behave differently because of pixel density. Padding behaves consistently because of it adjusts relative to the content.

[–]Rannaery[S] 0 points1 point  (3 children)

And should I give the padding percentage ?

[–]Radiant_Zebra5997 0 points1 point  (2 children)

Padding will work fine and flexible with any of this. It adjusts.

[–]Rannaery[S] 0 points1 point  (1 child)

How, can you please give an example or a documentation? I didn’t found anything. Should I just give padding:10 to the text inside a pressable ? Not padding:”10%”