Loading video...

Video Failed to Load

Go Home

CSS Trick 🫠 You can create gooey effects with filter using CSS or SVG if you want color 🎨 .blobs { filter: blur(20px) contrast(30); } .blobs { filter: url(#​goo); } The trick is to blur the thing, then cut the blur off with contrast. You can make some cool...

190,822 views • 2 years ago •via X (Twitter)

11 Comments

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Here's that @CodePen link! 🚀 Really worth messing with the values in DevTools and seeing what a difference it makes and the kind of effects you can create 🤓

Robert McGovern's profile picture
Robert McGovern2 years ago

Neat effect, made me wonder if could be used for a CSS Lava lamp On off chance searched Codepen and guess who was the top hit

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Haha 😅 That one could probably do with a revisit at some point. Funny because these trends go round in cycles. Have a bunch of "Gooey" filter demos from the first time I saw SVG filters which would be wayyyy back now 🥲

abelardoit🐦's profile picture
abelardoit🐦2 years ago

007? :d

doug chang's profile picture
doug chang2 years ago

wow!!!!

Alexander Schranz's profile picture
Alexander Schranz2 years ago

Maybe with some kind of filter you even can create other colors. Not sure yet why the second bubble isnt showing.

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Exactly that! 🤙 People tend to reach for the SVG filter for ease of use. Like that use of sepia and then the hue-rotate to finish. If you reduce the blur on the level up, it should come back 🤞

Álvaro Montoro's profile picture
Álvaro Montoro2 years ago

It's not limited to black and white in CSS. It works with other colors too, which also makes it easier to generate other colors by applying additional filters like sepia() and hue-rotate().

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Not "limited" but it is in the sense that you can't just use "background-color" which is what most people would want to use to change color.

Ahmad Fathy's profile picture
Ahmad Fathy2 years ago

This brings back some memories 🥹

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Right?! Love that demo by the way, when they merge it reminds me of Dr. Mario 😅

Related Videos

CSS Tip! 🤙 You can use mask-composite and some JavaScript to create this pointer proximity following glow border ✨ .glow { mask-composite: intersect; mask-clip: padding-box, border-box; mask: linear-gradient(#0000, #0000), conic-gradient(#0000 0deg, #​fff, #0000 45deg); } The trick is to mask a background-image with a combination of mask layers. mask-composite: intersect; means the mask used will be the intersection of the layers 🔥 use source-in, xor; in browsers that don't support intersect; In this demo, you can use pseudoelements and rely on scoped custom properties to do a lot of the heavy lifting for you 🙌 Once you've masked the background, you need to update the starting angle of the conic-gradient on pointermove 👆 You can work that out by getting the center point of each card and then calculating the angle between that and the pointer with Math.atan2 🤓 let ANGLE = Math.atan2( event?.y - CARD_CENTER[1], event?.x - CARD_CENTER[0] ) * 180 / Math.PI ANGLE = ANGLE < 0 ? ANGLE + 360 : ANGLE; CARD.​style.setProperty('--start', ANGLE + 90) You plug that into your conic-gradient mask as a custom property accounting for --spread ⚡️ conic-gradient(from calc((var(--angle) - (var(--spread) * 0.5)) * 1deg), #000 0deg, #​fff, #0000 calc(var(--spread) * 1deg)); To get the blur, you apply a blur to the glow container on each card 🤙 .glows { filter: blur(calc(var(--blur) * 1px); } That's it! Layers of masks that are clipped and composited before being blurred 😎 The added trick is to fade each one in when the pointer is in the defined proximity of the card. For example, don't show unless within 100px of a card. You can see that in the video. Check out the JavaScript code for that 🫶 Couldn't resist making this one 😁 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

1,179,941 views • 2 years ago

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,426 views • 2 years ago

CSS Tip! 💫 You can create this responsive perspective warp animation with 3D CSS and container queries ✨ (Video reveals trick 👀) .warp { container-type: size; perspective: 100px; transform-style: preserve-3d; resize: both; overflow: hidden; } Couple of tricks in this one 🤓 The main idea is to create a tunnel (an open-ended cube). On each side of the tunnel, use linear-gradient to create the grid lines ✨ .side { background: linear-gradient(#​fff 0 1px, transparent 1px 5%) 50% 0 / 5% 5%, linear-gradient(90deg, #​fff 0 1px, transparent 1px 5%) 50% 50% / 5% 5%; } To position each side, you rotate on the x-axis by 90deg. Each side would become invisible at this point. So you give the scene perspective 😉 .warp__side--top { width: 100cqi; height: 100cqmax; transform-origin: 50% 0%; transform: rotateX(-90deg); } The cool part here is that you want to make each side the same height. But the container is responsive. So you can use a container query and make sure each side is 100cqmax tall 🫶 Then the "beams". Each side contains "beams". They have different colors, sizes, and positions, and move at different speeds ⚡️ We can control that through scoped custom properties. .beam { width: 5%; position: absolute; top: 0; left: calc(var(--x, 0) * 5%); aspect-ratio: 1 / 2; background: linear-gradient( hsl(var(--hue) 80% 60%), transparent ); translate: 0 100%; animation: warp calc(var(--speed, 0) * 1s) calc(var(--delay, 0) * -1s) infinite linear; } The magic here is though that a beam's animation is as basic as translating it from the top of the side to the bottom. And you can get that distance with a container query again 🔥 @​keyframes warp { 0% { translate: -50% 100cqmax; } 100% { translate: -50% -100%; } } And that is pretty much it! A cool warp animation effect using 3D CSS and container queries ⚡️ If you have any questions, let me know ᵔᴥᵔ CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

187,474 views • 2 years ago

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 views • 2 years ago

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,739 views • 2 years ago

CSS Tip! 🤙 You can create custom easings for your animations and transitions with linear() 🔥 :root { --bounce: linear(0, 0.39, 0.57, 0.52, ..., 1); } .digit { transition: translate 1s var(--bounce); } Perfect for adding character to animations like this MRR widget! 🫶 Some of the easing code is obfuscated in the snippet there 👆 You would likely write these custom eases once and then reuse them in your projects 🎬 For example, here's the CSS for an elastic ease 🎾 :root { --elastic: linear( 0, 0.0009 8.51%, -0.0047 19.22%, 0.0016 22.39%, 0.023 27.81%, 0.0237 30.08%, 0.0144 31.81%, -0.0051 33.48%, -0.1116 39.25%, -0.1181 40.59%, -0.1058 41.79%, -0.0455, 0.0701 45.34%, 0.9702 55.19%, 1.0696 56.97%, 1.0987 57.88%, 1.1146 58.82%, 1.1181 59.83%, 1.1092 60.95%, 1.0057 66.48%, 0.986 68.14%, 0.9765 69.84%, 0.9769 72.16%, 0.9984 77.61%, 1.0047 80.79%, 0.9991 91.48%, 1 ); } The idea is that you map a set of points between [0, 0] and [1, 1]. This is cool because you can convert something like an SVG path to these coordinates. Link below for a gist with some eases in 🤙 As for the MRR widget, the trick is to set out some number tracks and translate them to show the correct number 🧮 You can translate by line-height based on the value. And the original value you can convert to a currency string like $1,000,000.00 using JavaScript's Intl.NumberFormat() const formatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', }) formatter.format(1_000_000) Check out the exploding view and the video to see how it all works! 👀 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

574,647 views • 2 years ago

Today: a 1.5 hour interview with the co-founders of Coherence Neuro: Ben Woodington and Elise Jenkins They are, as far as i can tell, the only (neurotechnology x oncology) startup that exists today. 'Neurotechnology? For cancer?' you may ask. Yes! As it turns out, tumors interact with the nervous system a fair bit, and you can use the very same neuromodulation toolbox that exists for neuropsychiatric conditions, for monitoring and treating cancer. Coherence has built an invasive device to place at the site of a tumor to do exactly this. Their first indication is a form of brain cancer called glioblastoma; one of the most fatal subtypes of cancer to exist today. The standard of care (with one exception that we discuss) has not changed in 25 years. If Coherence works out, and there is a very real chance they will, that may change. Most interesting of all is that Coherence believes that the bioelectric properties of cancer are not just worth poking at for brain cancers, but for all cancers. And maybe even for diseases outside of it! This conversation covers how Coherence’s first neurotech device (SOMA) works, the molecular reasons behind why neuromodulation affects cancer at all, what the biomarker readouts look like, the obvious Michael Levin comparison, and a lot more. Also: shout to Nicole for setting up the connection here in the first place! Crazy to think that a meeting in mid-2025 ended up leading to this Youtube/Spotify/Apple Podcasts links in replies 0:00:00 - Introduction 0:01:42 - How is SOMA different from Novocure’s Optune? 0:08:57 - Why does neuromodulation affect cancer at all? 0:13:28 - How was cancer-nervous system crosstalk first discovered? 0:15:42 - Anti-epileptics and beta blockers as accidental cancer drugs 0:17:38 - What is molecularly happening when you block cancer-neuron crosstalk? 0:19:50 - What is SOMA actually reading out as a biomarker? 0:20:44 - What does it mean that cancer is “very electric”? 0:22:02 - Can you derive universal biomarkers across patients? 0:23:09 - How is the device placed? 0:24:45 - How does the blocking stimulation regime work? 0:26:43 - Is it fair to say this is closed loop? 0:29:05 - Why not just spam the tumor with constant stimulation? 0:32:31 - Why MRI safety is non-negotiable for oncology devices 0:33:35 - Walk us through the patient journey from diagnosis to implantation 0:36:13 - The Michael Levin question: can you reprogram cancer back to normal? 0:42:29 - Efficacy, hospice settings, and the utility of the neuromodulation literature 0:45:52 - Why start with glioblastoma instead of an easier cancer? 0:48:57 - Regulatory strategy and the reimbursement threat 0:55:37 - How well does mouse-to-human translation work for neuromodulation? 0:55:57 - What do in silico models of neuromodulation look like? 0:58:09 - Why didn’t this exist 10 years ago? 1:01:48 - The founding story 1:06:38 - Why build your own device instead of using off-the-shelf arrays? 1:08:35 - Speaking with glioblastoma patients 1:12:04 - What was it like to raise money for this? 1:13:56 - Beyond cancer: TBI, lung disease, and the pan-disease argument 1:17:40 - Hiring at Coherence + what is the hardest type of talent to find 1:23:17 - What would you do with $100M equity-free? 1:27:15 - Are you a neurotech company or a cancer company?

owl

37,299 views • 4 months ago

🚨Our episode with Anne-Laure Le Cunff is now live! Anne-Laure Le Cunff is the founder of Ness Labs and author of Tiny Experiments: How to Live Freely in a Goal-Obsessed World. She's a neuroscience PhD and writes a newsletter that has 100,000+ subscribers. She's used those insights to develop a new model of success — one built around conducting “tiny experiments” that help her build a life on her own terms. She joins me to discuss how we get trapped in cognitive scripts, the hidden dangers of productivity culture, how we can experiment our way to a better life and MUCH more! Timestamps 0:00:00 Intro 0:00:48 Guest introduction 0:05:15 How do you know you are bored out? 0:17:18 People who love us the most might turn out to be our biggest blockers 0:22:20 Don't confuse activity with effectiveness 0:27:39 We will do virtually anything to gain what is really an illusion of control 0:32:16 The map is not the territory, the menu is not the meal. And yet, words are magic spells 0:39:16 The Winner’s Script and the Loser’s Script 0:47:34 "You gotta run at the top speed if you just want to stay in place.” 0:50:27 Let go of the linear and replace it with the loop- a more cyclical approach for growth 0:55:20 Can you sit alone in a room for 15 minutes? 0:58:24 Procrastination is just a signal from your brain that something is not quite working right now 1:20:38 We know nothing 1:24:26 AI is a rocket ship for the mind 1:28:20 In 100 years, nobody will remember you

Infinite Loops 🎙

22,154 views • 1 year ago