Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Future CSS Tip! 🚀 You can create auto-resizing text inputs with one line of CSS 🔥 textarea, input { field-sizing: content; } No more JavaScript to sync a textarea height to fit the content 🫶 Perfect for chat, messaging, comments, etc. 💬 The size of your input will grow...

319,170 görüntüleme • 2 yıl önce •via X (Twitter)

20 Yorum

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈2 yıl önce

Here's that @CodePen link! 🚀 Only available in Chrome Canary at the moment 🥲 Fallback would be that your inputs don't resize unless you tap into it with some JavaScript ✨

PDF GPT profil fotoğrafı
PDF GPT1 yıl önce

Everyone is getting ahead with AI. You should be too. Summarize documents, craft emails, and generate custom content instantly with this powerful tool. It's like having ChatGPT tailored for your job. Try it for free.

Kartuzinski profil fotoğrafı
Kartuzinski2 yıl önce

Nice. I also saw @wesbos tweeting about this. This is quite a big deal!

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈2 yıl önce

@wesbos Yeah, such a great addition! 🫶 It went through a little renaming recently, was going to be slightly different a couple of months ago. Like the new name 💯

Anthony Riera profil fotoğrafı
Anthony Riera2 yıl önce

No freaking way, I've been struggling so much with that 😂 You saved us sir

App Beast profil fotoğrafı
App Beast2 yıl önce

Really nice once it actually is available in many browsers.

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈2 yıl önce

Yeah, fortunately, we have "supports" so we can get things in place as a nice Easter egg for those using supported browsers. Kinda nice too as it makes you think a bit more about design as you implement things I've found ✨

Floris profil fotoğrafı
Floris2 yıl önce

What would be the fallback for non-supported browsers?

Vitor Markis profil fotoğrafı
Vitor Markis2 yıl önce

ho do you add this smooth cursor effect on your vids? I'm so obsessed with it

Veer Singh profil fotoğrafı
Veer Singh2 yıl önce

what software do you use to edit your tutorials like this ?

Helloyunho profil fotoğrafı
Helloyunho2 yıl önce

@discord time to use the css instead of js lol

coirElephant profil fotoğrafı
coirElephant2 yıl önce

I usually used javascript scrollheight method to achieve it.

Uday Mungalpara profil fotoğrafı
Uday Mungalpara2 yıl önce

Amazing 👏👏

marissa27r profil fotoğrafı
marissa27r2 yıl önce

🤯❤️

MikeeBuilds ⛩️〰️🧱 profil fotoğrafı
MikeeBuilds ⛩️〰️🧱2 yıl önce

Saw this on LinkedIn today. Good that this tip is spreading and making the rounds. Makes it much easier 💯👏🏾

Sourov Basu profil fotoğrafı
Sourov Basu2 yıl önce

Cool tip

Mohan kumar profil fotoğrafı
Mohan kumar2 yıl önce

Does this support every browser?

TForrest profil fotoğrafı
TForrest2 yıl önce

How did you do the glow effect on the border? It was so clean 🥶

Frank Stallone 🧘🏻‍♂️ profil fotoğrafı
Frank Stallone 🧘🏻‍♂️2 yıl önce

What do you use to record these screens? Super slick with the zooming in and out effects. As always that’s for sharing and ask the help! 👏🏻🙏🏻🙌🏼

Juan Cruz profil fotoğrafı
Juan Cruz2 yıl önce

Awesome, that’s great!

Benzer Videolar

CSS Trick 🤙 You can create these tab bar controls by using :has() to count the number of tabs ⭐️ .tabs:has(input:nth-of-type(3)){--count: 3;} .tabs:has(:checked:nth-of-type(3)){--active: 200%;} .tabs::after{ translate:var(--active) 0;} Let's break it down in this ! 📼 Couple of CSS :has() tricks here combined with custom properties 😎 First things first, lay out the tabs using display: grid. This gives you a way to create equal-width tabs 🙏 .tabs { display: grid; grid-auto-flow: column; } Then you use :has() to count the number of tabs and store that in a custom property 🤓 .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(input:nth-of-type(4)) { --count: 4; } Using the cascade, the last valid :has() gives you the number of tabs 🫶 Using the tab count, you can size the tab indicator. For the tab indicator, use the tabs pseudoelement: .tabs::after { content: ""; position: absolute; height: 100%; width: calc(100% / var(--count)); } See how you can use --count to determine its size 📏 Next, use :has() to determine which tab is active or :checked with input [type=radio] .tabs:has(:checked:nth-of-type(2)) { --active: 1; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } You can use a zero-indexed translation here. If the second input is :checked, set --active: 1, then translate the pseudoelement on the tabs to that position 👉 .tabs::after { translate: calc(var(--active, 0) * 100%) 0; } Or you could set active to the translation: .tabs:has(:checked:nth-of-type(2)) { --active: 100%; } Setting the custom property allows you to use the index elsewhere if you need it 🤙 The final piece is using mix-blend-mode 👀 The tabs have a black background-color, the pseudoelement is white, and the label text is white. When you use mix-blend-mode: difference on the pseudoelement it will give this effect that the text transitions from white to black sliding across 😎 .tabs::after { color: hsl(0 0% 100%); mix-blend-mode: difference; } You can totally mix up the colors here though and go with a different effect. The mechanics of how you can use CSS :has() is the main point here 🙏 As always, any questions, suggestions, etc. let me know CodePen.IO link below! 👇 (There's even a Tailwind CSS play for this one too 👀)

jhey ʕ•ᴥ•ʔ

70,670 görüntüleme • 2 yıl önce

CSS Tip! 💪 You can create these tab controls with CSS :has() + radio buttons ✨ .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } .tabs::after { translate: calc(var(--active, 0) * 100%) 0; width: calc(100% / var(--count)); } Two CSS :has() tricks here combined with a rendering trick 🤙 The tab control is a container using display: grid. You can use :has() to count the number of tabs in the container: .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(input:nth-of-type(4)) { --count: 4; } Using the cascade, the last valid :has() gives you the number of tabs 🫶 Once you know the number of tabs, you know how to size the indicator: .tabs::after { content: ""; position: absolute; height: 100%; width: calc(100% / var(--count)); } It's a pseudoelement that uses --count to determine its size 📏 The next :has() trick is determining which tab is active or :checked as it's an input [type=radio] .tabs:has(:checked:nth-of-type(2)) { --active: 1; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } You can use a zero-indexed translation here. If the second input is :checked, set --active: 1, then translate the pseudoelement on the tabs to that position 👉 .tabs::after { translate: calc(var(--active, 0) * 100%) 0; } The last rendering trick is using mix-blend-mode 👀 The tabs have a black background-color, the pseudoelement is white, and the label text is white. When you use mix-blend-mode: difference on the pseudoelement it will give this effect that the text transitions from white to black sliding across 😎 .tabs::after { color: hsl(0 0% 100%); mix-blend-mode: difference; } You can totally mix up the colors here though and go with a different effect. The mechanics of how you can use CSS :has() is the main point here 🙏 As always, any questions, suggestions, etc. let me know CodePen.IO link below! 👇 (There's even a Tailwind CSS play for this one too 👀)

jhey ʕ•ᴥ•ʔ

437,300 görüntüleme • 2 yıl önce

CSS Tip! ✨ You can create these parallax effects and image cross-fades with scroll-driven animations 🤙 img { animation: fade; animation-timeline: view(); mix-blend-mode: plus-lighter } img:last-of-type { animation-direction: reverse; } @​keyframes fade { to { opacity: 0; }} This one's fun! 😁 The trick with the cross-fading image is to make use of one animation that runs at the same time on two images inside a container. You use the same animation, animation-timeline, and animation-range. But, you use animation-direction: reverse on one of the images so they go in the opposite direction 🫶 The use of mix-blend-mode: plus-lighter; produces a better cross-fade result 💯 A viewTimeline (view()) works because you know that both images are the same height. The range you can use is img { animation-timeline: view(); animation-range: cover 45% cover 55%; } That means when the image has covered 45% of the scrollport (In this case, the window), start the animation. And finish when it has covered 55% 🎬 How about the slight parallax? This is a trick with calc(). You know the top of the small image and the big image line up. And you can do this by absolutely placing the caption outside of the small image. The trick is to translate the small image by a distance so it lines up with the bottom of the big image. You can do that like this :root { --catch-up: calc( var(--big-height) - var(--small-height) ); } @​keyframes move { to { translate: 0 var(--catch-up); }} Then drive that animation with a scroll-driven animation using the container of both images as the driver 🤙 /* section contains both images */ section { view-timeline: --container; } .img-fader { animation: catch-up both linear; animation-timeline: --container; animation-range: 50vh calc(100vh + (var(--big-height) * 0.25)); } That's it! Scroll-driven image cross-fading and parallax effects without any JavaScript. This demo will work in all browsers as there is some JavaScript in place where the API isn't supported 🤙 To do that, it uses GSAP ScrollTrigger 🏆 As always, any questions, requests, etc. hit me up! 🤙 CodePen.IO link below 👇

jhey ʕ•ᴥ•ʔ

242,016 görüntüleme • 2 yıl önce