Live data from Hacker News

Show HN: Struggle with CSS Flexbox? This Playground Is for You

yoavsbg.github.io

51–60 of 120 posts

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#51

Why did they name those props `justify-content` and `align-items` instead of `main-axis-arrangement` and `cross-axis-alignment` which makes more sense?

For discussion I'd argue

• this name works with Grid and Flexbox

• this convention matches justify-items and justify-self, which makes sense

to your point I still confuse it with align-content sometimes.

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#52
post #5

Nice playground! I built an interactive guide a few years ago with a similar playground at the end: https://lik.ai/guides/an-interactive-guide-to-flexbox/ It was useful to refresh my memory here and there with it.

Such a fun playground! Thanks for this :)

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#54
In my opinion, flexbox is simple and makes a lot of sense. The problem is that its properties and values were named by a committee, so they aren't intuitive to anyone who wasn't involved in the long proceedings that led up to the spec being written. You try to remember which one is justify-content, which one is align-items, and so forth, and just give up and try everything until something seems to work.

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#55

In my opinion, flexbox is simple and makes a lot of sense. The problem is that its properties and values were named by a committee, so they aren't intuitive to anyone who wasn't involved in the long proceedings that led up to the spec being written. You try to remember which one is justify-content, which one is align-items, and so forth, and just give up and try everything until something seems to work.

justify-content should be called main-axis. align-items should be called cross-axis.

Once you understand this, all of flexbox becomes easy.

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#56
As a heads-up to any other developer - this is the type of thing at which LLM's excel. I would absolutely never mess with Flexbox on my own anymore. It's too esoteric and weird, and I don't need to waste time trying to get things to line up when ChatGPT or any other LLM can get it done almost instantaneously.

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#57

In my opinion, flexbox is simple and makes a lot of sense. The problem is that its properties and values were named by a committee, so they aren't intuitive to anyone who wasn't involved in the long proceedings that led up to the spec being written. You try to remember which one is justify-content, which one is align-items, and so forth, and just give up and try everything until something seems to work.

There are myriad “how to flexbox” but never seen good “how to grid” in my experience - I despise grid and have never intuitively gotten the hang of it and 95% of the time flexbox will work better and is easier anyway

Just my $.02

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#58

In my opinion, flexbox is simple and makes a lot of sense. The problem is that its properties and values were named by a committee, so they aren't intuitive to anyone who wasn't involved in the long proceedings that led up to the spec being written. You try to remember which one is justify-content, which one is align-items, and so forth, and just give up and try everything until something seems to work.

In almost every framework there is confusion about if a property is applied on itself or its children. Always the same thing.

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#59

I know others have already mentioned it, but i've recommended https://flexboxfroggy.com/ to others before and they quickly picked it up. This is another good one for learning css grid https://cssgridgarden.com/

I tried flexboxfroggy, and while the concept is nice and well executed, the lack of syntax completion really is putting me off.

This is hilarious hope it is satire

Re: Show HN: Struggle with CSS Flexbox? This Playground Is for You

#60

In my opinion, flexbox is simple and makes a lot of sense. The problem is that its properties and values were named by a committee, so they aren't intuitive to anyone who wasn't involved in the long proceedings that led up to the spec being written. You try to remember which one is justify-content, which one is align-items, and so forth, and just give up and try everything until something seems to work.

There are myriad “how to flexbox” but never seen good “how to grid” in my experience - I despise grid and have never intuitively gotten the hang of it and 95% of the time flexbox will work better and is easier anyway Just my $.02

I've gone back to https://cssgridgarden.com/ multiple times. It's https://flexboxfroggy.com/ but for grids.
Post reply on HN