I’m trying to center align items in a flex column. The problem is that the flex colum contains a stack of grid elements, which seem to be immune to every alignement trick I come up with (margin/padding: 0 auto, justify content, align self).
Rather than applying the flex and alignments to the listItem <li>, you should look at setting flex and justify-content: center to the HTML being created in the img and button variables.
As the divs being added to the to li are block level elements, so they are already full width, you need to target the stuff within that div.