Тёмный

3 More Life-Changing CSS Tips 

Fireship
Подписаться 3,1 млн
Просмотров 205 тыс.
50% 1

Learn 3 awesome CSS tips and tricks submitted by viewers like you. Watch the original Top Ten CSS Pro Tips 👉 • 10 CSS Pro Tips - Code...
#css #tips
00:00 Responsive relative units
00:58 The ch clamp trick
01:28 HSL color magic
02:25 Scroll padding quick fix
Character Clamp Trick web.dev/min-max-clamp/
Yay, my comment was featured as a tip!
Send an email to "helloATfireship.io" from the same account used to comment. I will respond with a form to redeem the shirt.
Or DM me on slack fireship.page.link/slack
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font

Наука

Опубликовано:

 

21 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 323   
@david-mata
@david-mata 3 года назад
Scroll-padding is gold 🔥
@9kopb
@9kopb 3 года назад
For sure👍
@wolverine4489
@wolverine4489 3 года назад
don't forget to add scroll-behavior: smooth; on the element for smooth scroll animation. one line of css, no js needed!
@xeon7879
@xeon7879 3 года назад
@@wolverine4489 Sadly, scroll-behaviour: smooth is not supported by safari yet.
@CoryTheSimmons
@CoryTheSimmons 3 года назад
Can someone make a CodePen of this? I can't get it working. -_-
@david-mata
@david-mata 3 года назад
​@@CoryTheSimmons Sure, I added the property to the html, body tags a higher value than the fixed nav height codepen.io/dv-mata/pen/JjEZWdM
@skyracer-mk8hg
@skyracer-mk8hg 3 года назад
Those 3 guys after getting in the video and also winning a shirt gotta be proud of themselves
@precumming
@precumming 3 года назад
I am 😸
@skyracer-mk8hg
@skyracer-mk8hg 3 года назад
@@precumming you are ;)
@bloodbrothers1313
@bloodbrothers1313 3 года назад
@@skyracer-mk8hg he is!
@precumming
@precumming 3 года назад
@@bloodbrothers1313 She is
@nsharma4981
@nsharma4981 3 года назад
Getting my first comment on this channel featured in a video is nothing short of an honour, so hell yeah I'm proud! Also, not a guy :)
@ste-fa-no
@ste-fa-no 3 года назад
@Fireship giving credit to their viewers as collaborators, AND giving them a free T-shirt: wholesome 🧡
@justoffy.535
@justoffy.535 3 года назад
100 seconds of Haskell! 100 seconds of Heroku! 100 seconds of Bootstrap! Thank you of you choose any of these!
@shk8089
@shk8089 3 года назад
100 seconds of Rust would be cool too
@justoffy.535
@justoffy.535 3 года назад
@@shk8089 I wanted to write that too but i saw someone already asking for it so I didn't write it in.
@MrTyty527
@MrTyty527 3 года назад
100 seconds of Haskell PLEASE ~~~
@justoffy.535
@justoffy.535 3 года назад
@@MrTyty527 I said haskell because I heard about it but i never seem to understand it.
@lars2299
@lars2299 3 года назад
HEROKU! Bootstrap too...
@WilsontheWolf
@WilsontheWolf 3 года назад
Can't have enough css tips.
@Probler
@Probler 3 года назад
me clicking on this video faster than the speed of light,
@semrasipal7679
@semrasipal7679 8 месяцев назад
😊
@krtirtho
@krtirtho 3 года назад
Is this a problem or a blessing?! Why do I like each & every video of Fireship?
@Kevin-jc1fx
@Kevin-jc1fx 3 года назад
Congratulations, you have a good taste for quality content.
@KevinVandyTech
@KevinVandyTech 3 года назад
* { display: none; }
@richardd9634
@richardd9634 3 года назад
This channel is the gift that keeps on giving and quite honestly the most informative one I've ever subscribed to. Thank you so much for all the incredibly useful content!
@Nerwesta
@Nerwesta 3 года назад
HSL is a life saver when you want to enter to the realm of theming in CSS via custom properties, just tweak your hue / lightness / saturation on your root variable or even better if you want to "darken" / " lighten " something ( for instance on a :hover button ) just like the Sass function, you can do those aswell. No need to add an extra hex color property, it increases maintainbility in a large margin. Highly recommend this !
@felixenghofer4616
@felixenghofer4616 3 года назад
I actually noticed that last problem today at work and wondered how that can be fixed. I'll try setting scroll-padding tomorrow :) Thanks for making such great videos Like this one!
@samkeen
@samkeen 3 года назад
Damn, scroll-padding? That’s insane, I literally needed that today! Thanks!
@dimboump
@dimboump 3 года назад
Holy moly! Thank you for the feature!
@PatricioHondagneuRoig
@PatricioHondagneuRoig 3 года назад
Scroll-padding really was nothing short of life-changing. Keep these videos coming :D
@shivamgavandi2665
@shivamgavandi2665 3 года назад
That last one just fixed my current project. I love my recommendations!
@ash.mystic
@ash.mystic 2 года назад
Great tip! I never knew why this happened and always compensated for it by adding extra margin/padding to the top of the element I was scrolling to. Using scroll-padding-top will be so much better!
@planetmall2
@planetmall2 3 года назад
Love that you use the community for such great updates!
@dominikeitler6180
@dominikeitler6180 3 года назад
A little heads-up to the scroll-padding trick: It doesn't work on Safari and Safari mobile (therefore it doesn't work in iOS browsers at all), so it can't be relied on for websites that should run on mobile as well.
@leoingson
@leoingson 3 года назад
It's CSS, after all.
@jlopezg8
@jlopezg8 3 года назад
Safari is the new Internet Explorer
@escape0707
@escape0707 3 года назад
@@jlopezg8 I second this.
@akash-kumar737
@akash-kumar737 3 года назад
Yup, something is still better than Nothing.
@migueldomingos4570
@migueldomingos4570 2 года назад
@@jlopezg8 Yeah for sure. It took *ages* to finally support the flexbox gap property compared to other browsers
@TheGawel91
@TheGawel91 3 года назад
I love those short videos, nice work as always.
@angelozuniga9766
@angelozuniga9766 3 года назад
you saved my life with that scroll padding thank you so muchhhhh!
@adeelfitness4993
@adeelfitness4993 3 года назад
The scroll padding was something that I needed badly. You saved my life bro
@cristiansuarez1313
@cristiansuarez1313 3 года назад
This is amazing! I'll use them all! Thank you
@MattPolaniecki
@MattPolaniecki 3 года назад
character clamp idea is brilliant. thank you
@Dominik-K
@Dominik-K 3 года назад
Thanks a lot, nice tricks! I'll try to use them in my next project
@danielgiven1264
@danielgiven1264 3 года назад
Currently doing an escape room game project for uni and some of these tips are great, thanks for your help!
@playstore-so2xm
@playstore-so2xm 3 года назад
First of all, thank you very much for saving time with this information. Could you please continue this series at least for another three episodes?
@iskeyrin
@iskeyrin 2 года назад
Scroll pading exploded my mind, thank you
@karamelizesogan
@karamelizesogan 3 года назад
Your videos are truly golden. Condensed gold nuggets.
@adeleke5140
@adeleke5140 3 года назад
Hsl is the best thing I've discovered this year. Phew, it's so easy to understand colors now. I'm definitely gonna be tehjgtour Scroll padding.
@faustinopedrofaustin
@faustinopedrofaustin 3 года назад
I use rem and em all the time, easy way to responsive layouts
@wolfrayet81
@wolfrayet81 3 года назад
WoW!!! i was about to deal with the bug of the 3rd tip! You were just about time :D
@jayantjagtap2976
@jayantjagtap2976 2 года назад
That scroll padding top is a live saver 🔥🔥
@Bog0sso
@Bog0sso 3 года назад
Just coming back to push the like button 🔥💯Thank u for all of these contents
@beckybeck3888
@beckybeck3888 3 года назад
As always great and valuable content. Thank you!
@IshanKesharwani
@IshanKesharwani 3 года назад
Woah !!! That last one was amazing. I had no idea it exists
@aymanehrouch
@aymanehrouch 3 года назад
the hsl tip can save me a lot of time!!! thanks!
@siggy5687
@siggy5687 3 года назад
Pleae keep posting these! Great videos!
@MrRobotUy
@MrRobotUy 3 года назад
Awesome, the first one is the one that I needed!
@AsadIqbal-ee8vu
@AsadIqbal-ee8vu 3 года назад
Thank you very much I will try all these.
@ilijailicic4702
@ilijailicic4702 3 года назад
Your CSS tips are life-saving stuff! =)))
@thomaskhlebovitch6198
@thomaskhlebovitch6198 3 года назад
I don't know whether you also cover some electronics and other stuff, but could you also show 100 seconds of Assembly 100 seconds of Arduino/RaspberryPi 100 seconds of Embedded C And what would be really awesome (that might also take some more time than just 100 seconds) 100 seconds of Clean Code This would be really helpful!
@niteshkrsah2222
@niteshkrsah2222 3 года назад
You contents are really awesome Thank you for your hardwork and free contents.
@olafkliemt1145
@olafkliemt1145 3 года назад
scroll-padding is a real relief
@_modiX
@_modiX 3 года назад
scroll padding will change my life.
@Brunoenribeiro
@Brunoenribeiro 3 года назад
scroll-padding-top is a game changer
@pronayguha7099
@pronayguha7099 3 года назад
rem is really a life saving and scroll-padding will be an interesting one to implement
@MrCalacianu
@MrCalacianu 3 года назад
I find the last one very useful 👍
@osmantas369
@osmantas369 3 года назад
High quality as always. 🔥
@massimo8408
@massimo8408 3 года назад
The last one was very useful
@Rakesh-jz1zf
@Rakesh-jz1zf 3 года назад
Very informative, thanks for the video.
@kettenbach
@kettenbach 3 года назад
Best web dev channel on youtube imo. 😍🙏
@mrbreadman
@mrbreadman 3 года назад
that display: flex tshirt is amazing
@birdbrainsolutions6112
@birdbrainsolutions6112 2 года назад
Before watching: "Meh, it's just css. How life changing could it possibly be?" After watching: "Holy shit, that just changed my life!" lol, thank you so much for creating this video!
@weshuiz1325
@weshuiz1325 3 года назад
Great as always
@alexandrgoncharov5074
@alexandrgoncharov5074 3 года назад
the best channel about tricks
@sambhavjain1104
@sambhavjain1104 3 года назад
Scroll-padding is 🔥
@akifali5929
@akifali5929 Год назад
Awesome tips!
@ErrorSulake
@ErrorSulake 3 года назад
Oh my god the last one os AMAZING, I've spent hours trying to fix that for dynamic header sizes and responsiveness
@skyhappy
@skyhappy 3 года назад
Could you explain what it is exactly, are navbars as big as in the video? are fixed navbars bad?
@precumming
@precumming 3 года назад
@@skyhappy Fixed navbars are standard and while they are evil they are also necessary. Think about applications that aren't browsers, they all (that I have open currently) have fixed content usually at the top sometimes on the side. They can be ignored if the content is more important than navigating around, such as content with reading (also scrolling slightly less). However while there is no hard limit to navbar sizes if it's just navigation and logo then it should be no bigger than 2 or 3 rem (i.e. 1.75rem font size with 0.25em padding); but if you need more complex content fixed (such as for web-apps) you can make them bigger but be conscious about the size and how much space is left for the main content
@iancarr3923
@iancarr3923 Год назад
Great video!
@joaocesarlima7339
@joaocesarlima7339 3 года назад
Wow! I wish I had discovered this ch unit before! Better yet mixed with clamp! :O
@firasnizam
@firasnizam 3 года назад
super like, this saves tooooo much time
@MaxProgramming
@MaxProgramming 3 года назад
200 likes and 0 dislikes. You are a true legend!
@Glavin883
@Glavin883 3 года назад
The scroll padding trick has just saved me from writing my standard jQuery click events to handle the same problem
@sm7085
@sm7085 3 года назад
more of these videos, please! :D
@Alexey-Yoshimitsu
@Alexey-Yoshimitsu 3 года назад
Классные советы, моя жизнь изменилась до неузнаваемости, спасибо вам
@lucasfelipe-ze5sy
@lucasfelipe-ze5sy 3 года назад
Thanks! Please, make more css videos
@alexander5456
@alexander5456 3 года назад
Thanks a lot!
@MindlessTurtle
@MindlessTurtle 3 года назад
Not gonna lie. Those are good tips.
@gushekel
@gushekel 3 года назад
Amazing ... simply amazing
@jenniferward6821
@jenniferward6821 3 года назад
Love the para one
@lakshaysharma10
@lakshaysharma10 3 года назад
Scroll padding changed my life
@orangeyt2262
@orangeyt2262 3 года назад
amazing. thanks
@sudeepkumarsatpathy6104
@sudeepkumarsatpathy6104 2 года назад
I wish I could tag N Sharma to thank him personally for this scroll-padding tip! And thank you Fireship for this compilation! Cheers! :)
@m3po22
@m3po22 3 года назад
The first tip is what I started doing after 2 years of web development. I liked to design while working in CSS and `em` units just made it easier to change things around.
@m3po22
@m3po22 3 года назад
If you're making a component library for external consumption, DO NOT USE REM UNITS.
@AdarshSingh-qd6mq
@AdarshSingh-qd6mq 3 года назад
Scroll-padding was new for me...👍
@precumming
@precumming 3 года назад
Same, had no idea it existed. Here I was adding a nonsense element with the id using position relative to scoot it up.
@AdamsTaiwan
@AdamsTaiwan 3 года назад
I prefer the hex format, because I store color strings in a DB and also can share nicely with WPF.
@robertotonino2916
@robertotonino2916 3 года назад
Great video as always! Is there a store where we can buy that t-shirt? 👀
@adamgonzales8677
@adamgonzales8677 3 года назад
First time I've heard of scoll-padding
@ilstar94
@ilstar94 2 года назад
Thanks!
@jebenobesmrtanbatica8085
@jebenobesmrtanbatica8085 3 года назад
i love css so much
@goldenekpendu
@goldenekpendu 3 года назад
This was amazing
@ashkanahmadi
@ashkanahmadi 3 года назад
Would be cool if someone made a video or compiled all those css tips in the comments of the previous video
@darshannaik8558
@darshannaik8558 2 года назад
To center a element use display : grid ; along with place-items:center ;
@bobbysilver272
@bobbysilver272 2 года назад
Nice tips.
@somebrid2147
@somebrid2147 3 года назад
Congrats to the people with the free T-Shirts.
@itsjoseluis
@itsjoseluis 3 года назад
This just saved me 20+ hours
@realgarmingo
@realgarmingo 3 года назад
Real Pro's center things horizontally with the tag
@vysanthskurup4374
@vysanthskurup4374 3 года назад
Thanks ❤️❤️
@mukulkumarbairwa2470
@mukulkumarbairwa2470 3 года назад
It really helpful
@AshishDha
@AshishDha 10 месяцев назад
thanks!
@Mohamed-nt2hf
@Mohamed-nt2hf 3 года назад
100 second of *ssg* (Static Site Generation)
@harmez7
@harmez7 Год назад
thank you
@hillcountrydev
@hillcountrydev 3 года назад
these are golden. eternal hails !
@Viralvlogvideos
@Viralvlogvideos 3 года назад
please make a video on most used css elements
@albirtarsha5370
@albirtarsha5370 3 года назад
Thank you for scroll-padding! I had a less elegant work around.
@albirtarsha5370
@albirtarsha5370 3 года назад
I take it back. Scroll-padding is not so great. I thought it could be used for a fixed nav-bar to navigate to content that is parsed into sections of unequal size. My work around still reigns supreme.
@corentinvalleroy3816
@corentinvalleroy3816 3 года назад
Can you do a video about Dapps, web3 and the techno around it?
@verified_tinker1818
@verified_tinker1818 3 года назад
100 seconds of Heroku sounds good! Also 100 second of Rust, if it's used in the web field.
@MM-vr8rj
@MM-vr8rj 3 года назад
Often you still need media queries for things like font-sizes despite using REM or EM or even VH/VW but I can imagine that it takes more media queries if you use PX
@kkbadshah7
@kkbadshah7 2 года назад
clamp is really helpfull
@tranquillityEnthusiast
@tranquillityEnthusiast 3 года назад
Nice info...
Далее
10 CSS Pro Tips - Code this, NOT that!
9:39
Просмотров 2,1 млн
100+ Web Development Things you Should Know
13:18
Просмотров 1,4 млн
Kumpir (Loaded Potato)
00:22
Просмотров 1,3 млн
АНТИГЕЛИК ПРОТИВ ГЕЛИКОВ
00:42
Просмотров 97 тыс.
25 VS Code Productivity Tips and Speed Hacks
11:35
Просмотров 2,2 млн
7 CSS Techniques That I Use the MOST!
11:04
Просмотров 124 тыс.
Tailwind CSS is the worst…
3:55
Просмотров 1,3 млн
3 modern CSS techniques for responsive design
14:32
Просмотров 209 тыс.
6 things I wish I knew about CSS when I started
9:09
Просмотров 223 тыс.
JavaScript for the Haters
2:50
Просмотров 1,4 млн
🤖Вернулись в ПРОШЛОЕ🤪
0:28
Просмотров 97 тыс.