Berat (@BeratSdev) header
Berat (@BeratSdev) profile picture

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
Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)Photo by Berat (@BeratSdev)
🚀 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…
1
1
10
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
32
173
6
3,029
178,655
Berat retweeted
Use the standard Node.js "imports" field instead of TypeScript aliases:
49
82
24
1,337
97,655
how you take an image list and turn it into a 3D scroll-driven carousel with CSS 🤙
24
55
7
1,155
58,143
🚫 𝗔𝘃𝗼𝗶𝗱 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.
10
52
665
53,073
<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); }
83
430
23
5,564
503,280
Updating the "inverted radius" shape to add two more variables to control the offset of inner curve. css-shape.com/inverted-radiu…
3
46
5
445
23,273
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!
7
61
10
477
38,245
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);
responsive animated stroke text with CSS 🤌 use scroll animation combined with -webkit-text-stroke and background-clip: text change the content and the animation adapts!
3
46
1,059
78,680
An example of responsive, interruptible, draggable and auto-animated infinite carousel with the new anime.js v4 `createDraggable()` API.
9
47
3
808
51,078
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
26
216
10
2,537
281,426
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
Do you remember when you joined X? I do! #MyXAnniversary
1
117
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
18
267
19
2,006
269,975
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…
13
25
5
267
31,734
Very cool and interactive blog post about micro-optimization with JavaScript, by romgrk romgrk.com/posts/optimizing-…
6
55
5
310
33,957
✨ 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 🪄
15
55
5
596
42,891
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
406
2,088
303
12,722
1,524,740
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! 👇
4
137
4
984
116,871
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! 👇
15
111
2
1,072
175,024