The Secret Science of Perfect Spacing - PART 2

  Рет қаралды 18,506

Chainlift

17 күн бұрын

That's right folks, we're back with Spacing Part 2: THE SPACENING. If you thought the last one was way too much, you haven't seen nothin' yet. This video goes into the details of how relative scaling works, plus a peek into the formulas behind common use cases such as card padding, buttons, and list items.
This week, we dive headfirst into something I think about way too much: spacing. Spacing is what gives UI's that "oddly satisfying" feel when done right, and that "something's off" feeling when it's done poorly. How do you design spacing correctly? Should you use a framework? Let's find out!
Join the CSS Beta!
www.chainlift.io/join-liftkit-css-beta
Join the Figma File Waitlist!
www.chainlift.io/sign-up-for-notifications
LiftKit Webflow Cloneable Here:
webflow.com/made-in-webflow/website/liftkitui
Download Chainlift Color from Webflow:
webflow.com/apps/detail/chainlift-color?category=productivity-language
Questions, Collab Inquiries:
info@chainlift.io

Пікірлер: 81
@dprophecyguy
@dprophecyguy 17 күн бұрын
I would happily purchase a course where you talk about science of the topics behind all the design fundamentals rather than tooling like figma. As an engineer it would be so helpful the develop an eye for the design.
@itekenaiyowuna4965
@itekenaiyowuna4965 17 күн бұрын
Can you pay for me also, I'm not trolling
@SumitRana-life314
@SumitRana-life314 16 күн бұрын
He did say he was doing something similar in Patreon in first video.
@chainlift.official
@chainlift.official 10 күн бұрын
@@SumitRana-life314 I actually decided I'm not gonna do a course, I'm just gonna publish everything for free. I don't think knowledge should come at a premium.
@mayanksharma6927
@mayanksharma6927 10 күн бұрын
@@chainlift.official that's very kind of you
@SumitRana-life314
@SumitRana-life314 9 күн бұрын
@@chainlift.official that's amazing man. Don't hesitate to pay wallet something if you feel you might need to. But if you are fine with money, then what you are currently doing is amazing. Keep up
@dprophecyguy
@dprophecyguy 17 күн бұрын
Would love to see a similar one for science of "Layouts / Wireframes", "Colors", "Typography"
@chainlift.official
@chainlift.official 17 күн бұрын
For sure, I need a break from spacing haha
@itekenaiyowuna4965
@itekenaiyowuna4965 17 күн бұрын
The tutor understands design systems very well. This channel has a promising future. I'm glad I found it.
@Theoderic
@Theoderic 17 күн бұрын
Normally I’m not a huge fan of watching design tutorials, but your last 2 videos about spacing are one of the best design videos i’ve ever watched. Really appreciate the effort! 🎉❤
@josalejolo
@josalejolo 17 күн бұрын
Man! Your videos are always so satisfying to watch. I’ve been waiting this video since part one. I was so amazed by the quality of your videos and the animations and overall the knowledge you are able to provide so effortlessly. It simply amazing thank you very much for your hard work and for teaching us this incredible stuff.
@chainlift.official
@chainlift.official 17 күн бұрын
That's very kind of you to say! I'm so glad you like it!
@HerroEverynyan
@HerroEverynyan 17 күн бұрын
This is one the best videos on spacing that I've ever seen. Thanks so much!
@NopeNopeNope9124
@NopeNopeNope9124 17 күн бұрын
6:15 Square rooting a number is the same as taking it to the power of 1/2, so it literally is a half step, but with the notation of square root it obfuscates that property. Let's remember exponentiation by some number is repeated multiplication when positive, and repeated division when negative. If you have 3 steps up from your constant font size, c, you can represent it with the formula [c * φ^3] which is equal to [c*φ*φ*φ]. A half-step up from there would be [c * φ^3.5], equal to [c*φ*φ*φ*sqrt(φ)], and a half-step down would be [c * φ^2.5], equal to [c*φ*φ*sqrt(φ)]. Then a quarter step would be adding or subtracting 0.25 to or from the exponent to go up or down respectively, etc. You can see taking two half-steps with this in mind is equal to a full step. Going to negative values of s, all you do when expanding the exponent is to replace your mult signs with div signs, so [c * φ^-2.5] = [c/φ/φ/sqrt(φ)] Hopefully with this in mind while looking back at the chart your present, you can see how expanding [c * φ^s] to its component multiplications or divisions, it shows each step being performed, as well as that s is the number of steps from your constant font size, c, you've taken. Two half steps is equal to a full step despite the unintuitive choice of notation your source used, which can make it confusing. Basically adding or subtracting 1 to or from s is a full step, 0.5 a half step, etc. Great video btw, I just wanted to share what I found a more intuitive way of getting the math behind why its like that lol, hopefully it will translate to others too
@chainlift.official
@chainlift.official 17 күн бұрын
This hurt my English major brain but thank you
@NopeNopeNope9124
@NopeNopeNope9124 17 күн бұрын
@@chainlift.official You can still learn and understand it, trust me, doesn't matter your major, you can learn any new topic. I recommend that for the sake of your front end web dev design brain to make things easier on itself by brushing up a bit on that kind of stuff, it doesn't pop up often but it's mostly just applying high school algebra rules, so you'll probably have at least a decent place to start up on it again. Imo it'd make it easier for you in the long run where this stuff pops up in this line of work, generalizing these kinds of rules with some intuition, rather than remembering each rule like this in web design like individual weird thingies that dont really make sense. I'm sure you've had times where a general concept in English helped with what seemed like many independent unique problems, but learn the general concept, and boom, suddenly they all make sense.
@chainlift.official
@chainlift.official 17 күн бұрын
@@NopeNopeNope9124 Well luckily when developing the utility class abstract all of this away, but I get what you're saying.
@smithrockford-dv1nb
@smithrockford-dv1nb 17 күн бұрын
I see so much potential in your channel. Not only are you full of knowledge, the manner in which you explain it is also phenomenal. I wish you all the best. I'm eager for a full "design course" with this much detail if you have the time!
@chainlift.official
@chainlift.official 17 күн бұрын
God have mercy on my blood pressure I don't know if I'm ready for that haha
@Hamza-lf9ek
@Hamza-lf9ek 17 күн бұрын
yaaaaaaas you cannot believe how excited i got when i saw that it’s part 2. thank you you’re the best ❤❤❤❤
@thepro4805
@thepro4805 17 күн бұрын
this is incredible! very enriching but also accesible and intuitive!
@shannons1886
@shannons1886 17 күн бұрын
This is awesome. You have a great delivery.
@imagineabout4153
@imagineabout4153 16 күн бұрын
Thank you I need this. You are a life saver, and btw incredible video editing skills!
@krishc.8980
@krishc.8980 16 күн бұрын
this quality is so insanely good
@rammrras9683
@rammrras9683 16 күн бұрын
These videos are very useful to me. I don't use CSS since I'm developing HMI screen interfaces (kinda GUI applications) but find the lessons here to be pure gold. Thanks
@andreas-at
@andreas-at 17 күн бұрын
an eye pleasing perfectionst video :) Thank you! I have learned something new as a UI Designer
@anshulsingh8326
@anshulsingh8326 3 күн бұрын
Man see correct spacing man happy
@andrewtran9870
@andrewtran9870 17 күн бұрын
hell yeah, part 1 was so good, glad to see a part 2
@chainlift.official
@chainlift.official 17 күн бұрын
Thank you so much!
@EyoBashboody
@EyoBashboody 17 күн бұрын
I won't try to understand everything you said but positively, E01 & E02 definitely improved my eye for Design. Thanks ❤.🇺🇬
@walkastray007
@walkastray007 17 күн бұрын
4:51 I see the secret sauce. 1.618 the golden ratio 😏 it's crazy how it just works but super effective. I saw your previous video and really really liked how you showed visual examples such as the one where you showed changing the font size of the browser and how that affected seemingly two identical cards. It's so subtle but super effective when it comes to understand.
@ThatGuy-jc2ow
@ThatGuy-jc2ow 17 күн бұрын
Awesome tutorials, pls continue making more
@igrb
@igrb 17 күн бұрын
I appreciate all the thought that went into the system, the optical corrections really show the attention to detail; The programmer in me isn't used to using ems instead of rems, but I see where you're coming from, very fun to think about how I'd put this system into code, especially now that I can look at the global css and compare great stuff
@chainlift.official
@chainlift.official 17 күн бұрын
The programmers I've worked with have been more like "why did you do this to me" than "oh wow neat" so thanks! Haha
@unadventurer_
@unadventurer_ 16 күн бұрын
Let's goooo! I love this channel so much. You're an excellent teacher.
@chainlift.official
@chainlift.official 16 күн бұрын
Thanks so much!
@kipchickensout
@kipchickensout 16 күн бұрын
Splendid.
@abhishekparmar4983
@abhishekparmar4983 6 күн бұрын
Just wanna appreciate the effort!
@bhargavzantye7688
@bhargavzantye7688 17 күн бұрын
please make more videos like this that is video related to "fundamentals of design" these videos actually provide value to the viewers and in return, you will gain a lot of subscribers
@chainlift.official
@chainlift.official 17 күн бұрын
What would you consider fundamentals of design?
@FlyingPenguino
@FlyingPenguino 14 күн бұрын
Careful when using relative spacing on inline padding (left, right sides) --- when the user increases the font size, relative inline padding might reduce the available space for the content - sometimes resulting in broken layouts.l
@Jolli_-is7oo
@Jolli_-is7oo 16 күн бұрын
KEEP POSTING CONTENT!
@chainlift.official
@chainlift.official 16 күн бұрын
I WILL
@mustafa_el-rashied
@mustafa_el-rashied 17 күн бұрын
helped me making my site!
@xetto
@xetto 17 күн бұрын
amazing video!! you're very underrated :)
@chainlift.official
@chainlift.official 17 күн бұрын
Thank you!
@user-lw5nl9dj7u
@user-lw5nl9dj7u 17 күн бұрын
Oh god. Its been forever since I havent seen one of these high queality UI explanation
@ste-fa-no
@ste-fa-no 4 сағат бұрын
I see φ, I like it 💙
@arisweedler4703
@arisweedler4703 15 күн бұрын
2 musical half steps equaling a whole step in music is multiplicative, too!! Each half step multiplies the frequency of the previous note by the 12th root of 2. (Just so you get 12 notes in an octave, which is 8 notes on a scale but 12 half steps). A whole step is two of these multiplied in succession, not added then multiplied :) So calling it a half step is totally correct!!
@chainlift.official
@chainlift.official 14 күн бұрын
I knew that if I just kept making haphazard decisions I'd be right!
@yubtubtime
@yubtubtime 17 күн бұрын
Really excellent system! I've been hacking out CSS that kinda' sorta' *approximates* some of these ideas for years, but your system is so much clearer than the way I've been thinking about it. I avoid Material UI, et al, because those little inconsistencies drive me nuts, and then I end up having to rewrite half of the components anyway just to suit the specs. I usually just fiddle with the line-height of all my heading classes to achieve the equivalent optical correction, for example, but dividing the padding by the line-height feels so much more natural! Also, personally, I think those Apple and Material UI buttons look like trash, and I'm honestly kinda' shocked how bad Apple's looked in particular. I haven't used a design system other than my own, by choice, in almost a decade, but seeing that LiftKit button sold me. Using padding-top as the border-radius also seems clever, so I'd be especially interested to see how you deal with nesting rounded borders! That's a problem that I keep meaning to solve in a clever way, but then I keep finding myself manually adding distances and inner/outer radii (which might just be unavoidable). Keep up the great work! 🙌
@greatguy3952
@greatguy3952 17 күн бұрын
.1:59 was trippy to see yet fun to read.
@MosheKashani
@MosheKashani 17 күн бұрын
Gonna have to learn figma now. I’ve always been brut forcing in photoshop and manually aligning elements pixel by pixel. There’s something to be said for photoshop though, you always know where your pixels gonna be, they don’t move on you.
@chainlift.official
@chainlift.official 17 күн бұрын
Haha you may find Figma less different than you're expecting. It uses pixels, not relative units.
@iJuce
@iJuce 14 күн бұрын
WE WANT MOREEEE!!!!
@chainlift.official
@chainlift.official 13 күн бұрын
AHHHHHHH
@alexgambon
@alexgambon 17 күн бұрын
Excellent video, and validating too, because I always work in relative units. I'm very familiar with Tailwind, and use it a lot at the moment with React/Svelte/JS. When would I use Liftkit over Tailwind? Do they have different use cases? Are they compatible? Should I use both?
@chainlift.official
@chainlift.official 17 күн бұрын
You should use LiftKit instead of tailwind when you're ready to have a terrible time haha. One day LiftKit will be able to compete with tailwind. For now tho? Just use it with low stakes landing pages.
@Pablowatch
@Pablowatch 17 күн бұрын
The topic is extremely important, but I didn’t understand most of in depth formulas, sadly
@chainlift.official
@chainlift.official 17 күн бұрын
You don't have to! They're just there for the nerds who wanna know. The utility classes do everything for you
@hyperadapted
@hyperadapted 17 күн бұрын
I really love the mathematical approach. What is the technical term if I want to know more from literature? Edit: the phi indicates that its all somehow related to golden ratio. As a math head I'd appreciate more background info, suggestions for literature or more videos of that type. Thanks!
@chainlift.official
@chainlift.official 17 күн бұрын
There isn't really a word for this. You can just look up relative units! That's a good start
@sumitpurohit8849
@sumitpurohit8849 17 күн бұрын
Can you please compare tailwind to chainlift. isn't tailwind super good already in spacing?
@chainlift.official
@chainlift.official 17 күн бұрын
The biggest differences are this: tailwind is based on a 1.25 scale factor, LiftKit is 1.618. tailwind is huge, LiftKit is small. Tailwind says "build it your way!" LiftKit says "build it this way!"
@AmnaGhafoor-gs1lm
@AmnaGhafoor-gs1lm 14 күн бұрын
Good video Please bro, How to integrate Firebase with Webflow by web flow logic and using Firebase cloud function and HTTP request
@kishirisu1268
@kishirisu1268 15 күн бұрын
I had project manager who fall in rage every time he saw margin bottom used in project code. A am happy that no longer work there..
@aleksdizhe
@aleksdizhe 14 күн бұрын
Make more vids!!!
@user-mk6op8qz7f
@user-mk6op8qz7f 16 күн бұрын
Thanks and good video, How to send data [like image, product name, price and description I mean product detail ] in Firebase from webflow. How to integrate Firebase with Web Flow using Webflow logic and Webhooks step by step. Please reply me whether you will make video or not on this topic, I hope next video will be on this topic. Please upload video early
@MAVrikrrr
@MAVrikrrr 7 күн бұрын
looks like utility classes (spaces) values for .display1, .body and all other text classes are wrong. How come "m" for body is more than "m" default? Weren't we supposed to decrease vertical spacings to compensate line-height?
@chainlift.official
@chainlift.official 5 күн бұрын
Body's got a taller line height, that's all.
@chainlift.official
@chainlift.official 5 күн бұрын
And the text values aren't wrong they're correcting for the fact that when you apply margins to text elements the "em" is based on the element itself's font size, not the parent element. On a non text element you can just apply a margin of 1em and it's also 1rem right? Because it's inheriting the font size from the :root. Therefore, 1em = 1rem. But if a text element has a font size of 1.272em, and I apply a margin of 1em, it's going to calculate that 1em based on the font size of the element itself, NOT the parent, meaning instead of being 1It's an exception to the rule baked into CSS. So adding a margin of 1em to that text element will actually look the same as 1.272rem, not 1rem.
@MAVrikrrr
@MAVrikrrr 4 күн бұрын
@@chainlift.official ok, if you add "m" margin to non-text element, it will be 1em = 1rem, it's clear. But if you add "m" margin to ".display1" element, according to the table, it will be 1.618em. And ".display1" has a font-size of 4.235em. Math is like this: 1.618em margin to 4.235em font-size results in 1.618 * 4.235 = 6.852rem. But the intention was to make "m" margin of ".display1" to equal 1rem, not ~7rem. I am having hard time understanding that. Whether there's an error in your table, or there's something I misunderstand fundamentally. And why all the other text elements have the same spacing values, while they have different font-sizes? Why only "line-height" matters? "em"s are calculated based on font-size, not line-height. By the way, if we really want all margins sizes to be consistent, why do we complicate things with "em"s? Why don't we just define all the margin sizes in "rem"s?
@MAVrikrrr
@MAVrikrrr 4 күн бұрын
@@chainlift.official I think I got the table values meaning, it's not the actual margin value, it's the effective margin size if we do not correct it at all? But again, it's calculated based on line-height, which is relevant to font-size. And line-height does not matter, only a font-size matters for "em"s. My initial understanding was that you try to compensate line-height extra spacing, so the actual margin won't be affected by line-height. Now I see that intention was to provide margin sizes consistency for all the text elements. But still, doesn't look right to me.
@chainlift.official
@chainlift.official 4 күн бұрын
@@MAVrikrrr yeah, it's still only version one after all, I appreciate you pointing this kinda thing out though so I can stay open minded about how it'll evolve from here.
@AnisD756
@AnisD756 17 күн бұрын
Man you're (√π * crazy) but I like it.
@chainlift.official
@chainlift.official 17 күн бұрын
I aspire to be the let's game it out of UI design
@Lolwutdesu9000
@Lolwutdesu9000 17 күн бұрын
Ah, I see you took my advice and finally explained the rationale behind your spacing. See? It wasn't that hard, was it? I'm actually kinda flattered, too. Keep up the good work, my zesty brother. 😊
@bambi747
@bambi747 16 күн бұрын
I kinda hate how you just casually drop in here on youtube like the new kid and then just release these perfect videos like it was nothing; how dare you
@chainlift.official
@chainlift.official 16 күн бұрын
just imagine my anime backstory
@ectn26
@ectn26 17 күн бұрын
I now have developed OCD after watching this