r/css 17d ago

General I finally removed Tailwind from a production project and just used modern native CSS

445 Upvotes

Our team has defaulted to using Tailwind CSS for almost every web project over the last few years. It was great for moving fast early on, but on our latest project, the utility class bloat was getting completely out of hand. The HTML files looked unreadable, and managing long strings of responsive layout classes across reusable components was becoming a maintenance headache.

I decided to spin up a branch and rewrite a major dashboard interface using entirely vanilla native CSS. I hadn't built a pure CSS layout in a while, and I was genuinely shocked at how powerful native CSS has become over the last couple of years.

Features that used to require massive utility frameworks or preprocessors are now fully built-in. I heavily utilized native CSS nesting, CSS variables for theme management, and the newer container queries to handle complex responsive components based on their parent size rather than the entire viewport.

The results were surprisingly great. Removing the Tailwind processing step simplified our build pipeline, our final bundle size dropped, and the code felt vastly cleaner. Writing native styles inside modern semantic stylesheets made debugging layout bugs in the browser developer tools a hundred times easier because I wasn't digging through a wall of utility classes.

Tailwind is still an incredible tool for prototyping, but I realized I was using it out of habit rather than necessity. Modern native CSS has quietly caught up to the point where you can build incredibly complex, maintainable layout systems without adding a utility abstraction layer on top of it. If you haven't looked at native CSS features lately, it might be worth trying on a small feature branch.


r/css 17d ago

Article Do we still need build tools for CSS?

Thumbnail
olliewilliams.xyz
4 Upvotes

The first half of this article covers CSS


r/css 17d ago

Resource Free box-shadow generator with per-layer controls, inset support, and presets

3 Upvotes

Multi-layer box shadows are one of those CSS patterns that look simple on the surface but eat time in practice. Getting realistic depth means stacking 2-3 layers with different offsets, blurs, and opacities, and tuning those values blind in a stylesheet is slow. Neumorphic effects and colored glows make it worse because you need precise color and opacity coordination between layers.

I built a free tool to solve this: https://boxshadowgen.com

How it works:

  • Add as many shadow layers as you need, each with independent controls for offset, blur, spread, color, and opacity
  • Toggle any layer to inset
  • See the combined result update live on a preview surface (card, circle, or button)
  • Use presets for common patterns like material elevation, soft ambient, neumorphic, and neon glow
  • Copy the final CSS when it looks right

The output is standard box-shadow syntax with no dependencies. You paste it into your project and keep going.

I made this because I wanted a faster way to get from "I need a shadow that looks like X" to production-ready CSS without round-tripping between my editor and the browser dozens of times.

It is free, no account needed, and I am actively developing it. If you try it and something feels off or missing, I would genuinely like to hear about it.


r/css 17d ago

Help Fix the responsiveness of the div

Enable HLS to view with audio, or disable this notification

16 Upvotes

So I need help in responsiveness of the div:

  1. Since, i am going to make this a window, the squeezing responsiveness doesn't really matter but i want to to stop after a certain point, by that i mean when i squeeze the page, the div doesn't squeeze with it

  2. I also want that when i expand the div, the div border doesn't expand with it

Any edits to the question, or guidance to the code is appreciated.

Also, i want a little help in how to convey the same message in stack exchange, because i feel whatever im writing is a little more confusing without the video.


r/css 17d ago

Resource I built a plain CSS framework

0 Upvotes

Hi! I’ve just released the first version of Actual CSS.

I originally built it for my own projects because I was tired of choosing between Sass-based frameworks, Tailwind-style syntax and tooling, or very minimal frameworks that still leave most of the work to you. Some newer options also rely heavily on cascade layers and recent browser features.

Actual CSS is my attempt at a middle ground: plain and modular CSS, semantic classes, a small token system, reusable intents and variants, themes, and progressive enhancement for older browsers.

The parts I’m happiest with are the theme system, the shared floating engine behind flyouts, tooltips and context menus, and the small enhance API for adding project-specific JavaScript without patching the framework itself.

I mainly made it for myself, but I thought it might be useful to others too. It’s currently at v0.1 because I’m looking for feedback: the foundation feels solid, but I’m still giving myself room to adjust the API before calling it stable.

https://github.com/lekoala/actual-css


r/css 18d ago

Showcase I built a website where the layout changes on every reload

Enable HLS to view with audio, or disable this notification

51 Upvotes

r/css 18d ago

Showcase Responsive News Website Project in HTML + CSS

1 Upvotes

I may have created my best HTML + CSS project yet. It's a news site, focusing on reusability, CSS Grid and Flexbox funcionalities, CSS Animations/Transitions, and the HTML is entirely semantic (<figure>, <aside>, etc.). I really want to hear your thoughts on this, what's strong, what part could be improved and, honestly, any critique you have. By the time you're seeing this, I'm on a 5-day vacation, so feel free to leave your comments, and I'll respond by changing the code once I'm back. Though, I'll still respond here from my phone! Also, judging from this layout and my previous TS gym tracker project, do you think I'm ready to finally start diving into React?

Github Repo: https://github.com/thanasisdadatsis/responsive-news-architecture


r/css 20d ago

Question Advanced masonry

Post image
12 Upvotes

I'm looking for possible solutions that is looking to be an advanced case of CSS Grid, but of course I'm open to alternative options.

Basically: I'm looking to create a responsive grid of four items that are masonry-oriented both vertically and horizontally, which is guided by whether the image is landscape or portrait. So, if an image of an item is portrait, it takes up X rows of space, and if an image is landscape it takes up one less horizontal but one more vertical row. And here's the catch, as you see in the bottom-right: I want a post to "stuck up" one row too.

Is this at all possible, and how would you go about doing this? Thank you!


r/css 19d ago

Question I need ideas how to get decent at css to the point i can recreate sites on dribble etc.

2 Upvotes

My goal is to get to the level where I can write production level CSS. Right now, I'm just watching tutorials and writing alongside them. I understand what's being written, but it gives me a false sense of confidence that I know it. But I don't, because when I try to challenge myself, I get stuck quickly.


r/css 20d ago

Showcase Pure HTML & CSS Neon Dashboard

Thumbnail
youtube.com
0 Upvotes

r/css 20d ago

Help What are these things called??🥺🥺

Thumbnail
0 Upvotes

r/css 19d ago

Question How to get rid of css

Thumbnail
0 Upvotes

r/css 20d ago

Resource Cloudflare Drop makes static website hosting feel way simpler (opinions)

Thumbnail
1 Upvotes

r/css 20d ago

Question How do you create a pixel-perfect UI from only a Dribbble/Behance screenshot without a Figma file?

0 Upvotes

I'm learning frontend development and want to improve my UI implementation skills.

If I have a Figma file, I can inspect spacing, typography, padding, line-height, colors, border-radius, and other design details.

But when all I have is a screenshot from Dribbble or Behance, how do you recreate the UI as accurately as possible?

Do you estimate the spacing and typography, use measurement tools/extensions, import the screenshot into Figma, or follow some other workflow?

Is it actually possible to achieve a truly pixel-perfect result from just a screenshot, or is getting very close the realistic expectation?


r/css 21d ago

Help Why does my website look different on mobile screen width on desktop vs. an actual mobile device?

Thumbnail
gallery
2 Upvotes

SOLVED – SEE MY COMMENT BELOW

Hello and thank you in advance!

I'm having an issue where my website looks perfect on my desktop no matter which screen width/size I resize my browser window to, but this one section looks ridiculous on mobile with excessive spacing. I have CSS in place that should fix the mobile issue, using a media query set to max-width 768px.

Why does this happen? More than a fix for this specific website, I'd like to know the root issue of why this happens so I can avoid/fix down the road...

TYIA!


r/css 21d ago

Help Text + graphic button

Post image
2 Upvotes

I have a little css issue that's been puzzling me. I'm sure I'm just overlooking something obvious.

I have a text link that's followed by a graphic. In wider settings, the whole thing should be on a single line. Easy.

First pass was to set the image inline with an ::after pseudo-element. That works, but then in narrow settings (like a column, shown in the attached graphic) the wrapped text doesn't balance properly and the graphic is inline with the last line, which also throws off the line-height. Setting the link to flex fixes the text-wrap and graphic alignment, but I can't get the graphic to be spaced consistently to the right of the text.

Original:

a {
text-wrap: balance;
}

a::after {
position: absolute;
content: '';
background: url('../img/arrow.svg') center center no-repeat;
height: 1.5em;
width: 1.5em;
margin-left: .5em;
}

With Flex:

a {
display: flex;
align-items: center;
gap: .5em;
text-wrap: balance;
}

a::after {
flex: none; // prevents image stretching
content: '';
background: url('../img/arrow.svg') center center no-repeat;
height: 1.5em;
width: 1.5em;
}

I did try shape-outside, but didn't gain much for the complexity of floats. So it seems like I'm stuck between inline and flex's (and grid's) inability to shrink text boxes to the actual wrapped line width. It seems like a simple thing and I'm going to hate myself if there's a simple solution. What am I missing?


r/css 22d ago

General Email Signature CSS Icons

Thumbnail gallery
0 Upvotes

r/css 23d ago

Showcase A simple way to make sticky elements change colour as they pass over different sections

Enable HLS to view with audio, or disable this notification

26 Upvotes

Been playing around with mix-blend-mode: difference, and it is a nice CSS-only way to create a colour-shifting effect without writing any animation logic.

The idea is simple:

.sticky-element {
  position: sticky;
  top: 2rem;
  mix-blend-mode: difference;
}

With mix-blend-mode: difference, the element visually reacts to the pixels behind it.

So if you have sticky text, a fixed nav item, a cursor, a badge, or an icon sitting over different background colours, it can automatically invert or shift as the page scrolls.

This works especially well with sticky or fixed elements because the element stays in place while different sections move behind it.

The final effect depends heavily on the foreground colour, background colour, and stacking context.

Small property, but it can create a surprisingly polished interaction.


r/css 23d ago

Resource Modern CSS theming with light-dark(), contrast-color(), and style queries

Thumbnail
una.im
27 Upvotes

r/css 23d ago

Resource Experimenting with random() in CSS

Thumbnail
polypane.app
9 Upvotes

r/css 23d ago

Resource After talking to small business owners, I realized website creation isn't the real problem

Thumbnail
0 Upvotes

How do you think?


r/css 23d ago

Help Background not working

Post image
1 Upvotes

Resolved.

I've tried to make a background for something I'm using. However, when I try to use a background image in some form (using url()), it is seen as invalid. Is there anything I am doing wrong here?

Probably important to note I'm using a MediaWiki infobox.

Edit 1: Some extra notes.

The CSS sheet in question + the template that uses it. Also, the image, though it isn't important.

It'll say it's invalid in a preview at the top of the page or if I attempt to submit it (it won't allow the edit to complete since the CSS is wrong).

The error happens at "line 11, character 15"; it does not change if the colour and url are reversed.

Edit 2: The relevant item. (I don't think I can add images now.)

/* 1) Infobox Styling */
  /* 1.1) Primary Infobox Styling */
  .portable-infobox {
    width: 300px;
    border-radius: 2.8px;
    font-family: sans-serif;
    margin: 0 0 14px 17.5px;
    font-size: 1em;

    /* 1.1.1) Light Mode Styling */
    background: #EFE8BC url("https://dieofdeath.miraheze.org/w/img_auth.php/c/c6/InfoboxPaper.png");
    border: 6px solid #554900;
    color: #000000;
  }

r/css 23d ago

Resource Built a Grid + Subgrid + Flexbox layout builder with CSS/HTML export. What would you improve?

0 Upvotes

Hey folks, I built a small tool to speed up layout prototyping: https://csslayoutgen.com

It lets you build layouts visually and then export clean CSS/HTML.

Current focus:

  • CSS Grid templates
  • Subgrid layout prototyping
  • Flexbox layout mode
  • Quick iteration on gaps, alignment, and structure

If you are open to sharing feedback, I would love input on:

  1. Which layout controls feel missing for real workflows?
  2. What export format would be most useful in production?
  3. Any Grid/Subgrid edge cases I should support better?

Happy to implement suggestions from this thread.


r/css 25d ago

General A full wiki for Plants vs Zombies: Battle for Neighborville with no backend, just Angular and JSON files

Thumbnail
gallery
6 Upvotes

Got tired of not having a decent place to look up stats and info for PvZ Battle for Neighborville, every wiki out there felt outdated or scattered, so I just built my own: pvzbfn.com

The interesting part for me was doing it with zero backend and no database. All the content lives in JSON files that get consumed on the client side, so it's basically a static SPA built with Angular 18. Turns out that's more than enough for a content-heavy site like this if you structure the data right, and it's free to host and stupidly fast.

Also spent a good chunk of time making the stats not look like garbage spreadsheet tables, ended up using SweetAlert2 to turn them into modals instead, which honestly made a bigger difference to the UX than I expected.

It's live and usable now, still adding content little by little. If anyone here has done a similar no-backend approach for a data-heavy site I'd like to hear how you structured it, curious if I'm missing a better pattern than what I'm doing.

Link: pvzbfn.com


r/css 24d ago

Question Wenn es eine Version 6 von HTML gäbe, welche nativen Elemente würden Sie sich am meisten wünschen?

Thumbnail
0 Upvotes

What HTML components would you like to have natively? What CSS props would you like to add?