TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Flexbox Froggy – A game for learning CSS flexbox

317 pointsby mrzoolover 3 years ago

18 comments

40fourover 3 years ago
This and Grid Garden have been around for a while and seem to come up at least once a year. Great resources no doubt, always fun! The best past threads from both -&gt;<p>Froggy<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10652909" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10652909</a><p>Garden<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18753358" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18753358</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14041367" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14041367</a>
svatover 3 years ago
Sometime last year, I started doing these 24 exercises in TeX&#x2F;LaTeX -- when I started, my idea was to show how TeX&#x27;s very simple box-glue-penalty model (its &quot;glue&quot; is like springs with specified stretch and shrink) is yet general enough to do all the many things that Flexbox can do. I never got around to finishing it, and in the process I realized that much of what Flexbox focuses on are purely user-conveniences (e.g. allowing the user to specify &quot;boxes&quot; in a different order), and some of it (e.g. vertical typesetting) is actually nontrivial with TeX, though doable (and used by many in practice, wrapped into packages, which I was hoping not to use).<p>So my project is abandoned for now and the existing document is in a very unpolished state, but in the meantime if anyone is interested, take a look -- (it has spoilers for the CSS exercises, and most of it only makes sense if you look at the (La)TeX source code, of which I&#x27;m definitely not an expert): <a href="https:&#x2F;&#x2F;www.overleaf.com&#x2F;read&#x2F;ssmrvhpwrmpn" rel="nofollow">https:&#x2F;&#x2F;www.overleaf.com&#x2F;read&#x2F;ssmrvhpwrmpn</a>
评论 #30256107 未加载
cpmsmithover 3 years ago
This game definitely helped me to wrap my head around the changes Flexbox allows with inline&#x2F;block axes, but looking back, it really glosses over the actual &quot;flexible box&quot; part, i.e. child elements growing and shrinking, intrinsic sizing, etc. Are there any similar resources that touch on that aspect more?
评论 #30252706 未加载
评论 #30252907 未加载
评论 #30255719 未加载
seerover 3 years ago
Honestly, the thing that made me “grok” flexbox, and actually start thinking in it, was figma’s auto layout.<p>As a dev from the 2000s, I had tables and floats seared into my mind. Any design problem layout problem boiled down to that, and I just used flexbox to make it easier.<p>But figma … that thing made me actually _think_ in responsive layouts. Not sure how they’ve implemented it, but auto layout just feels like an “interface to flexbox”. After a couple of projects, in my mind now everything is just auto layouts, and thus I’m now defaulting to using flexbox everywhere. Only more exotic design issues now need something different.
otrasover 3 years ago
Also highly recommend the sibling game Grid Garden for working with CSS grid layout: <a href="https:&#x2F;&#x2F;cssgridgarden.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cssgridgarden.com&#x2F;</a>
webmobdevover 3 years ago
For those already familiar with CSS, <i>Css Tricks</i> also has very useful guides on:<p>- Flexbox - <a href="https:&#x2F;&#x2F;css-tricks.com&#x2F;snippets&#x2F;css&#x2F;a-guide-to-flexbox&#x2F;" rel="nofollow">https:&#x2F;&#x2F;css-tricks.com&#x2F;snippets&#x2F;css&#x2F;a-guide-to-flexbox&#x2F;</a><p>- Grids - <a href="https:&#x2F;&#x2F;css-tricks.com&#x2F;snippets&#x2F;css&#x2F;complete-guide-grid&#x2F;" rel="nofollow">https:&#x2F;&#x2F;css-tricks.com&#x2F;snippets&#x2F;css&#x2F;complete-guide-grid&#x2F;</a>
Karsteskiover 3 years ago
Honestly gonna try this out because I&#x27;ve been rewriting my personal website in plain HTML&#x2F;CSS and I have a bit of trouble positioning things.<p>Thanks!
评论 #30255512 未加载
lelandfeover 3 years ago
I had my entire team of FE engs take this when it came out! It’s really a lovely tool and it helped a lot of our folks grok how to start transitioning to a flex model.
amansidhantover 3 years ago
Are people aware of similar gamified approaches to learn web dev&#x2F;programming concepts? This game definitely helped me grok flexbox
评论 #30256786 未加载
评论 #30256552 未加载
ogazittover 3 years ago
When this came out, I spent a couple of hours positioning frogs. I think I even learned some CSS. It&#x27;s as addictive as Wordle :)
评论 #30252513 未加载
sabujpover 3 years ago
I taught a web development&#x2F;css course for google codenext, would love to have known about this
Osirisover 3 years ago
I was forced into frontend development a few years due to a priority shift at my company (I was a backend dev) and these tools were extremely helpful. I highly recommend them to anyone getting into frontend development.
评论 #30256320 未加载
jdefeliceover 3 years ago
Would love to see a tailwind version of this. As I know the class names and what the properties do, I just forget the syntax without the help of an IDE.
dfabulichover 3 years ago
Flexbox Froggy is good, but I prefer Flexbox Zombies. It&#x27;s got a better hint system, better graphics, and a story. <a href="https:&#x2F;&#x2F;mastery.games&#x2F;flexboxzombies&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mastery.games&#x2F;flexboxzombies&#x2F;</a>
conartistover 3 years ago
Flexbox Froggy is a great starting point, but nothing helps you solidify this info better than building layouts and components.
thoughtpaletteover 3 years ago
Remember this when it first came out. Was a great resource.
warning26over 3 years ago
Hands down, the best Flexbox tutorial I&#x27;ve ever done.
jdkjsover 3 years ago
Is it worth it to use flexbox now that grid exists? I’m not sure if they solve the same kind of problems.
评论 #30253885 未加载
评论 #30256188 未加载