Top 10 CSS One Liners That Will Blow Your Mind

  Переглядів 877,151

developedbyed

developedbyed

День тому

🚀 Upgrade your web development skills with my courses: developedbyed.com/
In today's episode, I will show you some of my favourite CSS properties out there. These cool css tips and tricks will help you upgrade your website to the next level. This list contains some CSS tricks and properties that you may not know of.
💡 If you want to learn more about React, check out my channel for more React tutorials and you can find React courses on my website. developedbyed.com
🛴 Follow me on:
Twitter: / developedbyed
Github: github.com/developedbyed/
Instagram: / developedbyed
#css #programming

КОМЕНТАРІ: 583
@zachjensz
@zachjensz Рік тому
0:45 1. Vertical Text 1:23 2. Gap 2:07 3. Flip an Image 2:36 4. Smooth Scrolling 3:25 5. Scroll Snapping 5:54 6. Resize Everything 6:50 7. Truncate 7:44 8. Text Gradients 8:55 9. Object Fit 10:32 10. Pointer Events
@_diplomata
@_diplomata Рік тому
Thanks man, I hate videos that dont have predefined timestamps
@waleedsharif618
@waleedsharif618 Рік тому
Thanks
@jenstornell
@jenstornell Рік тому
Me too. I'll never go back to this channel again.
@renegroulx7029
@renegroulx7029 Рік тому
Zach Jensz reminds me of the guy that I cheated off during test in high school.
@samsg
@samsg Рік тому
📖 scroll css
@kwanele_dev
@kwanele_dev Рік тому
the funniest thing is I discovered "gap" by myself. I didn't want to use margin on my flex items, and I just thought of "gap", wrote it down and it worked 🤣🤣🤣
@itz-electro
@itz-electro Рік тому
If only all programming was like this
@AkumaTheGreat
@AkumaTheGreat Рік тому
Damn 🔥
@arshadtbuchori5000
@arshadtbuchori5000 Рік тому
Aint no wayyy. Wished i found out that way 😂
@PaulMcCannWebBuilder
@PaulMcCannWebBuilder Рік тому
@Tris gap works in Safari, caniuse just says it doesn't work in multi-column.
@kingnonnnnn
@kingnonnnnn Рік тому
@@user-jg6yz7wq3j not true! safari supports gap since version 10+ inside display grid elements. and since 14.1 inside flex elements.
@bancroftberlin
@bancroftberlin Рік тому
"Boom, you are in the UK, bitch 😂!" You won't hear that on many other coding channels and I love it.
@garrysyt8461
@garrysyt8461 Рік тому
😂😂😂
@devrd5
@devrd5 Рік тому
He's real
@equious8413
@equious8413 Рік тому
Yup. Definitely rewound. Lol
@MatichekYoutube
@MatichekYoutube Рік тому
UK AND all of the former colonies :D
@krupapanchal9908
@krupapanchal9908 Рік тому
1. Vertical Text => writing-mode 2. Flex-Gap => gap 3. Flip an image => transform: scaleX(-1) 4. Smooth Scrolling => scroll-behaviour: smooth 5. Scroll Snapping => scroll-snap-type: x mandatory; scroll-snap-align: center; 6. Resize Everything => resize: both | vertical | horizontal; 7. Truncate => --webkit-line-clamp: 1; 8. Text Gradients => --webkit-background-clip, --webkit-text-fill-color 9. Fix image stretching issue => object-fit;
@andycrazy120
@andycrazy120 Рік тому
交个朋友
@ghaznavipc
@ghaznavipc Рік тому
10. Prevent from selecting => pointer-events: none;
@andycrazy120
@andycrazy120 Рік тому
@@ghaznavipc 交个朋友
@ghaznavipc
@ghaznavipc Рік тому
@@andycrazy120 What do you mean by "To make friends"? (I translate your comment in google translate)
@andycrazy120
@andycrazy120 Рік тому
@@ghaznavipc Meet and make friends
@developedbyed
@developedbyed Рік тому
Let me know your fave css tricks that people might not know!
@techy_nidhi
@techy_nidhi Рік тому
Vertical text 🤩🙌
@sbw94
@sbw94 Рік тому
Hey, can you update the link for the "Full Course Content" inside the JavaScript and HTML course? The Google Drive link goes to a 404 google drive page. Thanks!
@pawegabski5422
@pawegabski5422 Рік тому
display: none; 😂 boom
@HtopSkills
@HtopSkills Рік тому
writing-mode
@evgenyurazovsky
@evgenyurazovsky Рік тому
*{margin:0;padding:0}
@obed.raimundo
@obed.raimundo 8 місяців тому
Love these! I've used a good few of these but the other ones are new to me. Thanks for these!!
@ShadowVipers
@ShadowVipers Рік тому
At the end of the video if you're just trying to stop the user from selecting the text (and seeing the text cursor), then "user-select: none" would be more appropriate than "pointer-events". Using "pointer-events" would be more for stopping a user from clicking an input, like a button or a text field, etc. The "pointer-events" property also has the side-effect of preventing the inspection click (Shortcut: "ctrl+shift+c") from opening in the dev-tools console (at least on Chrome) which if you're developing a website can get a bit annoying. I also saw in another comment that "pointer-events: none" also prevents hover effects, right click context menus, etc. Something slightly unrelated but still important that I wanted to share is: Do not use "pointer-events: none" instead of the "disabled" attribute on an input. This is because while it does prevent mouse/tap events, it doesn't affect keyboard navigation So if you're building a website with accessibility in mind it's important to consider that people can focus in on the input with their keyboards.
@domenicpolsoni8370
@domenicpolsoni8370 Рік тому
You just saved me from having to write out some JS to handle object fade in transitions. I've always had to observe animationend or transitionend events in order to manipulate the display: none style. I've been doing this for quite some time now. Thank you so much!
@monoffo
@monoffo 11 місяців тому
In case you are using react, I suggest you take a look at CSSTransition npm package. It simplifies animations a lot by applying different subclasses during the animation, and it allows to combine display: none with any transition very easily. However, I am sure that even outside react and npm there are plenty of similar solutions, so check it out
@djs1258
@djs1258 Рік тому
Man, Ed been long time watching back your course videos..... Good to see the excitement and cool work of yours continuing consistently
@PaulMcCannWebBuilder
@PaulMcCannWebBuilder Рік тому
As a tip for text gradients (No. 8), order matters in your rule: set the background first, then clip. Or don't use the 'background' shortcut (gradients are set with background-image).
@NNNedlog
@NNNedlog Рік тому
Hello dev Ed! I really enjoyed your react portfolio website course with TailwindCSS. I'm almost done with mine and I'm so glad I found your videos
@user-rm7yc3uu6n
@user-rm7yc3uu6n 8 місяців тому
I love the last part with the gradient animation text im gonna have to steal that idea my friend great work
@davidvideauortega287
@davidvideauortega287 Рік тому
This video is AMAZING. So many cool tricks! I think I need more of these kind of videos.
@rgdayo
@rgdayo Рік тому
These were awesome Ed! As a full-stack dev on some legacy systems I usually loathe dealing in the CSS but these proved to me that not everything has to be difficult. I just need to keep learning.
@liver17
@liver17 Рік тому
Is CSS legacy stuff?
@SirZyPA
@SirZyPA Рік тому
not sure what you mean by legacy systems in a css context? and if you mean stylesheets that use float layouts, ususally those are pretty easy to just change into modern options like flex, grid, etc.
@Alexandra-ou1gl
@Alexandra-ou1gl 11 місяців тому
Great content man, you explain everything in a way thats easily understood and show plenty of visuals. My go to source for all things coding related!
@techyysensei
@techyysensei Рік тому
You made my day!! Learned so much productive today!! Thank you so much man
@ArneBab
@ArneBab Рік тому
object-fit: cover - that one and scroll snapping were new to me. Thank you!
@archer201977
@archer201977 Рік тому
Glad i found this video, thanks man! on my 13years of web development still there are tons of things that I never knew.
@paulmathew1214
@paulmathew1214 Рік тому
Thanks! The text gradient styling is super cool. I already found a use for it!
@makubex9087
@makubex9087 Рік тому
It really worked for me after I look and try some tutorials, yours is the one that worked. Owe you a lot.
@protopan7722
@protopan7722 Рік тому
love the new video quality man!!!
@TomasMisura
@TomasMisura 4 місяці тому
Thank you for this video and that very useful tips! From this list I know only gap and have learned using it as much as possible. liked and subscribed!
@KrisHoja
@KrisHoja Рік тому
Super cool video - please do more of these!
@perioni
@perioni Рік тому
these are really helpful. ill save this video for a time in need. thanks bro.
@felipesdam
@felipesdam Рік тому
If it weren't this video I could spent so much time to solve a task. Thank you for sharing this content. Scroll snapping blow up my mind. It helped a lot.
@david0pi
@david0pi Рік тому
THAT SMOOTH SCROLLING ONE IS SO PERFECT.
@jaidendechon7960
@jaidendechon7960 Рік тому
Great stuff! Thanks for making this!
@thescribblersdiary
@thescribblersdiary 7 місяців тому
loved it sir! Didn't know most of them !!!! Thanks a lot sir
@AlexUnderCMYK
@AlexUnderCMYK Рік тому
Knew them all but had a great time anyway! Subscribed!
@kurdi_x5842
@kurdi_x5842 Рік тому
you have been so useful during my html learning
@JIu4Ho
@JIu4Ho Рік тому
Just started learning front-end on bootcamp and this video is so cool and makes me wanna use all these tricks
@Mport-UK
@Mport-UK Рік тому
Good video mate as per! The only one I didn't know was Text Gradients. Only ever used as a background Image.
@visualdisorder
@visualdisorder 7 місяців тому
Hey Ed! What is the vs code theme you were using in this video?
@epicdungeontiles
@epicdungeontiles 11 місяців тому
Loved all of these!
@jahirnoriega6103
@jahirnoriega6103 Рік тому
Man love the videos keep going ❤💪🏽
@user-ic4cd6vl5c
@user-ic4cd6vl5c Рік тому
This was so helpful!! Thank you
@BalachandranSumathiB
@BalachandranSumathiB 8 місяців тому
Can we use resize for tables? To resize columns and rows manually
@webdevcoursestv
@webdevcoursestv Рік тому
I subbed! I love these kinds of CSS tricks. I should make it a cheat sheet! I always get a strong Loki (not the marvel version) from you :D
@thepretzelball
@thepretzelball Місяць тому
Very useful video. I stumbled upon this video and helped me solve an issue with text-truncation I was having.
@stephanmoolman328
@stephanmoolman328 Рік тому
I keep coming back to this video, awesome tips
@baconchaney
@baconchaney Рік тому
Can't believe I didn't know about flex-gap! Very helpful and honestly would have saved me lots of frustration
@NiceChange
@NiceChange 6 місяців тому
This is such a great resource. Cheers
@ebrelus7687
@ebrelus7687 Рік тому
Whole lot of cool stuff. Appreciated
@fatimahkhan9367
@fatimahkhan9367 Рік тому
This is really helpful Thanks Guy
@BenDemeyere
@BenDemeyere 3 місяці тому
Found some new ones here, great tips!
@sandrachiamaka
@sandrachiamaka Рік тому
Nice compilation 👍 Also, Number 9: Object-fit can also be achieved with .box { background-image:url(car.png); background-size: cover; } Same as object fit, it covers the width and height of its parent element.
@dennisperremans
@dennisperremans Рік тому
That's true, but the issue in your case is that you can't add an alt attribute to the image because it's a background image.
@NIKENKO
@NIKENKO Рік тому
true, but a lot of times you work with websites where you cant just replace img with background, and in that case, object-fit is godsent
@SirZyPA
@SirZyPA Рік тому
in most cases you wanna avoid background image if possible, since you cant add alt text, so if people are using accessibility options like a narrator, and your image is there to add context, youre making your website less usable for people with certain accessibility needs. background image is fine for things like gradients or other purely cosmetic images, but once they have a functional reason to be there, you wanna use the img element so that people who needs accessibility options, can also get context from them.
@edosegheosamagbe9077
@edosegheosamagbe9077 11 місяців тому
@@SirZyPA that's something I'll have to keep in mind always. Thank you.
@cmyk8964
@cmyk8964 11 місяців тому
The object-fit property can also be used to shrink the image in its box, so that all of the image can be visible without aspect ratio distortion!
@peachymorse
@peachymorse 8 місяців тому
That was lit 🔥
@hajimeippo804
@hajimeippo804 3 місяці тому
This is so useful, thank you very much!
@mauricebuchi6973
@mauricebuchi6973 Рік тому
Nice tricks. Have used object fit, smooth scrolling, pointer events before. Thanks for that flipping text will be using next
@ac6852
@ac6852 Місяць тому
Thumbsed-up bc you got me w the clickbait title and you telling me to deal w it w the zoom in made me cackle lolololol
@cosmo-rodrigues
@cosmo-rodrigues 3 місяці тому
There is no word better than AWESOME to describe this video. Thank you so much for sharing so amazing knowledge.
@user-rq2ek3he9w
@user-rq2ek3he9w 2 місяці тому
I love how natural you are in your video you have my sub
@jijojosein
@jijojosein 8 місяців тому
I love your energy!
@kw9186
@kw9186 Рік тому
Great video! Could I ask, what was the vscode extension you were using that showed all the parameters for the animation property (timing-function, etc)
@oriel-elkabets
@oriel-elkabets Рік тому
It wasn't an extension, If you use the auto complete for the animation property it will write all the option as placeholder
@matthewstrauck4646
@matthewstrauck4646 Рік тому
Great video! Helps me as someone who already knows the basics but doesn’t know where to go from there.
@lukas.webdev
@lukas.webdev Рік тому
Maybe me new video about the Top 10 CSS Features you should know and use in 2023 will help you too? 😉
@DiogoLScarmagnani
@DiogoLScarmagnani 6 місяців тому
Very good tips, thank you for sharing this kind of knowledge.
@tropicalverktaki
@tropicalverktaki Рік тому
wow, scroll behavior has got to be the best one liner, I remember having to write several lines of Javascript code to achieve that effect
@ArifBillahOnGoogle
@ArifBillahOnGoogle Рік тому
Really cool stuff. Thank you very much!
@sahiraahamed
@sahiraahamed Рік тому
Very nice... Something new I learned today.. 👍Thanks a lot sir😊just ultimate👏
@Ghulammustafa-wg6cy
@Ghulammustafa-wg6cy Рік тому
Very helpful video. Thank you🥰!
@MaronsCreative
@MaronsCreative 6 місяців тому
Great Job 👏 I like your style, you are unique!
@CharlesSmall
@CharlesSmall Рік тому
Thank you for the cool functions
@dron..4898
@dron..4898 Рік тому
Resize both can be used to open something. If u have a container position fixed with a lower z-index you can resize both a small div with and arrow and once you resize it you can see hidden text or something
@Mathhead2000
@Mathhead2000 3 місяці тому
This effect sounds really cool, but I'm not sure I understand how to do it from your description. You are saying something is hiding behind the background but gets revealed when you resize the foreground box on top of it?
@KadenAE
@KadenAE Рік тому
In addition to the resize thing, you can set a min-width/min-height and a max-width/max-height to set boundries
@MuzicFreakNumberOne
@MuzicFreakNumberOne Рік тому
wow that smooth scrolling is crazy simple, good job
@fattalbirotaboali5142
@fattalbirotaboali5142 9 місяців тому
Amazing ❤🎉
@Fede261
@Fede261 Рік тому
This is great, thank you!
@joej5081
@joej5081 Рік тому
Great video and great information ❤
@rahee3036
@rahee3036 Рік тому
The scroll-snap trick is new to me... Thanks a lot for the video! + Subscriber + Like + Respect
@AstroSirrus
@AstroSirrus Рік тому
Great one-liners! A blender design/developed integrated website would be awesome!
@godnyx117
@godnyx117 Рік тому
I always thought that HTML and CSS can only do so little and you can only STYLE things. Now that I'm learning CSS, OMFG!!!! I don't believe how much built-in functionality it has. I'm currently in the ResizeBoth trick and I'm BLOWN AWAY!!! Edit: OMG! The "pointers-event" was also something I was searching for!!!
@babatundeadenowo7568
@babatundeadenowo7568 Рік тому
When I started building UIs, I knew no Javascript and I had the non-starter syndrome of "JS is hard", so with just HTML and CSS, I had already been creating hamburger toggle menu and website dark and light mode switch. Not a drop of JS in those code.
@godnyx117
@godnyx117 Рік тому
@@babatundeadenowo7568 Thank you for the comment! JS seems pretty easy to me, I never understood this "JS is hard" thing some people say. The more I learn, CSS is also getting more bearable and even enjoyable at some points!
@NamNguyen-tv5ie
@NamNguyen-tv5ie Рік тому
very helpful, thank u so much
@dorianbirch7820
@dorianbirch7820 Рік тому
Amazing, thank you!!
@lifehackstricks7817
@lifehackstricks7817 Рік тому
for the last fade animation you could get the same effect by using animation fill mode
@angel-pu7su
@angel-pu7su Рік тому
I love your ever happy vibe. Great video too.
@AlexMSib
@AlexMSib Рік тому
Cool video man! I used 3 of these at work today what were the odds 🤣🤣
@quentin443
@quentin443 Рік тому
Thanks for all these interesting tips
@srsh12345
@srsh12345 4 місяці тому
Really cool tips. Thanks.
@angelmiller3757
@angelmiller3757 Рік тому
Really good video and very good explanation! 👍✨
@keokawasaki7833
@keokawasaki7833 Рік тому
with pointer-events: none you are suppressing all the events on that element. So the element exists there but no click events or mousemove events are triggered in Javascript. This makes it super handy when creating an overlay that covers the entire page, cuz the events can pass through when the overlay is inactive
@Voldrog
@Voldrog Рік тому
Using pointer-events to make an item non-interactive is a bit... Well I'd say it's not the best approach. You should handle your event logic in js, exclude an element from it. Mixing CSS into the logic of interaction seems to me like a workaround.
@TentangKode
@TentangKode Рік тому
Amazing video as always 🎉
@snehabhamare09
@snehabhamare09 Рік тому
Very useful and cool stuff..thank you so much
@Thachosenone40
@Thachosenone40 Рік тому
Hey Ed how are you doing? Thank you for another great video!
@niravparmar7856
@niravparmar7856 7 місяців тому
"Now you're in the UK, b**ch" ... I laughed so hard on that one 😂
@AmbreenShamshairAli
@AmbreenShamshairAli 10 місяців тому
Amazing you have guides osummm❤
@ismalit
@ismalit Рік тому
Great stuff. Thanks!
@sasagasparovic9351
@sasagasparovic9351 3 місяці тому
Very simple, very short and very usefull, I Like it.
@princecodes247
@princecodes247 Рік тому
Awesome video. Thanks for always making awesome videos like this. You're the reason I was able to become a full stack developer Thank you so much🥺🔥🔥🔥
@moeinzidehsaraei8738
@moeinzidehsaraei8738 Рік тому
That's great thank you
@jeronimoramalho1218
@jeronimoramalho1218 Рік тому
Really cool, I haven't known any of these!
@mkl.stranger
@mkl.stranger 6 місяців тому
Thank you very much. This helps a lot while practicing new properties. Can you tell me the name of the vs code extension which auto completes anything you type then you adjust. Like you did in this video ?
@nyctophillia2292
@nyctophillia2292 5 місяців тому
Truncate is awesome!! i was implementing it with react(js) before now i'll do it css Thanks Ed
@jcnation5393
@jcnation5393 8 місяців тому
I was thinking of watching flex tutorial, just to add the gap, but this video saved my time
@paul2DD
@paul2DD Рік тому
Hi Ed, did you tried Astro, will love to see some tutorials on Astro from you !!!
@shawnnosaurus
@shawnnosaurus Рік тому
Love the sense of humour. Personally `box-size: border-box;` is my top pick, that I even recommend placing as browser resets for how powerful it is.
@_invencible_
@_invencible_ Рік тому
yeah it really should be the default. The first time it took me so long to find out why my 100% width div with a border was overflowing
@kuoyulu6714
@kuoyulu6714 Рік тому
nice tips, useful and to the point, thanks!
@lukas.webdev
@lukas.webdev Рік тому
If you want to get to know more great CSS Features: Just yesterday I also posted a video about the Top 10 CSS Features you should know and use in 2023 ... 😉
@bySterling
@bySterling Рік тому
So many great tips!
@eneshamzaj328
@eneshamzaj328 Рік тому
Instead of using pointer-events: none; to get rid of user selection, You can use user-select: none; ps: Thank You, for your Amazing work Ed.
@RexGalilae
@RexGalilae Рік тому
pointer-events also gets rid of other cursor actions like hover, right click, etc
@RexGalilae
@RexGalilae Рік тому
@@darom_96 Wouldn't that hide the text though?
@user-fu7rv1xk2f
@user-fu7rv1xk2f Рік тому
Also only needs setting on a parent div to get rid of selection on all child divs. Seen people who put it on everything, no need to bloat your code
@maganopigadus
@maganopigadus Рік тому
Or even better, both.
@hype-king3193
@hype-king3193 Рік тому
also "cursor: default"
@cristian702
@cristian702 Рік тому
It's more helpful than i first tought. I used JS for most of those
Top 10 Javascript One Liners YOU MUST KNOW!
14:16
developedbyed
Переглядів 188 тис.
Learn CSS in 1 hour 🎨
1:00:00
Bro Code
Переглядів 966 тис.
Она Постояла За Себя! ❤️
00:25
Глеб Рандалайнен
Переглядів 3,7 млн
How to make a Video Game in Unity - PROGRAMMING (E02)
10:11
Brackeys
Переглядів 3,9 млн
I've been challenged to a CSS BATTLE by Web Dev Simplified
42:22
Kevin Powell
Переглядів 946 тис.
Node.js Routing: Snatch the Secrets! | express routes 
#javascript
19:34
Use these instead of vh
6:06
Kevin Powell
Переглядів 436 тис.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Переглядів 395 тис.
Revolutionise Your Code: Top 5 HTML Elements You've Missed!
23:45
WebDev Frontiers
Переглядів 962
7 ways to deal with CSS
6:23
Fireship
Переглядів 1 млн
The Top 10 Websites of 2022 - CSSDesignAwards
24:45
DesignCourse
Переглядів 325 тис.
Award Winning Animation With Only 20 Lines Of CSS?
6:59
Hyperplexed
Переглядів 1,6 млн
10 CSS Pro Tips - Code this, NOT that!
9:39
Fireship
Переглядів 2,1 млн
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Переглядів 670 тис.
Apple Event - May 7
38:22
Apple
Переглядів 6 млн
Fiber kablo
0:15
Elektrik-Elektronik
Переглядів 2,8 млн
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Переглядів 2,2 млн
iPhone 17 Slim - НЕ ОНОВЛЮЙ iPhone в 2024 | Новини Тижня
31:12
Канал Лучкова
Переглядів 36 тис.