Show HN: Flexbox Defense – learn CSS flexbox by playing a tower defense game
flexboxdefense.com
flexboxdefense.com
I've always been a big fan of tower defense games so I thought it would be cool to make an open-source version of the game for teaching basic Flexbox properties. It's also a project that's helped me learn Ember.js.
The code is on GitHub: https://github.com/channingallen/tower-defense
div.board__tower-group
div.tower-group__tower
div.tower-group__tower
div.board__tower-group--body
and, even though it's `position:absolute`, Firefox is taking that third child into account when applying `justify-content:space-between`, placing the first tower on the left and the second in the center instead of on the right.Edit: Here's the Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=874718
Or am I missing something, and not adjusting individual items would still work there?
Edit: Yeah, I'm missing something. /headdesk :)
seems to work.
and align-self is mentioned on wave 10.
It's really frustrating.
On Chrome, it positions the turrets on the edges as expected.
EDIT: Looks like evunveot noticed the same in Linux and linked to the Firefox bug.
I feel like flexbox could have been so much simpler.. I mean, there's a reason why there are so many "Learn flexbox tutorial" out there. Like, "justify-content: flex-end" won't win any API award.
We will never know, but millions of developers must type it for years.
Otherwise, I thought this was pretty neat and very informative. Good job and thanks for sharing!
In your case, you were probably typing some input before you clicked the hint box, thus focusing out of the input and invoking the validation check.
When typing an incorrect input, the first place a user will go to fix it is the help. It's a bit of a catch-22 when the help button will only help you after you fix your typos.