
I love building beautiful things, and help each other. #Svelte #React #Solid #Qwik #Vue #Angular, #Typescript, #Flutter, #Dart, #Node, #Next.js #Nest.js #Node
Former Yugoslav Republic of Ma
Joined May 2014
- Tweets729
- Following4.8K
- Followers582
- Likes2.8K
Berat retweeted
🚀 Agentic AI is moving beyond experimentation and into real business operations. How organizations can automate workflows, improve decision-making, strengthen governance, and create measurable business value with AI.
alphaconsultancy.ai/insights…
Berat retweeted
table of contents marker w/ modern css 🧑🍳
.toc { scroll-target-group: auto; }
a:target-current { anchor-name: --active; }
.toc::after {
position-anchor: --active;
top: anchor(top);
}
fun progressive enhancement, no js 🤙
Day 15 of building cool ideas I love 🚀
Been super occupied, but I had some time to work on this blog post animation using CSS and JS
I am curious @jh3yy if this can be done with only css
Berat retweeted
Use the standard Node.js "imports" field instead of TypeScript aliases:
![A side‑by‑side code comparison showing migration from TypeScript path aliases to Node.js imports. On the left, tsconfig.json defines `"paths": { "@/ *": ["./ *"] }`, used as `import "@/foo"`. On the right, package.json defines `"imports": { "#app/ *": "./ *" }`, used as `import "#app/foo"`. Red arrows point from the TS config to the package.json config and from the old import style to the new one.](https://pbs.twimg.com/media/G7VyfHfbsAEUHEr.jpg?name=small&format=webp)
ALT A side‑by‑side code comparison showing migration from TypeScript path aliases to Node.js imports. On the left, tsconfig.json defines `"paths": { "@/ *": ["./ *"] }`, used as `import "@/foo"`. On the right, package.json defines `"imports": { "#app/ *": "./ *" }`, used as `import "#app/foo"`. Red arrows point from the TS config to the package.json config and from the old import style to the new one.
Berat retweeted
🚫 𝗔𝘃𝗼𝗶𝗱 Using a full context value in every component can trigger unnecessary re-renders.
✅ 𝗜𝗻𝘀𝘁𝗲𝗮𝗱 Use 𝘤𝘰𝘯𝘵𝘦𝘹𝘵 𝘴𝘦𝘭𝘦𝘤𝘵𝘰𝘳𝘴 to pull only the data you need. This reduces re-renders and improves performance.
Berat retweeted
<table> highlighting with CSS :has() 💡
td:has(~ td:hover), /* previous sibling cells */
table:has(td:nth-of-type(3):hover) /* column cells */
tr:not(:first-of-type):has(~ tr:hover)
td:nth-of-type(3) {
background: var(--highlighted);
}
Berat retweeted
Updating the "inverted radius" shape to add two more variables to control the offset of inner curve.
css-shape.com/inverted-radiu…
Berat retweeted
attr() is getting an upgrade!
Starting in Chrome 133 (stable rollout happening this month), you'll be able to access attributes in CSS as typed values beyond strings.
Here's an example of where that's pretty cool. Given:
<div data-rating="4.5">
You can use data-rating as a numerical value with:
attr(data-rating type(<number>)
So in this demo, I'm using that value to show a fill percentage in the stars (as a background gradient with a mask). I'm also able to use this value as a string (which was possible before) to represent its content as a string in a pseudo element. Two for one!
Berat retweeted
extra detail: animate a CSS custom property from 0 to 100 on scroll and use that for a counter()
label::after { content: counter(complete) '% complete'; }
translate the label using container query units ✨
translate: 0 calc(var(--p) * 1cqh);
Berat retweeted
An example of responsive, interruptible, draggable and auto-animated infinite carousel with the new anime.js v4 `createDraggable()` API.
Berat retweeted
Use CSS custom properties and the sin() trigonometric function to give each character an eased animation-delay 🤙
.char {
animation-delay: calc(
sin((var(--index) / var(--total)) * 90deg) *
var(--duration)
);
}
This post is from an account that no longer exists. Learn more
Good job to the whole Google (Flutter team) for their hard work, appreciated.
React Native Skia uses MakeLazyImageFromTextureSource for video frames. We hacked this into Flutter web Jan 2023, a few days after trying to move to Flutter. Reported our findings in Flutter repo, and opened a ticket about Texture support mentioning this challenge and hoping there might be interest in enabling better video support (issue #119649).
A year and a half later, React Native Web ships a feature that does what we wanted to do in Flutter. Still no official support for this API in Flutter web.
1
119
Berat retweeted
PREVIOUSLY:
separate rulesets for light and dark
NOW:
one ruleset with `light-dark()`
New article got published: CSS `color-scheme`-dependent colors with `light-dark()`
🔗 web.dev/articles/light-dark
Berat retweeted
We're excited to have @DrizzleORM as the first ORM to support PGlite 🎉🚀
• Run full Postgres embedded in your app with PGlite.
• At only 2.6mb, it's perfect for local-first apps!
github.com/electric-sql/pgli…
github.com/drizzle-team/driz…
Berat retweeted
Very cool and interactive blog post about micro-optimization with JavaScript, by romgrk
romgrk.com/posts/optimizing-…
Berat retweeted
✨ Tailwind CSS v4 demo ✨
Define **one** CSS variable in CSS and generate a comprehensive set of utilities to use the "design token" in your project.
Colors for text, background, border, caret, shadow, gradient-from, via, to, etc 💥
Tailwind is a CSS framework... generator 🪄
Berat retweeted
The untold history of web development:
1990: HTML invented
1994: CSS invented to fix HTML
1995: JS invented to fix HTML/CSS
2006: jQuery invented to fix JS
2010: AngularJS invented to fix jQuery
2013: React invented to fix AngularJS
2014: Vue invented to fix React & Angular
2016: Angular 2 invented to fix AngularJS & React
2019: Svelte 3 invented to fix React, Angular, Vue
2019: React hooks invented to fix React
2020: Vue 3 invented to fix React hooks
2020: Solid invented to fix React, Angular, Svelte, Vue
2020: HTMX 1.0 invented to fix React, Angular, Svelte, Vue, Solid
2021: React suspense invented to fix React, again
2023: Svelte Runes invented to fix Svelte
2024: jQuery still used on 75% of websites
Berat retweeted
CSS Trick! ⚡️
You can use scroll-driven animation with background-attachment to create a dynamic glowing card scroller without JS 🔥
section { animation:vibe; animation-timeline:--list; }
@keyframes vibe { to{--hue:320;}}
.glow {background: hsl(var(--hue) 80% 50%);}
Here's how! 🤙
You can use the background-attachment trick used in other glow card demos 😎
article {
background-attachment: fixed;
}
The difference here is that you aren't going to update the fixed background position with your pointer this time. It can remain fixed.
The magic part is that as you scroll, the background will leave the card that's leaving and enter the card that's entering ✨ For the extra background glow, you can use a fixed pseudo element on the list container itself 💪
Once that's in place, you're only task is to change the color of the background as you scroll 🤔
Create a custom property declaration for the --hue
@property --base {
inherits: true;
syntax: '<number>';
initial-value: 0;
}
Then create an animation that updates this value
@keyframes accent { to { --hue: 320; }}
The last piece is hooking it up to scroll and there is a little trick in here 👀
First, you need an inline scroll-timeline on the list
ul {
scroll-timeline: --list inline;
}
Then you can use timeline-scope to hoist that scroll-timeline up so a parent can use it. You then animate the custom property on this element and let the value cascade down to the places that need it 🔥
section {
timeline-scope: --list;
animation: accent both linear;
animation-timeline: --list;
}
For example, the glow uses the --hue this way
[data-glow] {
background-image: radial-gradient(
150px 150px at 50% 50%,
hsl(var(--hue) 100% 70% / 0.25), transparent
);
}
Lastly, scroll-snap is optional of course but plays nice with the scroll-driven animation demos ✨ The key for that is
ul { scroll-snap-type: x mandatory; }
li { scroll-snap-align: center; }
That's it! Pretty fun trick to play with! 🤓 Any questions, let me know! Should we add it to the video walkthrough list?
@CodePen link below! 👇
Berat retweeted
Couldn't resist 😁
You can use some JavaScript <canvas> trickery to create a responsive clipped text effect ✨
context.drawImage(text, 0, 0)
context.globalCompositeOperation = "source-in"
context.drawImage(rings, 0, 0)
Use compositing to clip the animated rings to text 🤓
– Statically write the text to an offscreen canvas
– Animate the rings on an offscreen canvas
– Render them to the canvas in the DOM with compositing ⚡️
@CodePen link below! 👇

























