Tachyons: margin top and bottom in auto

Created on 26 Jan 2018  路  2Comments  路  Source: tachyons-css/tachyons

I tried to align vertical center an element within Flexbox and it works quite well, should be part of Tachyons?

.mt-auto { margin-top: auto; }
.mb-auto { margin-top: bottom; }

Tips:
https://hackernoon.com/flexbox-s-best-kept-secret-bd3d892826b6

Most helpful comment

Margin-auto left and right was released with v4 (see #390). In this same issue was mentioned vertical auto margins (some time later), I think they should be included too.

All 2 comments

Margin-auto left and right was released with v4 (see #390). In this same issue was mentioned vertical auto margins (some time later), I think they should be included too.

Believe you'd want align-items: center for vertically aligning flex children.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tabeth picture tabeth  路  4Comments

deadcoder0904 picture deadcoder0904  路  5Comments

j-greig picture j-greig  路  3Comments

Alexgalinier picture Alexgalinier  路  4Comments

overlandandseas picture overlandandseas  路  3Comments