News for hackers. Stuff that matters.
Re:The end of the clearfix hack? by devwastaken on Thursday January 26, 2017 @06:22AM (#13490471)
I really like flexbox, but its still missing functionality and somewhat misleading in its options. Everything is row-column based, but you can select between row or column, but in the column option, only justify-content will position content vertically. If you want something like forcing an element to be in the middle vertically, and have an element above it, you can't do that. align-self only works on rows. I really don't understand why they didn't make it work vertically if you have column mode.
Re:The end of the clearfix hack? by mark242 on Thursday January 26, 2017 @12:17PM (#13493174)
A flexbox "column" can also be a row. You can have a container item centered vertically and also have it include two items.
Re:The end of the clearfix hack? by devwastaken on Thursday January 26, 2017 @10:24PM (#13497445)
In this case, I needed two children elements, one would be centered vertically in the column, and the other would be at the top of the column, but they would not effect each others position. I could only make one where the two elements were next to each other, or they effected each others positions, so the centered element was not actually centered. I ended up putting in three elements, the bottom one the same size as the top, but hidden, so the center element would stick between the two.
Re:The end of the clearfix hack? by j_r_f on Thursday January 26, 2017 @01:42PM (#13493999)
It's all about the nested flex'd elements.
Re:The end of the clearfix hack? by devwastaken on Thursday January 26, 2017 @07:31PM (#13496739)
Do you have an example that would accomplish that? As in, one element centered vertically to the parent flexbox, and its sibling attached to the top of the column, but not effecting each others position?