Der Ukraine-Krieg ist eines der wenigen schwarz-weißen Themen unserer komplizierten Zeit: Putins Russland hat ohne jeden gerechten Anlass ein Nachbarland überfallen. Wer Zelensky Kriegstreiber schimpft, weil er sich verteidigt, spuckt auf jedes Verständnis von Anstand und Recht.
Lil future HTML/CSS Tip! ✨
Create an off-canvas menu with the Pop-up API and CSS :has() 😎 No JS required!
<button popuptoggletarget=menu>
<nav id=menu popup>
body:has([popup]:open) {
translate: calc(var(--nav-width) * -1) 0;
}
Demo link/info below! 👇
Based on @AlexFisla's fantastic work, I got playing with this little grid interaction:
https://t.co/3qzrrJBPQO
Lots of fun possibilities here, depending on which values for the parameters you choose 🤪
#frontend#animation#javascript#css#webdesign#gsap
Another pure CSS card backgrounds demo I made on @CodePen: https://t.co/xnKpEWX9rE
Each card is just 1 div. No SVG, no JS.
Only CSS. And can get some pretty damn cool effects too.
mix-blend-mode in CSS can produce such cool effects, and is so underutilized
/* eg: galaxy text effect */
.galaxy-text {
mix-blend-mode: lighten;
background-image: url(galaxy.png);
}
More examples & detail 👇
How do Nike and Apple make such smooth and touch friendly carousels with pure CSS?
/* tl;dr */
.carousel {
scroll-snap-type: x mandatory;
}
.carousel .item {
scroll-snap-align: start;
}
More detail 👇
Woah, here is one I never knew and just popped up in my editor.
Number and Date Inputs have .valueAsNumber and .valueAsDate.
I've been using parseInt and new Date() my whole life!
Tired of getting "could not resolve" errors when running npm install?
This is typically caused by a package that needs to update its peerDependencies (to specify support for newer versions).
Solution: Add an overrides entry to package.json.
⚡️You can use the new priority hint "fetchpriority" to tell the browser which media is important and should be downloaded first (or which is not important)
💡It's a great way to improve your Largest Contentful Paint!
#webperf#javascript
Tired of having to wait for bundlers to update the page when adding console.logs?
Chrome has your back! You can dynamically insert console.logs without touching your code.
Just right-click on the line and choose "logpoint", enter the variables you want to log and hit Enter 🤯