98
u/Mallanaga Jan 18 '23
Big fan of this style of learning. Show me all the options, visually, so that I can see how they compare to each other! Very nice.
18
u/qda Jan 18 '23
You must be a speed learner then
24
u/WangHotmanFire Jan 19 '23
If this is all it takes for someone to be a speed learner, I think that term would have to apply to everyone. Who wouldnât find this to be an easier way to learn this information?
-3
u/6086555 Jan 19 '23
The animation is pretty much useless as the open state is the only one that's interesting
84
u/Voltra_Neo front-end Jan 18 '23
I wish space-evenly was supported everywhere
41
u/micalm <script>alert('ha!')</script> Jan 18 '23
Where it's not? caniuse shows full support everywhere (except the usual IE&Opera Mini).
28
u/Voltra_Neo front-end Jan 18 '23 edited Jan 20 '23
I'll check at work tomorrow, but there are sometimes differences between support tables and implementations (I've recently discovered few interesting bugs or non-implementations in Safari's implementation of SVG1.1, despite the tables saying they are)
EDIT: I'll be damned, space-evenly is finally supported on OSX & iOS Safari (wasn't 1-3 years back)
44
u/Makemeacyborg Jan 18 '23
Typical Safari
15
u/Voltra_Neo front-end Jan 18 '23
I was banging my head asking myself why on earth my
dywasn't working. I went to the SVG1.1 specs of textPath, copy pasted the example, it looked nothing like the expected result, I finally understood what the hell was going on11
u/horses_arent_friends full-stack Jan 19 '23
On the bright side the folks at Open Web Advocacy have been making good headway with EU legislators and the DMA will be applicable starting in May.
Introducing third party browsers wonât be as meaningful as youâd hope (normal users wonât switch and thereâs too many of them for companies to ignore/give them broken experiences) BUT the 10-20% fines based on worldwide gross revenue will be great incentive for Apple to stop intentionally understaffing the safari and webkit teams.
3
u/Suspicious-Engineer7 Jan 19 '23
Id rather apple just kill safari at this point. They dont care about web nearly as much as the app ecosystem.
3
u/Makemeacyborg Jan 19 '23
Cause they canât gate keep the web and charge entrance like they do with their App Store. To me it has always felt like thatâs the reason they went after flash too. Yeah Flash wasnât great either so it made it an easy target
4
1
u/lamintak Jan 20 '23
Did you get a chance to check on this? I'm curious if there's a bug with it that I don't know about.
3
u/Voltra_Neo front-end Jan 20 '23
Just did and edited my comment. It is finally supported on both OSX and iOS Safari. I checked between 1 and 3 years ago and it wasn't, and knowing IE and Safari, I didn't bother checking again.
SVGs are still broken tho
5
45
u/RubikTetris Jan 18 '23
what the hell is a speed-learner
47
13
u/UreMomNotGay Jan 18 '23
CSS flex box speed learning unrestricted any% 6:57:05 [WR] (WORLDS FIRST SUB 7 MINS)
1
6
u/qda Jan 18 '23
People who don't want to watch a 15min tutorial for the same learning, or read a multi page blog post
11
u/RubikTetris Jan 18 '23
If you donât have the attention span to read a 15min article on flex you wonât make it far in programming lol
10
u/The_Ghost_of_Bitcoin Jan 19 '23
Fair enough, but I'd rather read a document than watch a video most of the time because I can read a lot faster than I can find info in most videos.
Videos are nice for things like this where a visual is key though.
1
u/RubikTetris Jan 19 '23
An article can contain images and examples. The article on css tricks on flex is all I ever needed to understand it.
7
u/qda Jan 19 '23
It's not a matter of having the attention span, it's a matter of trying to learn many things in a short amount of time, which is very applicable to a lot of programming situations
4
u/magkruppe Jan 19 '23
but not applicable for something like flexbox. beginners shouldn't be speed learning anything
1
1
1
68
Jan 18 '23
The bouncing is really distracting and doesnât let me get a sense of the spacing of things because itâs constantly undulating.
37
Jan 19 '23
This isn't for slow learners bud. Maybe go to the library and check out some microfiche
-16
Jan 19 '23
Lol buddy I didnât need an animated graphic to understand something as trivial as flex to begin with but sure thing lmao
26
2
8
u/ReleaseThePressure Jan 19 '23
If only there were some kind of pause button.
8
Jan 19 '23
That youâd have to find the exact frame to pause on to get an accurate idea of the spacing. Not a good way to represent the concept is all
1
u/Unpredictabru Jan 19 '23
Itâs really not that hard to create a toggle that either loops the animation or pauses on the first frame
0
Jan 19 '23
You mean the very first frame of the video?
What kind of super-detective could ever find that?
10
17
u/Scoots1414 Jan 18 '23
Can someone explain the layout spacing for space-around? It looks like space-evenly, the outside and inside gutters all have equal distance, makes sense. But for space-around, the gutters on the outside donât match the gutters between A-B and B-C.
What is the flex calculating to determine the different gutter sizes for the outsides vs insides?
4
4
u/r0ck0 Jan 19 '23
Assuming I've understood it correctly, another slightly more visual explanation...
In both cases, the "empty spaces" are all the same size, but it's a bit like if there were a different number of them:
space-aroundhas 6x equal empty spaces:1a23b45c6
space-evenlyhas 4x equal empty spaces:1a2b3c4Or a JS string analogy:
array.map(item => "_" + item + "_").join("") === "_a__b__c_" "_" + array.join("_") + "_" === "_a_b_c_"1
1
0
5
2
2
2
u/mrmcplad Jan 19 '23
flexbox only starts making intuitive sense when you see it moving. too many guides try to explain it in words with "axis" and "cross-axis" & still images when stuff like this is what you need.
2
2
2
2
3
1
1
1
1
1
u/TomatoAcid Jan 19 '23
What is âspace aroundâ? I noticed the B trying to stay at the center, but I donât understand the A and C behavior
1
u/Candyvanmanstan Jan 19 '23
Take available extra space, allocate it as left/right spacing to each item ("around" each item)
That's why middle items have more space than the edge pieces. Space evenly works similar but allocates space so the middle pieces don't get "more" just because they have neighbors.
1
1
1
u/Miserable_Lemon_4710 Jan 19 '23
I knew how they worked individually, but itâs cool to see them all next to each other for comparison. Very nice.
1
1
1
1
1
1
1
1
-3
u/mutantdustbunny Jan 18 '23 edited Jan 18 '23
What I didn't know is there was a greater pattern.
3
3
0
0
0
Jan 18 '23
[deleted]
22
2
u/devonatlead Jan 19 '23
Ok one thing I've found gpt3 to be good at is taking description of what you want and spitting out the CSS. CSS really is too much memorization.
2
16
Jan 19 '23
[removed] â view removed comment
7
u/Plorntus Jan 19 '23
It's so pointless haha, they all end up the same, the first frame would be enough for anyone to understand it.
159
u/The_Egg_came_first Jan 18 '23
Source: https://semicolon.dev/tutorial/css/justify-content-examples
Oh my, that's how they made the bouncy animation:
Anyways, here's my quick fix: https://i.imgur.com/PhzeOKq.gif