Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Pinterest moved to native CSS carousels to replace legacy JS platform-wide → Using CSS primitives like scroll markers and snap, they achieved: 📉 90% code reduction (2k JS → 200 CSS) 🚀 15% faster page loads ✨ Smoother, interactive UI

220,073 Aufrufe • vor 4 Monaten •via X (Twitter)

0 Kommentare

Keine Kommentare verfügbar

Kommentare vom Original-Post werden hier angezeigt

Ähnliche Videos

CSS variables are live and they are POWERFUL. Now Live on Product Hunt 🚀 ➡️ Create a design system "So you can stay consistent and build much quicker." Define global styles like colors, gradients, sizes, and box shadows. ➡️ Use your variables everywhere "So you never have to manually enter a border color again." You're not limited to just sizes, colors, and font families. Use variables in gradients, box shadows, transforms, and more! ➡️ Start with libraries like Open Props, expertly crafted CSS variables "So you can use a tried and true system, and so we can standardize our Projects." Because there are no abstractions, you can use existing CSS variable libraries like Open Props, an expertly crafted library of CSS variables, and the recommended starting point in Webstudio. ➡️ Create complex micro-interactions "So when you hover a link, you can change any children's styles." CSS variables go beyond reusability! You can define variables anywhere in the navigator, such as on a link, and modify the variables on hover. Then, you can use those variables on the children to create complex micro-interactions! ➡️ Design and build simultaneously "So when deciding that perfect border color, you can arrow through all your options." Experimenting on the canvas just got a whole lot better. Now, you can arrow through your variables and see them rendered on the canvas to see which works best. ➡️ Change variable by breakpoint "So you can make the variables look great, no matter the screen size." CSS variables in Webstudio use the same UI as the rest of your styles, enabling breakpoints to work the same way. ✨ Building with design systems gives a HUGE boost in speed, consistency, and maintainability.

Webstudio

15,497 Aufrufe • vor 1 Jahr

Create a digital watch using HTML, CSS, and JavaScript. Check✅ my breakdown of its functionality⬇️ •Features: 1. HTML Structure: - A `div` with `id="watch"` acts as the display area for the digital clock. 2. CSS Styling: - Centering: The `body` uses `flexbox` to center the watch both vertically and horizontally. - Aesthetic Design: The watch has a rounded border, a specific background color, and text styling for a modern look. 3. JavaScript Functionality: - The `updateWatch` function gets the current time using the `Date` object, formats the hours, minutes, and seconds with leading zeros (using `padStart`), and updates the `#watch` div's content. - The `setInterval` method ensures the time updates every second. - An initial call to `updateWatch()` ensures the clock doesn't show `00:00:00` for the first second. • How It Works: - When the page loads, the time is immediately displayed and updates every second. This results in a real-time clock that's accurate and visually appealing. • Potential Enhancements: 1. Add a toggle between 12-hour and 24-hour format. 2. Include the date along with the time. 3. Animate or style the time updates for a smoother experience. Remember to repost this💪 to educate others on your timeline. Don't be selfish, share. Follow me Dhanian 🗯️ and turn on notifications🤛 for more tech updates For more tech projects, check link on my profile. Remember to bookmark💪 Here's the full code snippets for the sample ⌚watch ⬇️

Dhanian 🗯️

11,136 Aufrufe • vor 1 Jahr

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: ' '; 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.IO link below! 👇

jhey ʕ•ᴥ•ʔ

116,625 Aufrufe • vor 2 Jahren

I've been building a music player with Next.js for fun. Here's a quick demo of how it works (it's open source!) • Demo: • Code: If you want to learn more about how it's built, here's more details ↓ I'm using Postgres (with Drizzle) to store information about the songs and playlists. Audio and image files are stored in Vercel Blob (object storage), and the URLs are then referenced in the database. For the UI, I'm using shadcn/ui (so Tailwind CSS and Radix). This made it easy to copy/paste in some nice components, like the dropdown menus. I built the entire first version of the UI in v0 and then iterated from there, feeding it my Drizzle schema as a source in the project and having it scaffold some of the boilerplate for me: I added support for keyboard navigation (using arrow keys) or vim motions (j/k to go up/down, and h/l to go between playlists and tracks). Also, space to toggle the now playing song, and / to focus the search input. The search function has a nice utility to highlight the currently searched text on the page in yellow. Then, I was exploring how to pass metadata from my application to macOS or iOS. Turns out there's an API for that – MediaSession. Web apps can share metadata about what media is playing (title, artist, album artwork) and sync play/pause/seek with system media controls. Works across modern browsers — even integrates with iOS dynamic island and shows up on lock screens: I set up my app like a PWA – it has a manifest.json file, so it can be installed to my iOS home screen or added to my dock on macOS. On iOS, it then uses the full screen height `100dvh` (dynamic viewport) and has padding on the bottom for the safe area with the `env()` CSS function. Finally, I was able to use the Vercel AI SDK in a script to clean up the metadata on audio files I downloaded from YouTube. Bonus: I even was able to dogfood the React Compiler, which helped me fix a performance bug! That's all! It's fun to make personal software:

Lee Robinson

118,242 Aufrufe • vor 1 Jahr

Adobe tried to buy Figma for $20 billion in 2022. The deal collapsed. So Figma went public on the NYSE in July 2025 instead. Ticker FIG. Public company. Quarterly earnings. Wall Street pressure. You know what happens to design tools after they IPO. In March 2025, Figma raised the Professional Full seat 33%. From $15 to $20 a month. Organization seats jumped to $55. Enterprise to $90. Then they took Dev Mode, which was free during beta, and locked it behind a paid seat. Your developers now pay extra to inspect the designs your designers already paid to create. In March 2026, Figma started charging for AI credits on top. If Figma raises prices again, you pay. If Figma gets acquired, you pray. If Figma shuts down, your files die with it. Your design system. On their servers. In a proprietary format only their app can read. To draw rectangles on a screen. There is an open source design platform that runs on your hardware. Stores your files in plain SVG. Costs $0 forever for unlimited users. It is called Penpot. 45,700+ stars on GitHub. A full Figma-grade design platform built on open web standards. Vector editing. Components. Design tokens to W3C spec. Flex and Grid layouts. Real-time multiplayer. Interactive prototyping. Here's what it does: → Real-time collaboration. Live cursors. Comments in line. → Components, variants, shared libraries. → Auto layout, Flex, CSS Grid. The tool outputs production CSS, not lookalike CSS. → Interactive prototypes with overlays, animations, and flows. → Inspect tab. Free. Built in. Every developer grabs production CSS, SVG, HTML without a separate seat. → Plugin ecosystem. Figma import to migrate your files. → Self-host on Docker in one command. Your designs never leave your network. Here's the wildest part: Figma stores your designs in a proprietary format only Figma can read. Penpot files are SVG. The same format your browser has rendered for 25 years. Open them in any editor. Open them in 20 years. Nobody can lock you out. The feature Figma charges your developers extra for, Penpot gives away. Without asking permission. Figma Professional: $20/month per seat. A 10-person team: $2,400/year. Figma Organization: $55/month per Full seat. A 50-person org: $33,000/year. Penpot: $0. Unlimited users. Unlimited files. Unlimited teams. Self-hosted. Free forever. 45,700+ stars. 2,700+ forks. 250+ contributors. MPL-2.0 license. Backed by a community that believes design tools should be free. Your designs. Your files. Your standards. 100% Open Source. (Link in the comments)

Nav Toor

216,542 Aufrufe • vor 3 Monaten

SonarQube has been catching my bugs and security issues for years. The only friction was having to leave Cursor or Windsurf to view the results. Their new MCP Server fixes that by bringing verification directly into the coding environment 🔥 This is actually perfect timing 🧵 ↓ Because we write more code than ever thanks to AI, yet productivity still doesn’t keep up. Google’s 2025 DORA Report shows the tension: → AI usage +90% → Bugs +9% → Review time +91% → PR size +154% (report here: The problem isn’t generating code. It’s verifying it quickly and reliably. And this is what SonarQube's new MCP Server brings instantly: - Live scanning → trigger SonarQube checks inside Cursor, Windsurf, Claude Code… basically any MCP-compatible IDE - Immediate surfacing → security, reliability, and maintainability issues in seconds - Smooth UI handoff → jump to the dashboard only when you need the full picture - AI-native workflow → Sonar’s long-standing rule engine integrated into your daily loop Why it’s great: • Removes constant tab-switching • Faster write → check → fix cycles • Lets the IDE handle speed while SonarQube handles structure • Feels like code quality finally meets AI-native development Setup is super simple: → Enable SonarQube's MCP Server in Cursor → Add your SonarQube instance → Open your repo → Run the scan directly inside the IDE I then pointed it to a JS component I’m building in Streamlit (psst, it’s called Streamlit ChartJS ;)) → Immediate results: security flags, reliability concerns, maintainability smells, and dependency risks ✅ Then I prompted: "Show me the full breakdown." → Cursor opens the SonarQube UI with rule details, severities, fix guidance, and project-wide quality signals! Exactly on point.

Charly Wargnier

22,702 Aufrufe • vor 8 Monaten

CSS in 2024 🤯 You can create a range slider with updating value tooltip and color changing track without using any JavaScript 🤯 ::-webkit-slider-thumb{ view-timeline: --thumb inline; } Scroll animation on the slider thumb that animates a number between the "min" and "max" of the range 😅 @​property --value { syntax: ' '; } @​keyframes sync { to { --value: 100; }} Tie that up to the contain animation-range ⚡️ .control { animation: sync both linear reverse; animation-timeline: --thumb; animation-range: contain; } Hoist the view timeline so the tooltip can use the value too! :root { timeline-scope: --thumb; } Then use it in the counter which goes in the tooltip 😇 .tooltip { counter-reset: val var(--value); } .tooltip::after { content: counter(val); } Then the accent color is based on the value too 🎨 [type=range] { accent-color: hsl(var(--value) 90% 65%); } The magic from the quoted post is using anchor positioning on the range thumb to position that tooltip 👏 Never thought of that when working on the spec for this API. This API lets you tether elements to other elements. Using the pseudo is a clever move! ::-webkit-slider-thumb { anchor-name: --thumb; } .tooltip { position: absolute; anchor-default: --thumb; left: anchor(50%); bottom: calc(anchor(top) + 25%); } The last piece is the little bounce transition... OK. I used a line or two of JavaScript for that 🙏😬 const updateDelta = ({ movementX }) => { document​.documentElement​.style.setProperty('--delta-x', movementX) } document.body.addEventListener('pointermove', updateDelta) But only so you can pass the movement delta to CSS and then reset the position with linear() to get that bouncy transition 😎 .hint { rotate: calc(clamp(-60, var(--delta-x) * -1, 60) * 1deg); transition: rotate 1s linear( 0, 0.2178 2.1%, 1.1144 8.49%, ... ); } Should probably do a video on this one. Lots of little tricks to break down with it for sure! 💯 As always, any questions, let me know! Also, this one only works in Chrome Canary with the Experimental Web Platform Features flag enabled ✅ This one almost feels like rocket science ha 🚀 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

251,867 Aufrufe • vor 2 Jahren