Christophe Drayton retweeted
I’m trying my best to give my students practical non-obvious advice they can use to jumpstart their careers upon graduation in 2024. here's my draft, tell me what you think
Christophe Drayton retweeted
Sounds are annoying because most designers use one sample for a button and play it repeatedly.
Instead, you want to steal a technique from gaming and randomly select from a set of 8+ samples each with slight differences to create texture.
notboring.software/words/the…
Christophe Drayton retweeted
Built this app for myself and regularly use it to explain color spaces visually. It also comes in handy and saves a ton of time when I want to take screenshots.
Christophe Drayton retweeted
Challenge by @rogie - Create something cool with only frames. So, Here little dancing loader in figma for #figbruary. Actually, it's just two frames as components with some variants and smart animation.
Christophe Drayton retweeted
CSS Tip! 📜
You can use scroll-driven animations to progressively enhance collapsing a floating call to action 🤏
.cta {
animation: shrink;
animation-timeline: scroll();
animation-range: 0 100px;
}
@keyframes shrink {
to { width: 48px; }
}
That's the gist of it. Use the body scroll position with animation-timeline: scroll(). Define the animation-range as when you have scrolled 100px.
There's a little more though 🤓
That would "scrub" the width animation. Ideally, you want to trigger that animation. You could animate a custom property with steps() timing and use that to define the width ✨
@property --scrub {
syntax: '<number>';
inherits: true;
initial-value: 0;
}
body {
animation: scrub both steps(1, end);
animation-timeline: scroll();
animation-range: 0 100px;
}
Then transition the --scrub property on the CTA and use it for the width 🤙
.cta {
transition: --scrub 0.2s;
width: calc(48px + (120px * (1 - (var(--scrub) / 100))));
}
Other animations are a matter of preference and timing. For example, you could then make the hand wave, scale down the size, and then slide a gradient across 😉
They have the same structure and technique as the original concept. Waving the hand? 👋 Run it twice, offset the transform-origin.
.hand {
animation: wave both linear 2;
animation-timeline: scroll();
animation-range: 30vh 50vh;
transform-origin: 65% 75%;
}
@keyframes wave {
50% { rotate: 20deg; }
}
How's it progressively enhanced? Wrap everything in a @supports query and a @media query. If there isn't support, users still get a good experience. It's a floating action button that's circular and already collapsed 🤙
@supports(animation-timeline: scroll()) {
@media(prefers-reduced-motion: no-preference) {...}
}
Definitely have a play with the code. Amazing what we're going to be able to do with CSS alone! 🔥
@CodePen link below! 👇
Christophe Drayton retweeted
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 link below! 👇
Hey, do you like fancy glowing cards?
Let's get this tweet to 250 likes, and I'll create a tutorial for it.
This is 100% @figma. Xitter is really butchering the quality, check how smooth it is live: figma.com/proto/Aw5VqbnFfVZD…
Christophe Drayton retweeted
Nice thing here is you can use CSS tricks shared from the last few months 🤙
For example, background-attachment: fixed to spread a gradient between cards 😎
teapawt.org/jh3yy/status/167…
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 link below! 👇
I was today's old when I discovered that @pomplamoose's half, @jackconte, is @Patreon's CEO 🤯 That's sooooo awesome! #Respect #micdrop 🎤
34
One of the most respected magazines, @TheEconomist, had a story on website accessibility lawsuits. Check out this post to see what Ken Nakata and I have to say about it. bit.ly/3F7f2OF
#Accessibility #Websites
1
66
Christophe Drayton retweeted
We are giving away 100 Virtual & 10 VIP LIVE Tickets to this incredible event.
To Participate:
❤️ Like
🗨️ Comment with hashtag #Artificial2023
🤳Retweet
See You There!!
#Artificial2023 #ArtificialConference23 #artificialconf
Christophe Drayton retweeted
Solving the accessibility palette riddle buff.ly/3Yf0RzK
A bit of an auto promo to share with you my #Instagram #midjourney journey :) Feel free to #like, #share, #comment on @ups.ai.down (lnkd.in/gbJyK7jg)
#midjourney #midjourneyart #midjourneyartwork #midjourneyai #midjourneycommunity #ai #aiart #aiar…lnkd.in/g2ScPnhY
238
Hi friend :) I am working on an exciting #branding #project for a #cannabis store in Brooklyn, NY. I need #insights into your likes and habits. If you'd like to #help, I put together a short #anonymous #survey that you can find here: . 🤞🏻 lnkd.in/gdRsgRHK
40
I just published Goliath Proving Tired: #GPT is not ready yet. A Tale of Three #ChatGPT Models in the Context of #UX #Research link.medium.com/SIHt6nBe3yb
41
Apparently, at @semplicelabs, they discover that a #Wordpress #theme can be installed locally. Not really user nor #developer friendly. Surely not a good #customerexperience or #customerservice after paying around $200. @schneidertobias
41


















