question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add auto margin vertically

See original GitHub issue

Is a good practice, like bootstrap do, adding a my-auto spacing helpers. Is usefull have it in the quasar core and not add this usefull spacing, for working with flex, in external app file.

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoenescucommented, Mar 28, 2020

Confusion is over. q-my-auto, q-mt-auto and q-mb-auto are coming to “quasar” v1.9.12. Just make sure that you know what you are doing.

1reaction
mesqueebcommented, Mar 28, 2020

Yes, as I’ve said before:

parent flexbox column with fixed height + .q-mt-auto on child will push it to the bottom, if only that css class exists.

@rstoenescu asked me before the reason I use flex and not something else, is because the interactive parent component uses flexbox and then dynamically changes the direction between column and row etc.

So, since I’d need flexbox anyway when the parent element is in the the .row state, I see no reason why I should avoid flexbox in the .column state…

I strongly believe we should in all cases, and to avoid any confusion, provide the users with q-mt-auto and q-mb-auto.

@pdanpdan

it avoids a lot of confusion if they are not present.

I would say it’s the exact opposite. I was extremely confused by their absence! 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using margin:auto to vertically-align a div - Stack Overflow
If the display of your parent container is flex , then yes, margin: auto auto (also known as margin: auto ) will work...
Read more >
Vertical center with margin:auto - CodePen
Absolute elements will centre vertically when margin:auto is used and all co-ordinates are set . ...
Read more >
15 ways to implement vertical alignment with CSS
15 ways to implement vertical alignment with CSS · 1. Absolute positioning and margin: auto · 2. The classic top:50% , translateY(-50%) ·...
Read more >
margin | CSS-Tricks
Vertical margins on different elements that touch each other (thus have no content, padding, or borders separating them) will collapse, forming ...
Read more >
Bootstrap 4 Vertical Center Using Auto Margins on Codeply
Vertical & horizontal center using auto-margins.. I am Groot. Various vertical align examples with Bootstrap 4. Preview open_in_new. 1007.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found