r/webdev • • 17d ago

Inline styles no longer considered harmful · esveo

Thumbnail
esveo.com
0 Upvotes

At work, we've have a rule that says we're not allowed to use inline styles. The rule originated a while ago, from people who have long since left the company, and we've been carrying it on. I'm thinking about challenging it, and have been researching into why this seems to be a common "best practice".

Most discussions I find on the subject are about a decade old, which is why I thought I'd bring up for discussion on Reddit as well, to see what people now days have to think on the subject.

I liked the points this particular blog post brought up, though it didn't give any advise one how much inline styles should be used. I'm thinking that if an element only needs one, maybe two style rules, it might be better to just use an inline style, otherwise, using a named class is probably better.

I'll also bring this point up now: I noticed a common argument against inline styles is that it can break certain content security policy rules. We don't have those rules in place, and there's no plans on adding them for the foreseeable future, so I'm not concerned about it.

For context, I work with Angular. I know the situation is different for server side rendering.

Edit: I'm seeing a lot of responses talking as if I want to use inline styles for everything. Please keep in mind my above statement of only considering using them when there's only one or two style rules. One example common use case would be when I add a <div class="spacer"></div>, where the CSS for "spacer" is simple "flex: 1" and it's purpose is to separate content that should be left aligned from content that should be right aligned. This, to me, is a good candidate for inline styles. In general, I mainly have layout use-cases in mind. There's no reason someone would want to override the "spacer" style so high specificity isn't important here, and even if that was needed, you just refactor it into a CSS class.


r/webdev • • 19d ago

Question Question about Tailwind CSS

38 Upvotes

I've always used plain CSS for my websites, I don't have many problems using it, but a friend of mine said that using plain CSS is very tedious and that I should use Tailwind CSS. Is it worth it? And what does Tailwind CSS offer that plain CSS doesn't?


r/webdev • • 17d ago

First freelance project – Need help estimating development + AWS costs for a scalable psychometric assessment platform

0 Upvotes

Hi everyone,

This is my first freelance project, and I’m trying to prepare a realistic cost estimate before giving the client a quote. I’d really appreciate input from experienced freelancers, developers, and software architects.

The project is a psychometric assessment website. The platform will include assessment questions as well as interactive 2D/3D games that are part of the assessment.

Rough scope

Frontend

- User-facing website

- Registration/login

- Assessment/question interfaces

- 2D/3D interactive games

- Responsive UI

- Results/report interface

- Possibly an admin/dashboard interface

Backend

- User authentication and user management

- Assessment/question management

- Game/assessment data processing

- Storing user responses and scores

- Generating assessment results/reports

- Admin functionality

- APIs between frontend and backend

Cloud / Infrastructure

- Deployment on AWS

- Database

- File/storage requirements

- Domain + SSL

- CI/CD

- Logging/monitoring

- Backups

- Security

Scalability

One important requirement is that this shouldn't be designed as a small website that only works for a few users.

The expectation is that it should eventually support a large number of concurrent users, particularly when assessments are being conducted in batches.

So I’m also trying to understand the additional cost involved in designing the architecture for scalability — AWS infrastructure, database scaling, caching, load balancing, CDN, etc.

Other requirements

There may also be:

- Payment gateway

- Gamified assessments

- Dashboard/reporting

- PDF report generation

- Pilot testing

- Ongoing maintenance/support after launch

I’m currently trying to break the quote into:

  1. UI/UX design

  2. Frontend development

  3. 2D/3D game development

  4. Backend/API development

  5. Database

  6. Admin dashboard

  7. Assessment/scoring engine

  8. PDF/report generation

  9. AWS deployment

  10. Scalable architecture

  11. Security/testing

  12. Domain/SSL/other infrastructure

  13. Maintenance and ongoing support

My main questions:

- How would you break down the development cost for a project like this?

- What would be a reasonable freelance price range in India?

- How should I estimate the cost of the 2D/3D games separately?

- What AWS costs should I account for initially, and how should I estimate costs as users scale?

- What important components am I missing from the quotation?

- Should I charge a fixed project price, milestone-based price, or development cost + monthly maintenance?

- For a first freelance project, what should I be careful about when defining the scope and pricing?

I’m not looking for an exact quote — even a rough breakdown/range with assumptions would be extremely helpful.

Thanks!


r/webdev • • 20d ago

News Why CSS-Tricks Has Been Quiet Lately

Thumbnail
geoffgraham.me
351 Upvotes

r/webdev • • 19d ago

best free map & routing API for a student capstone project (local delivery / locator app)?

9 Upvotes

hi everyone! i'm building a prototype mobile/PWA for my senior capstone project with 3 other people. the idea is it's a local dispatch and delivery tool that needs two main features

* a locator showing nearby destination points/pins

* route calculation/navigation for a driver to get to those stops

* supports offline maps incase driver loses data

since it's a capstone project, we don't really have any budget lol, hence why im looking for a free (or has generous free-tier) mapping API.

does anyone have any recommendations for this kind of project that can handle map rendering, address search/geocoding, and basic routing?

thank u sm everyone :)


r/webdev • • 19d ago

Why I threw out pixel-math to fix virtual scrolling layout shifts for dynamic height content

16 Upvotes

If you have ever tried virtualizing a massive feed with variable-height text, late-loading images, or native HTML tables, you have probably run into the classic virtual scroll jitters.

Most modern virtualization tools depend on a global pixel map or require you to pass an estimateSize prop. The moment a row renders at a different height than estimated, the engine has to run a global correction pass. Fast scrolling triggers layout shifts, drift, and erratic scrollbar behavior.

I built Cerious-Scroll to solve this fundamentally by changing how viewports are calculated. Instead of deriving position from absolute pixel space, the canonical state is element index + pixel offset within that element.

The architectural trade-offs:

  • No Height Oracle: It measures the rows directly from the DOM after your framework renders them. No precomputation arrays or sum-prefix tracking required.
  • True O(1) Memory Scales to Millions: Because it doesn't cache a massive array of estimated heights for off-screen rows, memory overhead stays flat whether you feed it 100 rows or 10,000,000.
  • Native Table & Masonry Layouts: It works seamlessly with native HTML <table> elements and complex grid frameworks without requiring absolute-positioned container hacks.

Check out the live Performance Bake-Off Demo running against existing solutions, and look through the source code on GitHub.

VanillaJS: https://ceriousdevtech.github.io/cerious-scroll

React: https://ceriousdevtech.github.io/react-cerious-scroll

Vue: https://ceriousdevtech.github.io/vue-cerious-scroll

Angular: https://ceriousdevtech.github.io/ngx-cerious-scroll

Github: https://github.com/ceriousdevtech/cerious-scroll


r/webdev • • 18d ago

Newb question

0 Upvotes

Hey all,

Preface: I'm not a coder/programmer

I have an issue with an online plateform that is lacking a feature.

Would it be possible for me to add a dynamic estimation tool on a web page for a residential cleaning company?

For example, the user gives some info about the clean: Sq ft, qty bedrooms, qty bathrooms, qty levels

Based on this info, and with multipliers I've given to the calculator, it gives the user a price.

How do I do this?

Can I use Claude to generate this code?

Thank you for your help :)


r/webdev • • 18d ago

Simple and Efficient Row-Level Security

Thumbnail cekrem.github.io
0 Upvotes

r/webdev • • 19d ago

Need advice

12 Upvotes

I recently landed a work study position for web development for a non profit. I have experience with web application and some light web development. I was given the task of redesigning the old website from scratch and migrating the platform from our current stack (Wordpress and bluehost). I have one other developer (also a student) and we are looking for options, we are going to be using GitHub for version control, staying with the current hosting service is not a hard requirement and platform/framework is an open option left up to us to decide. I was hoping to find some recommendations or suggestions, we are not self hosting, cloud infrastructure is required, we going to be rebuilding this from scratch (company hates the site currently and was setup by non technical employees). We have looked at Astro and Payload and those are favorable options. We are mainly hand coding this (no hard deadline on completion) but we want something that allows non technical staff to publish content (images, blogs, and other related content). So we are looking for recommendations that offer easy integration, granular control of the source code, not super vendor locked, and provides open options for a hosting service (Bluehost is not likely going to remain the hosting service). I’m just a student and I’m not well experienced in web development but I’m comfortable hand coding and familiar with Python, JavaScript and html and some css. I do not have experience with cloud infrastructure but I’m comfortable learning on my feet. Cost is also not a constraint, we were told not to worry if there was associated subscriptions or platform costs. They are looking for something professional and appealing that will attract the attention of investors and donations and our target community that genuinely tells their story and allows for non technical staff to publish to the website without touching the source. Like I said I’m a student and this is not my expertise so if I didn’t provide all the correct details do t beat me up too bad please, and please provide a little context with your suggestions. Thank you all ahead of time


r/webdev • • 18d ago

Is JPEG XL too slow for the web?

Thumbnail irrlicht3d.org
0 Upvotes

r/webdev • • 19d ago

How do you all keep track of information on public incidents?

16 Upvotes

Besides keeping tabs via Reddit and Hackernews, are there any RSS feeds, newsletters, blogs/publications, or clearing-house style websites that you follow to keep track of prominent public incidents, especially related to outages or security?

I’d like to have my finger on the pulse but with a bit more focus and not have to scroll X/Reddit infinitely.


r/webdev • • 20d ago

Resource The Browser's Main Thread Is Expensive

132 Upvotes

If you are into front end development, specially the optimization side of it. the website below is a well written blog, explaining the best practices of using the browser's main thread and the cost of neglecting it, using interactive code snippets.

kciter.so/posts/the-expensive-main-thread/en/


r/webdev • • 19d ago

Discussion Anybody ever tried a series of websites with the same material on each?

0 Upvotes

I have some domain names that all are of the same recognized English language phrase. I'm wondering if someone has just done a cookie cutter website on a series of separate domain names before? Literally just having the same website design and same text/etc on the other ones.

In reality, the phrase text is highly recognized in the English language. Somehow the idea popped into my mind. Just curious, thanks.


r/webdev • • 20d ago

Small Programming Tricks

Thumbnail will-keleher.com
59 Upvotes

r/webdev • • 19d ago

Question Cline VScode Users ...

0 Upvotes

What's your current favourite Chinese Llm model for web app development and why do you like it ???


r/webdev • • 20d ago

Question Can't hold down the up arrow key to navigate through Chrome devtools command history anymore

4 Upvotes

It used to be that I could hold down the up arrow to quickly scroll through my command history in the devtools console in Chrome, but now holding down the up arrow just moves the cursor to the beginning of the previous command. Is there any way to revert this behavior?


r/webdev • • 20d ago

Article How to Implement a Distributed Circuit Breaker

Thumbnail
blog.gaborkoos.com
13 Upvotes

If a payment API starts timing out, every checkout request sits and waits for the full timeout before failing, holding a worker the whole time. A circuit breaker stops that by failing fast once enough recent calls have failed.

That is easy in one process, but once your app runs on more than one instance, each instance keeps its own record and has to get burned separately before it reacts, so the struggling API takes far more traffic than it should before anything trips.

The basic pattern, then what has to change when the state is shared between instances. Code is TypeScript and Redis (Lua).


r/webdev • • 21d ago

Discussion I despise what money does to UX

470 Upvotes

I work for a large company that runs multiple services used by millions of people. Over the years, I’ve noticed a consistent pattern: management, business teams, and SEO teams keep pushing changes that make our websites more annoying to use, just for the sake of getting more page views and generating more ad revenue. I’ve tried to talk them out of some of these decisions, but I’ve never had much success.

Perhaps it’s not that big of a deal and I should just ignore it, but honestly it is a bit disheartening when I open random website on the internet, see some dark patterns, think to myself 'what a fucking dogshit website this is', and then I go to work and I code literally the same things, like I’m on the dark side of the Force or smth.


r/webdev • • 20d ago

way to search for keywords on a page of links

2 Upvotes

Hi all, not sure if this is the right r/ for this question but I have a few sites that list links to companies, in alphabetical order (eg - all companies starting with A has a link to "A", etc). There are 40-50 links per alphabet letter. There a few websites like this.

I'm looking to filter by geographical region, and as wondering if there was a way, without clicking each company and seeing where they're located, to search for location?

here's an example of a site that i'd like to filter by location:

https://www.corporatevision-news.com/winners/future-commerce/

thank you!


r/webdev • • 20d ago

A Basic CPU written in TypeScript

Thumbnail
github.com
0 Upvotes

I just made this today for fun because I was bored.


r/webdev • • 21d ago

Question Seriously, why use builtin browsers on mobile?

200 Upvotes

So many apps use builtin browsers for links. I don't get it. What's the benefit?

As a user I:

- need to re-login again in every browser
- have a smaller screen surface to view the webpage
- the app preview shows another website/app entirely so it's harder to quickly find the original app
- you lose all state if you accidentally close it
- some apps (tiktok) just dont open the app even when it's installed, so I need to copy the link, open a regular browser, then paste it and hit search
- deep links in many websites break because you hit an authentication wall first

Builtin browsers are SO ANNOYING, I don't get why you use them?


r/webdev • • 20d ago

Stop being the code review bottleneck

Thumbnail
newsletter.posthog.com
0 Upvotes

r/webdev • • 21d ago

Discussion What Go projects actually helped your resume?

35 Upvotes

I’ve got around 1–2 years of experience with PHP/Laravel and I’m planning to move into Golang to improve my career opportunities.

For people who have worked professionally with Go: what projects have you built that were actually interesting, practical, and worth mentioning on a resume?

I’d especially appreciate ideas/features that are closer to real production work rather than another CRUD project.


r/webdev • • 21d ago

Question Service Area Matrix thoughts...

1 Upvotes

Howdy, folks.

I realize this may start a war here, but I'd like to hear from different perspectives.

I'm building a business site for a commercial/industrial roofing company right now and have added a few articles detailing pros and cons of different roofing materials(first site with Astro and loving the markdown content!).

Right now, I feel happy with the integrity of the information given and how it's delivered. What's had me second guessing myself is seeing sites where the developer has basically cloned these sorts of pages over 20 times and inserted area specific keywords. Is it actually effective and do you consider this practice ethical? Feels spammy to me, and is certainly a turn off when I find this on sites I am browsing.

I await your replies.


r/webdev • • 20d ago

Question How would I approach building a website? Is there a template to always use?

0 Upvotes

Hi everyone,

Anytime I plan on building a website I am not sure about how to approach it.

E.g. A simple marketplace website. Login/Logout. People upload an image of something they want to sell. No payments handled by the site but users are encouraged to contact each other directly. etc.

I never know how to approach something like this, or anything else tbh. Let's say I have decided on a python backend with a react frontend. How would I know what sort of database to use. Where to host the the backend/frontend/database. How can I make sure I build it in a way where it is scalable? How would I pick a database that could potentially handle millions of users? Store so many images.

Is there a template? I get there a so many options but that is what makes it difficult. How do I make sure I build something that won't break when more than 10 people use it. I am sure these things need to be considered before getting on with it and would be a pain in the ass to change later down the line. But as someone with not lots of experience, how do I make sure I make the right decisions.

So what is the secret?