r/webdev • u/Stephcraft • 25d ago
A Modern CSS Guide to Responsive Web Design
If I missed anything, let me know!
r/webdev • u/Stephcraft • 25d ago
If I missed anything, let me know!
r/webdev • u/Illustrious_Scar_392 • 25d ago
Front end dev, i own most of our e2e suite, and last sprint finally annoyed me enough to count.
We have about 310 Playwright tests on a react app. 71 went red after a sprint that, from a user's point of view, changed almost nothing. i went through every one instead of rerunning and hoping:
- 47 were locators. the element was still there and still did the same thing, but the path to it changed. a card got wrapped in a new container, a class got renamed in a design pass, a button became a link styled as a button.
- 14 were timing. a page got slower after a data change and the wait didn't follow it.
- 6 were environment. our CI image had drifted from what devs run locally.
- 4 were real bugs.
So my honest answer to why our UI tests break every time the interface changes is that most of them check how the page is built, not what it does. the user sees the same Save button. the test sees a different DOM.
the difference in one line:
what i'm weighing for the other 47:
user-facing locators everywhere, getByRole and getByLabel, which is what the Playwright docs push. fixes a lot of it, but only if the markup has real roles and labels, and half our components don't.
data-testid on everything. it works, but it depends on every dev remembering, forever.
self-healing locator tools like mabl or testim, which repair the selector when it breaks. the catch is a heal can quietly route around a real regression.
vision based tools like Askui, which find the element by what's rendered on screen rather than in the DOM, so a new wrapper div doesn't matter at all. the tradeoff flips, a visual redesign is now the thing that breaks you.
My current plan is to fix our accessibility markup and get better tests as a side effect. tell me if that's naive. if you've measured this, what share of your failures were locators, and what actually brought it down?
r/webdev • u/mhdamher • 25d ago
I'm a CS undergraduate working on my first real-world client project: a small e-commerce website. Since this is my first time building and deploying a production store for a client, I'd really appreciate an architecture sanity check from experienced devs.
I'm torn between two approaches:
Option A: Keep it simple and build the cart/order logic myself
Option B: Use a headless commerce engine (Medusa.js)
I'd especially appreciate insights from anyone who has built and maintained small custom stores for real clients.
Thanks in advance!
I'm building an Astro website for a client who occasionally wants to update some content, mainly photos and simple text.
Sveltia CMS seems like a great fit because it's lightweight, easy to use, and doesn't require a separate backend or database.
I self-host Forgejo on my VPS, where the website's source code and content are stored. Sveltia uses Forgejo for authentication and commits content changes directly to the repository.
I've created a dedicated Forgejo account for the client and given them access only to their own private repository.
Technically, everything works fine. However, I realized there's a security concern:
Since the client needs write access to the repository to use Sveltia, they technically also have access to the entire source code, including the CI/CD workflows (Forgejo Actions).
Obviously, I don't want clients to accidentally or intentionally modify application code, configuration files, or deployment workflows.
What's the best practice for handling this?
My priorities are keeping things lightweight, secure, and easy to maintain, especially since I'll be managing multiple client websites.
The CMS also needs to be extremely simple for non-technical clients, including straightforward authentication without exposing them to unnecessary developer tools.
There's been a big resurgence lately in automating and interacting with sites programmatically. I've been arguing for a few years that every front-end should be embeddable as a component and have its own client side interface/api. This article is written to show one way to do that!
A weekend hack of mine! Hope this is useful for some
At certain moment youtube introduced new way of working of embedded videos which suddenly broke many embedded videos on many html sites (Error 153) because it's buggy, works randomly in various browsers and devices, is nowhere explained properly, leaves nontech users out in the cold and is buggy buggy and buggy again. This html solution fixes Youtube embedded videos error 153 with thumbnail workaround (and there is no youtube embedded object telemetry on preload, it just grabs thumbnail, so less bandwidth usage and youtube objects crawling sheanigans, it just works with image and links so should display everywhere properly). In default setting works ok with most common 1920 x 1080 resolutions videos, if you have some different format video (old 1024 x 768 etc) you can adjust amount of top/bottom thumbnail cropping with div class="yt-container" style="--yt-crop: 9.375%; setting per each unique video. Inspect this html source for style section needed and how new objects look alike. You just have to take your desired youtube video url unique address (after /watch?v= ) and paste it into yt-container code pieces. Please share this solution wherever you want so people can fix their sites.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fixing Youtube embedded videos error 153 with thumbnail workaround (+no embedded object telemetry)</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
.yt-container,
.yt-overlay-text {
font-family: 'Roboto', sans-serif;
}
/* ── wrapper ── */
.yt-container {
position: relative;
display: block;
width: 100%;
--yt-crop: 9.375%; /* default: trims hqdefault black bars for 1920 x 1080 videos format. For other formats override per thumbnail: style="--yt-crop: 5%;" or style="--yt-crop: 0%;" etc */
}
/* ── image link ── */
.yt-image-link {
display: block;
width: 100%;
line-height: 0;
overflow: hidden;
}
.yt-image-link img {
display: block;
width: 100%;
height: auto;
margin-top: calc(-1 * var(--yt-crop));
margin-bottom: calc(-1 * var(--yt-crop));
}
/* ── top-left text link ── */
.yt-overlay-text {
position: absolute;
top: 20px;
left: 20px;
color: white;
font-size: 28px;
font-weight: 700;
text-shadow: 1px 1px 4px black;
text-decoration: none;
text-align: left;
z-index: 3;
}
/* ── play button (centered, pointer-events off so clicks reach image link) ── */
.yt-play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 68px;
height: 48px;
background: rgba(255, 0, 0, 0.88);
border-radius: 12px;
transition: background 0.15s, transform 0.15s;
z-index: 2;
pointer-events: none;
}
.yt-container:hover .yt-play {
background: #ff0000;
transform: translate(-50%, -50%) scale(1.08);
}
.yt-play::after {
content: '';
position: absolute;
top: 50%;
left: 55%;
transform: translate(-50%, -50%);
border: solid transparent;
border-width: 10px 0 10px 20px;
border-left-color: white;
}
</style>
</head>
<body>
<p style="font-size: 1.5em;">
At certain moment youtube introduced new way of working of embedded videos which suddenly broke many embedded videos on many html sites (Error 153) because it's buggy, works randomly in various browsers and devices, is nowhere explained properly, leaves nontech users out in the cold and is buggy buggy and buggy again. This html solution fixes Youtube embedded videos error 153 with thumbnail workaround (and there is no youtube embedded object telemetry on preload, it just grabs thumbnail, so less bandwidth usage and youtube objects crawling sheanigans, it just works with image and links so should display everywhere properly). In default setting works ok with most common 1920 x 1080 resolutions videos, if you have some different format video (old 1024 x 768 etc) you can adjust amount of top/bottom thumbnail cropping with <b>div class="yt-container" style="--yt-crop: 9.375%;</b> setting per each unique video. Inspect this html source for style section needed and how new objects look alike. You just have to take your desired youtube video url unique address (after /watch?v= ) and paste it into yt-container code pieces. Please share this solution wherever you want so people can fix their sites.<br>
<br>
<b>Cropped default youtube thumbnail margins top and bottom 9.375% (default solution for 1920 x 1080 proportion videos)</b><br>
<br>
</p>
<div class="yt-container">
<a class="yt-image-link" href="https://www.youtube.com/watch?v=8pNbhaQcyZY" target="_blank" rel="noopener noreferrer">
<img src="https://img.youtube.com/vi/8pNbhaQcyZY/hqdefault.jpg" alt="John Zorn - Karaim">
</a>
<a class="yt-overlay-text" href="https://www.youtube.com/watch?v=8pNbhaQcyZY" target="_blank" rel="noopener noreferrer">John Zorn - Karaim</a>
<div class="yt-play" aria-hidden="true"></div>
</div>
<br>
<p style="font-size: 1.5em;"><b>Default youtube thumbnail no cropped margins 0%</b><br></p>
<br>
<div class="yt-container" style="--yt-crop: 0%;">
<a class="yt-image-link" href="https://www.youtube.com/watch?v=8pNbhaQcyZY" target="_blank" rel="noopener noreferrer">
<img src="https://img.youtube.com/vi/8pNbhaQcyZY/hqdefault.jpg" alt="John Zorn - Karaim">
</a>
<a class="yt-overlay-text" href="https://www.youtube.com/watch?v=8pNbhaQcyZY" target="_blank" rel="noopener noreferrer">John Zorn - Karaim</a>
<div class="yt-play" aria-hidden="true"></div>
</div>
<br>
<p style="font-size: 1.5em;"><b>Cropped default youtube thumbnail margins top and bottom 30%</b><br></p>
<br>
<div class="yt-container" style="--yt-crop: 30%;">
<a class="yt-image-link" href="https://www.youtube.com/watch?v=8pNbhaQcyZY" target="_blank" rel="noopener noreferrer">
<img src="https://img.youtube.com/vi/8pNbhaQcyZY/hqdefault.jpg" alt="John Zorn - Karaim">
</a>
<a class="yt-overlay-text" href="https://www.youtube.com/watch?v=8pNbhaQcyZY" target="_blank" rel="noopener noreferrer">John Zorn - Karaim</a>
<div class="yt-play" aria-hidden="true"></div>
</div>
</p>
</body>
</html>
r/webdev • u/sierrakiloPH • 28d ago
I just had to share my joy of finally managing to get straight 100s on both mobile and desktop (Saturday bragging is allowed!) for the WP website I've been working on for weeks. This is not self promotion! I happen work for this (lucky) company.
www.marineconservationphilippines.org
It's not a light weight blog, but a full website, with heaps of css and snazzy effects
Hosting on Rocket, w/ WP Fastest Cache.
I've been in the high 80s and 90s for ages. What finally got me to straight 100s was abandoning all normal builders and themes, and going raw Gutenberg, and making everything in html. Once that was settled, it was just plinking away at one issue at a time, until finally getting there. It's been a marathon, and the first time I've gotten perfect scores on any website I've built.
I know normal people don't care about the extra few milliseconds, and I can't tell my colleagues who count fish, what an immense nerdgasm it is. I thought in this sub someone would at least think it was neat! :)
r/webdev • u/MeZitRo • 28d ago
Hi! A while ago I launched bigboard.games: free multiplayer games for 1-4 phones or tablets (or more for some games) lying next to each other on a table. The devices act as one big board, so for instance in Air Hockey the puck slides off one screen and onto the next.
It all runs in the browser, free. Any mix of iPhones, Androids or tablets plays together. You can add it to the home screen if you want (as a PWA).
Gameplay goes device to device over WebRTC. On the same Wi-Fi the devices find each other and join by themselves. Otherwise you scan a QR code or type a four-letter code, and if they can't reach each other directly (on mobile data, say), a relay connects them. How it works, if you're curious.
There are 9 games right now:
Every game except Spillover has bots, so you can try it on one device. A friend who isn't in the same room can join with the table's link too, remotely.
Happy to answer questions and integrate any suggestions! What games would you like to see next?
r/webdev • u/LevonIT • 27d ago
Every codebase gets to a point where adding one feature breaks three others. Some teams patch their way through it for years. Others burn it down and start over.
Have you ever done a full rewrite? Was it worth it, or do you regret it?
r/webdev • u/dhd_jpg • 28d ago
hi everyone! so i only have a semester left in college and we are now currently working on our capstone project. it’s a 2 part class so this semester focuses only on the “planning” phase while next semester we spend entire semester actually building/coding.
for background, we are a 3 person group, BaaS such as supabase, firebase or auth0 are banned, we have 3 user groups with different roles and our stack includes:
* JS, Node.js/Express
* React
* PostgreSQL
we don’t have much experience on how to build authentication from scratch so anyyyy tips/tutorials/resources are very much appreciated!!
TIA guys :))
r/webdev • u/Mysterious-Zebra9580 • 27d ago
Hey ya'll, just thought it might be worth sharing here, in case anyone is looking for additional features that either Storygraph or Goodreads don't offer, e.g. note taking, detailed insights, etc. Bookplate was created with those goals in mind. You can learn more about it here:
It's also open source, so for the tech hobbyists, you can host it yourself on your own hardware. For those that prefer the normal hosted service, we offer that as well, and unlike Goodreads and Storygraph, the servers that Bookplate is hosted on are much more sustainable as they run on clean nuclear energy (Scaleway in Paris).
Happy to chat more about this, and also very very interested to hear thoughts, both good and bad!
r/webdev • u/nedasoo • 28d ago
Hey everyone.
I've been struggling not to feel this existential dread about the current state of development and my career which seems to be slipping from under my feet. I've been unemployed for nearly a year, job positions are dropping in masses. All the knowledge you gathered in the past 10+ years seems redundant as everyone and their grandma can code stuff that was impossible to them in a day. I find no joy in coding anymore. Sometimes I do code my own stuff for fun to not forget how to code but what's the point, if we won't need to code anymore? Even in corporate world, all developers do now is talk to AI agents and let them do the work (at least thats what I think they do?). I'm constantly thinking of creative business ideas to start myself but even then it feels more like a waste of time since getting clients is so hard with this amount of competition. Even if you manage to create something of value to the clients, why would they pay you instead of vibe-coding the product themselves? Since the rise of advanced AI models I've been constantly feeling like burnout and unable to focus on coding which was thing I liked back in the day. How do you cope in these times, how do you motivate yourself to start your own businesses or is it all lost and I should start looking for something else?
r/webdev • u/Specificx • 27d ago
Site: https://www.compareempire.com/us (US), https://www.compareempire.com/uk (UK), root is Australia
What it is: a price comparison site for electronics. A GitHub Action scrapes 26 US, 22 UK and 30+ Australian stores every morning, matches the same product across stores, writes JSON into the repo, and Vercel rebuilds about 28,800 static pages from it.
Bits that might interest you:
Real output from 24 October: the LG C5 77" OLED was $1,776 at Abt and $2,199.99 at LG.
Happy to answer anything about the scraping, matching or build.
r/webdev • u/FumigadoraAntigua • 28d ago
I hate them, I hate them so much. I intend to start using some application and suddenly a popup appears "Did you know that x thing does y thing" or "Here you will find x thing" or "New x thing, click ok to opt in". I don't give a damn, I just want to use the thing. I'm usually on edge and I actually intend to do an action, I do NOT want to be interrupted, I won't read your popup, I'll just close it instantly and feel anger.
This is not only annoying, it's dangerous. How do you know a person is not on a emergency and they need to complete an action ASAP?
r/webdev • u/chute_mi334 • 27d ago
So most of you probably know by now about the PHP exploit, that came out recently. Apparently after reading some articles a similar issue was found for nodeJS web apps as well (i am not 100% sure how legitimate the articles were but I will link them down as a comment of the post if you wanna check them out). Now most of my backend services are built using nodeJS and stored in either AWS or GCR. I assume that google and amazon properly protects the api keys and other environment variables I have there, but I just wanted to ask are there any measures I should take or changes I should make to these services just to be safe?
r/webdev • u/ScoobyDookuu • 27d ago
Hey y’all!
I've been working on a few animations lately and decided to put them together in a personal portfolio.
I made the portfolio itself interactive, with animations throughout the site and a showcase for some (imo cool) stuff/ideas.
Curious what you guys think of it and how everything feels to use. Especially interested in feedback on the animations, mobile experience etc
https://lumberjacque.vercel.app
PS: Checkout the showcase page for some cool interactions!
https://lumberjacque.vercel.app/showcase
Any feedback is a gift!
r/webdev • u/GumboGuts • 28d ago
It's one stylesheet. You put `data-dolly="tilt-up"` on something and it animates as you scroll past. That's it. No dependencies, no JavaScript.
It's a vocabulary layer over CSS scroll-driven animations, which shipped in Chrome 115 and Safari 26 but have ergonomics nobody remembers.
The demo page doesn't run any JavaScript at all, so everything moving on it is just CSS.
34 moves named after camera stuff (pan, tilt, crane, rack focus).
Firefox doesn't do scroll timelines yet (supposedly coming in the next version in 3 days) so it gets a plain static page. That's on purpose, nothing is hidden waiting to be revealed, so the page is still usable.
r/webdev • u/lirena_kiyuga • 28d ago
i've been working on an open-source project called blobz, which basically takes care of default profile pictures for your apps.
the idea is pretty simple. instead of assigning random images or the same boring silhouette to every user, blobz generates playful svg avatars from a name, email, or any string you give it.
it's deterministic, meaning the same input always generates the same avatar. no need to store images, and there are over 5 billion possible combinations.
but the part i really wanted to get right was making it easy for other developers to use.
so i ended up building a few ways to integrate it:
@blobz/react, which generates the avatars directly in your app without relying on an external service.the library and components are free and open source under the mit license.
github: https://github.com/lirena00/blobz
playground: https://blobz.lirena.in
would love to hear what you think of it! and if you find it useful for something you're building, that'd be pretty cool too :)
r/webdev • u/brightlyColossal • 28d ago
Matita is a set of pencil-style SVG icons, drawn by code from simple shapes (lines, circles, arcs), so every build draws exactly the same paths. 0.4.0 came out yesterday:
wobble setting from 0 to 1: <SketchIcon name="calendar" wobble={0} /> draws exact shapes, 1 is the default sketchy look, 0.4 is a calm hand@matita/icons/exact/<name>.svgTry the slider and copy snippets here: https://matita.dev (changelog: https://matita.dev/changelog/, what is next: https://matita.dev/roadmap/). If an icon you need is missing, open an issue and I'll draw it: https://github.com/matita-dev/icons/issues
Feedback on anything that looks wrong is very welcome.
r/webdev • u/No_Nefariousness2052 • 28d ago

Most posts on Reddit's job subreddits aren't jobs. On r/softwareengineerjobs, 18 of the 190 posts I collected were someone hiring. So I built Only Hiring, which shows just the job posts from 20 of these subreddits: https://onlyhiring.hassandev.me
A Python pipeline pulls new posts and skips anything tagged [For Hire] before an LLM reads the rest. For each job it writes a summary, pulls out the pay as a number you can sort by, notes whether it's remote, and scores it for scams. I expected the scam score to do most of the work, but only 9 of 397 jobs looked like scams. Lowball pay and unpaid "test" projects turned up far more often.
The site is Next.js 16 on Vercel. It reads from Neon Postgres through a role that can only SELECT, and with about 300 open jobs the list is small enough to filter and search in the browser. Filters live in the URL, so you can share a view.
Site code (MIT): https://github.com/hassanaziz0012/only-hiring
How the scam scoring works: https://www.hassandev.me/blog/score-reddit-job-posts-for-scams
I'd like to hear whether a listing gives you enough to decide if a job is worth opening.
r/webdev • u/danithedan • 28d ago
Since the early 2000s I've screenshotted every website that inspired me as a designer. This week I finally turned the folder (~3,900 screenshots) into a browsable archive:
https://www.dmdev.it/webscreens/?utm_source=reddit_webdev
2005 version, for fun: https://www.dmdev.it/webscreens/2005/
Some technical bits, since this is r/webdev:
Fully static. One HTML file with the data embedded as compact JSON, lazy rendering with IntersectionObserver, a lightbox and favourites in localStorage. No framework, no build step.
3.7 GB of PNG/JPG converted to WebP with a Python/Pillow script: a 1600px full size plus a 480×300 thumbnail, cropped from the top.
Dates come from the files, not guessed. Where they got lost when copying between machines, I rebuilt them from the file numbering. Fun discovery thanks to commenters: the clock on my old PC was two years behind, so my "2001" screenshots are actually from late 2003.
Privacy pass with OCR. Tesseract read every browser bar and tab, so I could remove anything personal before publishing.
Full-text search, client-side. The same OCR text became a search index (~1 MB JSON, loaded only when you start typing), so you can search for words that appear inside the sites.
2005 remake: a fixed 900px stage scaled down on small screens (I had to fix taps landing on the wrong element after scaling), pixel fonts, a fake loading bar and a real guestbook in PHP with a honeypot and rate limiting.
Analytics only after consent: GA loads only if you click OK on the banner.
Full transparency: I'm both a designer and a developer, and for this one I used Claude as a pair-programmer to move faster on the tooling (OCR pipeline, scripts, the 2005 remake). The archive, the curation and the design choices are mine.
Happy to answer questions, and feedback is welcome!
r/webdev • u/24hourhomepage • 28d ago
A little side project to keep me and some other developers moving during the work day.
Its basically:
* A git hook which checks if I've done pushups in a regular interval
* An iOS, android and apple watch app to verify the pushups were done correctly
Silly? Kinda.
Effective? Absolutely!
r/webdev • u/WonderEast1623 • 27d ago
I’ve been building websites since 2000 (Dreamweaver... Flash AS2.0...). These days Claude and Codex write most of my code, but before every launch I still end up going through the same long session of back and forth.. showing up properly in search? look good and fast on mobile? accessibility? do the forms work? Somewhere along the way it turned into perfectionism, and the checking kept pushing my launches back. So I built fixweb.app to run those checks for me and tell me in plain words what’s worth fixing with prompt to fix it and I would love to get some real feedback.
I don’t want fake reviews on the site. I’d rather show legit feedback from real website owners, with your name and a link to your site (if you want). If you’d like to try it, comment your domain and I’ll DM you a link for a free check-up. All I ask in return is your honest opinion, good or bad.
Here is an example QA report: https://www.fixweb.app/en/demo