Christophe Drayton (@ChristofDrayton) header
Christophe Drayton (@ChristofDrayton) profile picture

Creative Director Full Stack // #AI Certified (IG: https://teapawt.org/t.co/kVZsBk8Pgi.down) // #A11y Advocate // Visual + Human Centered Design & Front-End Adjunct Professor @CUNY

Sacramento, CA
Joined May 2020
Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)Photo by Christophe Drayton (@ChristofDrayton)
Christophe Drayton retweeted
I try to check @Figma #Slides for #A11y and this is first thing I see 🤦🏻‍♂️
1
1
11
437
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
42
262
21
2,226
441,379
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…
16
70
17
794
63,281
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.
62
221
31
2,143
196,781
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.
13
13
2
301
105,349
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! 👇
23
181
4
1,611
178,077
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…
68
778
29
7,121
1,181,087
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! 👇
12
168
2
1,426
158,912
I was today's old when I discovered that @pomplamoose's half, @jackconte, is @Patreon's CEO 🤯 That's sooooo awesome! #Respect #micdrop 🎤
34
Really interesting and needed #pov #accessibility #lawsuit #ada #compliance
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
21 Amazing AI.llusions 🌀 and how to make them 🔨
165
1,253
378
12,616
4,645,948
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
36
30
7
63
8,752
Christophe Drayton retweeted
Solving the accessibility palette riddle buff.ly/3Yf0RzK
2
4
13
5,971
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
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