Eric (@ericgodesign) header
Eric (@ericgodesign) profile picture

Just your friendly neighborhood Web Designer.

Phoenix, AZ
Joined February 2021
Photo by Eric (@ericgodesign)
Experimental #CSS carousel ✅ subgrid ✅ scroll driven animations (SDA) ✅ oklch() ✅ @property ✅ @layer *Lots of code comments* to help break down the effects 🤓 ✅ SDA changes hue/theme ✅ SDA toggles next/prev ✅ SDA syncs dots codepen.io/argyleink/pen/vYQ…
12
124
4
767
84,532
a theming example using that CSS 🤙 aside { border-color: color-mix(in oklch, var(--color) 5%, #​fff3); background: color-mix(in oklch, var(--color), #0007); color: color-mix(in oklch, var(--color), #​fff); }
reminder that CSS color-mix gives you a way to lighten, darken, mix, and fade colors dynamically 🎨 /* reduce alpha by 50% */ --color: color-mix(in lch, currentColor, #0000 50%) /* darken */ --color: color-mix(in lch, currentColor, #000 50%)
20
117
4
1,483
129,155
magnetic bento hover effect w/ css anchor positioning .bento { li:hover article { anchor-name: --a; } .indicator { position-anchor: --a; inset: anchor(inside); transition: inset var(--dur) var(--ease); } }
39
149
7
2,794
98,479
how do Adaline and Apple make these crazy 3d zooming effects as you scroll? it's easier than you think - let me show you how prompts and code in thread:
95
965
33
11,602
375,013
CSS Anchor Positioning && :has() for a magnetic hover effect 🤙🧲 article { anchor-name: --develop; } ul:has(li:hover) { --anchor: --preview; } ul::after { inset: anchor(var(--anchor) top) anchor(var(--anchor) right) ... ; }
19
183
9
2,165
209,608
Discovered HTML at 11. Thanks to Yahoo! Geocities and MySpace.
1
53
morphing tip prototype with View Transitions ✅ fixed position tip ✅ animates display: none ✅ just set innerText and left/top codepen.io/argyleink/pen/GRz… video alt: i mouse into squares causing a tip to move to the center with some text. the tip morphs and moves to position!
3
13
1
134
20,058
CSS Tip! 🤙 You can create this magnetic :hover effect with CSS anchor positioning, :has, and zero JS 🔥 article { anchor-name: --develop; } ul:has(li:hover) { --anchor: --develop; } ul::after { inset: anchor(var(--anchor) top) anchor(var(--anchor) right) ... ; } How do you keep it clean when entering/exiting the list? Use transition-delay ⭐️ ul:has(li:hover) { --active: 1; } ul::after { opacity: var(--active, 0); transition: opacity 0.2s, inset 0.2s 0.2s; } ul:hover::after { transition: opacity 0.2s 0.2s, inset 0.2s; } This is a cool trick you can use. Delay the opacity on enter and then delay the position on exit. That way you don't get a weird effect on enter/exit 🙏 This one's a "Future" CSS tip 🔮 But, the demo will work in all browsers in some way. The idea is to progressively enhance it. 1. No JavaScript and no Anchor Positioning? Highlight on hover ✏️ 2. No Anchor Positioning? Use JavaScript with a single event listener to update the inset values using elementFromPoint and .closest 🫶 3. If there is Anchor Positioning support, use that and don't fire the JavaScript. You can check with CSS.supports('anchor-name: --anchor') ✨ That's it! @CodePen link below! 👇
Nice effect 💫 Do you know how to do this?
43
641
36
4,790
731,131
Future CSS Tip! 🔮 You can create this scrolling image pop-out effect with CSS scroll-driven animations and zero JS! 🔥 .pop { view-timeline-name: --pop; } img { animation: slide both; animation-timeline: --pop; animation-range: entry 100% cover 50%; } .skateboarder { --x: 0; --y: -45%; } @ keyframes slide { to { translate: var(--x) var(--y); } } The "trick" is to layer up two image elements and keep one clipped by the container 🤙 Slide them both together and it will look like one pops out of the container 🎈 You can leverage scoped custom properties to translate by different distances too! 😎 You can use macOS's built-in image background removal tool to get the pop-out image ✨ And for added effect, you can animate the brightness on that to make it stand out ⭐️ @CodePen link below! 👇
The way these images break the plane while scrolling 🤩
47
593
24
4,020
635,284