Imagine a world where you could copy/paste websites into editable Figma layers (jk you don’t have to imagine you can do this now with our Chrome extension)
Future CSS Tip! ⚡️
You can combine CSS :has() & :user-valid/:user-invalid to power <form> micro interactions 😍
No JavaScript. Watch for the little animations ✨
label {
--color: var(--default);
color: var(--color);
border-color: var(--color);
}
.group:has(:user-valid) {
--color: var(--valid);
}
.group:not(:focus-within):has(:user-invalid) {
--color: var(--invalid);
}
These new pseudo-elements only fire once an input has been interacted with. This means you don't need to do things like the "transparent :placeholder-shown" hack from before 🙌
Then you can lean into the power of scoped custom properties and change the theme based on the status of a form group 😎
It's a nice little touch. But remember, don't rely on color to communicate things!
@CodePen link below! 👇
Future CSS Tip! 🔮
You can create responsive animated text reveals with CSS scroll-driven animations 🔥
section { /* The red element in the video */
view-timeline-name: --section;
}
p {
animation: fill both linear;
animation-timeline: --section;
animation-range: cover;
}
keyframes fill {
to { --fill: 1; }
}
No JavaScript required with this trick 😎
What's happening there then? Well, we're animating a custom property value using @ property.
@ property --fill {
initial-value: 0;
syntax: '<number>';
inherits: true;
}
Then the trick is background clipping the text and filling it with a multiline background by animating the background-position to fill the text 🤓
span {
background-position-x:
calc(-100vmax + (var(--progress) * 100vmax));
background-clip: text;
color: transparent;
}
@CodePen link below 👇
The Input is getting ready for the next Frames X release!
I can't say how much I've spent designing this one, but I feel happy with its flexibility. ✨
#ui#ux#design#figma
HTML <canvas> & Web Audio are great for music visualizers 🎵. Here's one for a track from my upcoming album: https://t.co/DvgPbSru9V (flashes). Good starter guides: https://t.co/Rw1gJFBiLW https://t.co/gM6zFWAc75