@jeffrey_way As statement to anybody inexperienced in software I would say, I don’t know, hard to answer. As software developer myself I feel: right now it feels as important as when I started (with your great tutorials Jeff!). Not sure if that will remain. Slightly copium-based aswell
@wesbos@syntaxfm I made “DevVoted”! It’s like a daily dev quiz, but runs behave like a roguelite. Your progress depends on how well you answer over time.
https://t.co/IvAgHzU7mJ
CSS Tip! ⭐️
You can use mix-blend-mode with scoped custom properties to create this inverted :hover effect 🤙
button > span {
left: calc(var(--x, 0) * 1px);
top: calc(var(--y, 0) * 1px);
mix-blend-mode: difference; 👈
}
The cool trick is that using mix-blend-mode acts like a color inverter which works well with monochromatic controls 😍 Saves defining the :hover colors, etc. It works it out for you!
As for how to move that spot around? A teeny bit of JavaScript 🤏
const UPDATE = ({target, x, y }) => {
const bounds = target.getBoundingClientRect()
target.style.setProperty('--x', x - bounds.left)
target.style.setProperty('--y', y - bounds.top)
}
const BTNS = document.querySelectorAll('button')
BTNS.forEach(BTN => BTN.addEventListener('pointermove', UPDATE))
On :hover you can use a scoped custom property to change the size of the spot
button:is(:hover, :focus-visible) {
--active: 1;
}
button span {
transform: translate(-50%, -50%) scale(calc(var(--active, 0) * 3);
transition: transform 0.25s;
}
But, what about the bouncy easy? You can use linear() where supported to create a bouncy transition ✨
@supports (transition-timing-function: linear(0, 1)) {
button:is(:hover, :focus-visible) span {
transition-duration: 0.5s;
transition-timing-function: linear(
0, 0.5007 7.21%, 0.7803 12.29%,
...
);
}
}
That's it! Thanks for the challenge @alemalohe 🤙
@CodePen link below! 👇
CSS guru's what's happening here?
https://t.co/NM8IrUsYUD
It seems clamp is acting differently that using min-width and max-width explicitly. The difference here is that the border space is not taken into account as how "box-sizing: border-box" should behave
#css#frontend
I can't stop seeing #CSS View Transitions!
here I'm animating new `node.textContent`, letting the browser handle the morph while bringing in custom animations (and stagger) for stage enter and stage exit 🥲
try it https://t.co/cSBVxZ4cb4
Future CSS Tip! 🔮
You can power list animations like you would using IntersectionObserver with CSS scroll-driven animations and zero JS 🤯
el {
animation: show;
animation-timeline: view();
animation-range: entry;
}
keyframes show {0%{translate:0 50%;}}
@CodePen link below! 👇
Here’s another nested fieldset issue that degrades UX
Let’s say you have a question ‘Do you like chocolate?’
Selecting ‘Yes’ reveals a nested question ‘Do you prefer light or dark chocolate?’
My interactive guide to SVG paths is now live!
A comprehensive deep dive into every single path command complete with challenges where you get to trace over icons. Huge thanks to @iconists for allowing me to use their icons in this guide!
https://t.co/5tUsR7BeXR
CSS Tip Follow-Up! 👀
Select the parent where all children have a certain class name or condition 🔥
You could invert the styles like in the 1st tweet
Or double invert it 🤯 (!!true)
ul:not(:has(> li:not(.item))) { ...styles }
ul:not(:has(input:not(:checked))) { ...styles }
I kinda love how easy this was to put together
It's a fine example of how powerful CSS is getting 💪
But, also another example of "Let CSS do the work" ⭐️