Skip to content

Help with understanding how row() and column() works inside a grid? #1378

Closed Answered by falkoschindler
Anindya088 asked this question in Q&A
Discussion options

You must be logged in to vote

Question 1 looks like https://stackoverflow.com/a/76859061/3419103:

The problem is that 50% + gap + 50% is more than 100%. Therefore the flex layout automatically wraps the second box onto the next "line".

You can avoid this behavior using the Tailwind class "no-wrap":

with ui.row().classes("w-96 gap-1 bg-grey no-wrap"):
    ui.label("Wurst").classes("w-1/2 bg-red")
    ui.label("Wurst").classes("w-1/2 bg-red")

Question 2: I think you misunderstand justify-between and content-between. These flex properties always apply along the principal axis or along the secondary axis. So when switching from row to column, the principal axis switches from horizontally to vertically. So you want to us…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Anindya088
Comment options

Answer selected by Anindya088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants