jhey ʕ•ᴥ•ʔ's banner
jhey ʕ•ᴥ•ʔ's profile picture

jhey ʕ•ᴥ•ʔ

@jh3yy146,521 subscribers

designing interfaces. engineering experiences. many can build it. few can explain it. @shopify brand design studio 💎

Shorts

one way: clip-path: shape() in css single element, draw outline, scoop corner no stitched-together pieces/mask gymnastics 🧙

one way: clip-path: shape() in css single element, draw outline, scoop corner no stitched-together pieces/mask gymnastics 🧙

99,239 görüntüleme

you will learn a lot about animation by scrubbing things frame-by-frame make it a habit for example ↓ notice how apple transitions the lines in and out differently there's usually a reason 🤙

you will learn a lot about animation by scrubbing things frame-by-frame make it a habit for example ↓ notice how apple transitions the lines in and out differently there's usually a reason 🤙

224,248 görüntüleme

if you’re dynamically masking a scroll container with css, consider leaving room for the scrollbar instead of masking it too 🧑‍🍳 mask-repeat: no-repeat; mask-size: calc(100% - 10px) 100px;

if you’re dynamically masking a scroll container with css, consider leaving room for the scrollbar instead of masking it too 🧑‍🍳 mask-repeat: no-repeat; mask-size: calc(100% - 10px) 100px;

213,001 görüntüleme

one way w/ css 🪄 stack an image 2x filter 1st, unclip 2nd on :hover 🤙 a img { grid-area: 1 / 1; } img:first-of-type { filter: grayscale(1) invert(1); } img:last-of-type { clip-path: circle(0); transition: clip-path; } a:hover img:last-of-type { clip-path: circle(100%); }

one way w/ css 🪄 stack an image 2x filter 1st, unclip 2nd on :hover 🤙 a img { grid-area: 1 / 1; } img:first-of-type { filter: grayscale(1) invert(1); } img:last-of-type { clip-path: circle(0); transition: clip-path; } a:hover img:last-of-type { clip-path: circle(100%); }

325,698 görüntüleme

you can totally do it with css 🧑‍🍳 use a border mask, layers + overflow: hidden, or other tricks skip animating the gradient though, jus' spin a 1:1 gradient layer 🤙

you can totally do it with css 🧑‍🍳 use a border mask, layers + overflow: hidden, or other tricks skip animating the gradient though, jus' spin a 1:1 gradient layer 🤙

286,399 görüntüleme

using css pow() you can create runtime-configurable fluid typography that responds to viewport or container size 😉 for example, "minimum of 14px at 375px and scale to maximum 24px at 1500px" all powered by pow() and custom properties

using css pow() you can create runtime-configurable fluid typography that responds to viewport or container size 😉 for example, "minimum of 14px at 375px and scale to maximum 24px at 1500px" all powered by pow() and custom properties

118,288 görüntüleme

reminder that you can also create lighting effects with a little css + svg filters <feSpecularLighting> + <fePointLight> bound to pointer position 👨‍🍳

reminder that you can also create lighting effects with a little css + svg filters <feSpecularLighting> + <fePointLight> bound to pointer position 👨‍🍳

103,336 görüntüleme

chromatic magnetism/displacement™

chromatic magnetism/displacement™

103,967 görüntüleme

Parallax cards with masked blurs 😷 Tweak that CSS until you get something you're happy with 🤙

Parallax cards with masked blurs 😷 Tweak that CSS until you get something you're happy with 🤙

583,105 görüntüleme

css trick for the "shine" border 🧑‍🍳 take a pseudoelement position + give it an inset box-shadow mask it off at an angle with a linear-gradient 🤙 bonus: use corner-shape: squircle + rotate on pointer move

css trick for the "shine" border 🧑‍🍳 take a pseudoelement position + give it an inset box-shadow mask it off at an angle with a linear-gradient 🤙 bonus: use corner-shape: squircle + rotate on pointer move

200,156 görüntüleme

table of contents marker w/ modern css 🧑‍🍳 .toc { scroll-target-group: auto; } a:target-current { anchor-name: --active; } .toc::after { position-anchor: --active; top: anchor(top); } fun progressive enhancement, no js 🤙

table of contents marker w/ modern css 🧑‍🍳 .toc { scroll-target-group: auto; } a:target-current { anchor-name: --active; } .toc::after { position-anchor: --active; top: anchor(top); } fun progressive enhancement, no js 🤙

177,899 görüntüleme

cursor: unsubscribe

cursor: unsubscribe

68,575 görüntüleme

– One HTML attribute – One JavaScript event listener – Configurable via CSS custom properties Let's get this explodin' 🤙

– One HTML attribute – One JavaScript event listener – Configurable via CSS custom properties Let's get this explodin' 🤙

530,911 görüntüleme

progressive css-only pagination indicators w/ anchor positioning 👨‍🍳 nav::before { position-anchor: --h; } nav::before { left: anchor(left); } a:hover { anchor-name: --h; } use the nav pseudoelements, ::before for intent, ::after for current 🤙

progressive css-only pagination indicators w/ anchor positioning 👨‍🍳 nav::before { position-anchor: --h; } nav::before { left: anchor(left); } a:hover { anchor-name: --h; } use the nav pseudoelements, ::before for intent, ::after for current 🤙

192,774 görüntüleme

CSS Tip! ✨ Combine :has() and trig functions to select previous siblings and create an Apple-style OS dock 🔥 CSS only, no JS! 🤯 .b:has(+ .b:hover), .b:hover + .b { flex: calc(0.2 + (sin(30deg) * 1.5)); translate: 0 calc(sin(30deg) * -75%); } CodePen.IO link below! 👇

CSS Tip! ✨ Combine :has() and trig functions to select previous siblings and create an Apple-style OS dock 🔥 CSS only, no JS! 🤯 .b:has(+ .b:hover), .b:hover + .b { flex: calc(0.2 + (sin(30deg) * 1.5)); translate: 0 calc(sin(30deg) * -75%); } CodePen.IO link below! 👇

517,846 görüntüleme

it's ok – the browser has designMode™ covered 🙇

it's ok – the browser has designMode™ covered 🙇

256,370 görüntüleme

Responsive magnetic link effect using CSS anchor positioning 🧲 nav li:nth-of-type(2) { anchor-name: --i2; } nav:has(li:nth-of-type(2) a:hover) { --a: --i2; } ul::before { /* indicator */ left: anchor(var(--a) left); width: anchor-size(var(--a) width); }

Responsive magnetic link effect using CSS anchor positioning 🧲 nav li:nth-of-type(2) { anchor-name: --i2; } nav:has(li:nth-of-type(2) a:hover) { --a: --i2; } ul::before { /* indicator */ left: anchor(var(--a) left); width: anchor-size(var(--a) width); }

396,709 görüntüleme

using CSS grid you can avoid width change in the parent container whilst making it responsive 🤙 the trick: update and transition the grid-template-columns for the list on :focus/:hover ✨

using CSS grid you can avoid width change in the parent container whilst making it responsive 🤙 the trick: update and transition the grid-template-columns for the list on :focus/:hover ✨

270,769 görüntüleme

messin' with css frosted + saturated borders using background-clip + backdrop-filter 👨‍🍳

messin' with css frosted + saturated borders using background-clip + backdrop-filter 👨‍🍳

158,295 görüntüleme

we go again...

we go again...

45,864 görüntüleme

Videos

jh3yy's profile picture

heard you liked clean code 💦

jhey ʕ•ᴥ•ʔ

631,350 görüntüleme • 2 ay önce

jh3yy's profile picture

of course, we'll have a look 🌊

jhey ʕ•ᴥ•ʔ

1,450,037 görüntüleme • 1 yıl önce

jh3yy's profile picture

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,180,399 görüntüleme • 2 yıl önce

jh3yy's profile picture

been playin' with LDraw ✨

jhey ʕ•ᴥ•ʔ

47,116 görüntüleme • 1 ay önce