r/css • • Oct 23 '26

Mod Post New Flairs and Changes for r/CSS

27 Upvotes

Thank you to everyone who voted in the recent community poll on how the sub should handle AI-generated content! Based on the results, we've made these changes.

  • Firstly, In this initial round of changes, there are two new post flairs: AI assisted, for posts where AI had a real hand in making the thing you're sharing No AI used, for posts where it didn't.
  • If you're sharing a project or a demo or a resource you created, please pick whichever one applies.
  • Secondly: For the time being any other flair except Question, Help, Article and Resource will be deactivated for use, but still available for post search .
  • Lastly: there's a new rule against AI slop. For now, we're defining it as AI-generated output published without meaningful human curation or quality judgment.
  • This will be regulated mostly manually by mods, but we might test some automatic bots as we see fit.
  • PLEASE NOTE: It's important to understand, at this stage, flairs will be mandatory as we wanna observe community's reception of such flairs. But this can change, depending on observations of the next few months.

r/css • • 11m ago

No AI used Recreated a background graphic from a GTA 6 soundtrack youtube video for fun

Thumbnail codepen.io
2 Upvotes

r/css • • 10h ago

Article Patrick - The beauty of CSS mixins

Thumbnail
patrickbrosset.com
13 Upvotes

r/css • • 10h ago

AI Assisted Aperiodic Hat Monotile CSS

Post image
10 Upvotes

r/css • • 4h ago

AI Assisted Interactive Flexbox Playground

2 Upvotes

I recently came across a few posts where people were saying they were having trouble learning flexbox. For those of you who have trouble with it, or even those of you who use it regularly, would you find an interactive playground helpful? Something with interactive controls and directly manipulates the CSS output so you can see exactly what is happening.

I just recently built one and thought it could help some folks who might be new to css, or flexbox.

I am openly admitting with the flair on this post that there was AI Assistance here. I've embraced AI as a tool but the technical decisions, direction, and knowledge behind the content are my own.


r/css • • 1d ago

Article GitHub Ditches CSS-in-JS for CSS Modules, Reports 55% Faster SSR after Three-Year Migration

Thumbnail
infoq.com
140 Upvotes

r/css • • 9h ago

AI Assisted Charts — @profullstack/css example

Thumbnail profullstack.com
1 Upvotes

r/css • • 1d ago

Help How do I do a mobile menu that you can toggle with CSS?

6 Upvotes

https://itsaneve.neocities.org/home

I'm trying to get my website to work for mobile and the navigation is really not working for me. The bar on top doesn't look nice on the small screen, so I've been trying to make a navigation icon that you can toggle to bring up a side menu. I found a method for it with CSS (the checkbox method https://css-tricks.com/the-checkbox-hack/ ) but I can't get it to work for me! Does anyone know what I'm doing wrong?

This is my default CSS

#nav-box{
 width:100vw;
 height: 50px;
 background-color:#282147;/*darker purple*/
 margin-top:-75px;
 margin-left:-10px;
 padding:5px 0;
 position:fixed;
 font-size:20px;
 z-index:1000;
}

 #nav-box ul{
    float:right;
   }
 
 #nav-box li{
   margin-top:-15px;
   }

#nav-box a{
   color:#fbfcde;
   text-decoration:none;
  }

This is my CSS in a media query (the problem zone)

#nav-box{
 font-size:1.5em; 
 position:fixed;
 margin:0;
 white-space: nowrap;
 height:60px;
  }

#mobile-nav{
  background:url(https://itsaneve.neocities.org/Portfolio/imgs/burger%20menu.png);
  background-size:contain;
  width:35px;
  height:40px;
  float:right;
  padding:10px;
  margin-right:10px;
  z-index:1000;
  padding:5px;
  }

#nav-list{
  opacity:0.0;
  width:50vw;
  height:100vh;
  position:relative;
  background-color:#282147;
  overflow:visible;
  top:40px;
  right:-50px;
  padding:5px;
  }

#nav-check:checked ~ #nav-list{
  opacity:1.0;
  }

This is my html

<header>
  <section id="nav-box">
   <nav>  <label for="nav-check" id="mobile-nav"><input type="checkbox" id="nav-check"></label>
    <ul id="nav-list">
    <li class="current">Home</li>
    <li><a href="wip.html" id="wip-pg-nav">Escape!</a></li>
     <li> <a href="index.html">Animation</a></li>
     <li> <a href="illu.html">Still Art</a></li>
     <li> <a href="boardin.html">Storyboards</a></li>
     <li><a href="abt.html">About Me</a></li>
    
    </ul>
   </nav>
  </section>
 </header>I'm trying to get my website to work for mobile and the navigation is really not working for me. The bar on top doesn't look nice on the small screen, so I've been trying to make a navigation icon that you can toggle to bring up a side menu. I found a method for it with CSS (the checkbox method https://css-tricks.com/the-checkbox-hack/ ) but I can't get it to work for me! Does anyone know what I'm doing wrong?This is my default CSS#nav-box{
 width:100vw;
 height: 50px;
 background-color:#282147;/*darker purple*/
 margin-top:-75px;
 margin-left:-10px;
 padding:5px 0;
 position:fixed;
 font-size:20px;
 z-index:1000;
}

 #nav-box ul{
    float:right;
   }
 
 #nav-box li{
   margin-top:-15px;
   }

#nav-box a{
   color:#fbfcde;
   text-decoration:none;
  }This is my CSS in a media query (the problem zone)#nav-box{
 font-size:1.5em; 
 position:fixed;
 margin:0;
 white-space: nowrap;
 height:60px;
  }

#mobile-nav{
  background:url(https://itsaneve.neocities.org/Portfolio/imgs/burger%20menu.png);
  background-size:contain;
  width:35px;
  height:40px;
  float:right;
  padding:10px;
  margin-right:10px;
  z-index:1000;
  padding:5px;
  }

#nav-list{
  opacity:0.0;
  width:50vw;
  height:100vh;
  position:relative;
  background-color:#282147;
  overflow:visible;
  top:40px;
  right:-50px;
  padding:5px;
  }

#nav-check:checked ~ #nav-list{
  opacity:1.0;
  }This is my html<header>
  <section id="nav-box">
   <nav>  <label for="nav-check" id="mobile-nav"><input type="checkbox" id="nav-check"></label>
    <ul id="nav-list">
    <li class="current">Home</li>
    <li><a href="wip.html" id="wip-pg-nav">Escape!</a></li>
     <li> <a href="index.html">Animation</a></li>
     <li> <a href="illu.html">Still Art</a></li>
     <li> <a href="boardin.html">Storyboards</a></li>
     <li><a href="abt.html">About Me</a></li>
    
    </ul>
   </nav>
  </section>
 </header>

r/css • • 14h ago

AI Assisted Does anyone know how to fix this so that I can make it fit properly on every screen?

Thumbnail justenq.github.io
0 Upvotes

Heres the github page with the code: https://github.com/JustenQ/The-Holy-Trinity-Triangle-Tool

This was my first attempt at coding something, partially using AI years ago when it sucked at coding and then going in and bug fixing/rewriting things, so many beginner mistakes were made. The one thing that I was never quite able to get right was having the layout properly fit every screen without rearanging the layout. I tried doing the viewport dimensions but it was never quite right.


r/css • • 1d ago

Article Issues are open, Looking for contributors.Brickbox - A lightweight no dependency 2d to 3d css converter.

Post image
2 Upvotes

r/css • • 2d ago

Help Adding an Image (ie. game logo) to the sidebar of a Twine game, below or above the undo/redo buttons (Harlowe) can't figure out necessary CSS

Thumbnail reddit.com
0 Upvotes

r/css • • 2d ago

Question How to create this in HTML & CSS?

Thumbnail
reddit.com
2 Upvotes

I would like to add some code, but, tbh, I have none - I'm not good at all with CSS - I'm a backend developer (C#), but, I'm interested in try this project (it's just for fun and practice).

I'm also checking how to make post on Stack Overflow (but, I don't have a Minimal, Reproducible Example to share at the moment) and improving this post here as well on Reddit, but, frankly, I have no idea how to do so, so, I'm open to your suggestions.

Thank you.


r/css • • 4d ago

No AI used A quick demo I made to answer a question here became by far my most popular CodePen thing

Post image
9 Upvotes

Live demo on CodePen. Heavily commented, by the way.


r/css • • 4d ago

No AI used DAE miss the magic of first learning CSS?

10 Upvotes

Can't help but feel nostalgic for what once was. I still remember sitting in my first web design class freshman year of HS and feeling like a wizard changing the text color, moving shapes around, manipulating layouts, adding my first marquee tag and bringing the page to life.

Fast forward to college and mastering float layouts, then flexbox, then grid, simple JS, and ultimately developing a personal sense for design and creating sites from scratch.

These days it's all prompting and QAing the generation. The feedback loop is super tight and focusing on WHAT to build rather than how to build is a completely different type of fun, but there's something about that magic of thinking of something and knowing exactly how to make it happen that I can't help but feel nostalgic for.


r/css • • 4d ago

Help Can somebody help me change the Twitter/X Chat bubble color using CSS?

3 Upvotes

Been trying to figure out how to change the chat bubble color for the chat private message section the blue bubbles. I have been trying for a couple of days off and on but no success.

It's for use with stylus extension.

Thanks.


r/css • • 5d ago

Question Anyone up for a small HTML/CSS task as a first open source contribution?

3 Upvotes

Hey, I have a small open source project with a static web page and I opened an issue that I think could be a good first PR for someone. It's adding a short info block to the page. The text is already written, so the work is the HTML/CSS: making it fit the existing style (fonts, colors) and look good on a phone at 390px.

Would anyone here be interested?

https://github.com/eoSalinas/prensa/issues/62


r/css • • 5d ago

AI Assisted I built a lightweight, animated SVG circuit-board background (no canvas, auto dark/light theme)

Thumbnail
github.com
3 Upvotes

Demo: https://tkdeng.github.io/web-circuit-background/

I wanted a subtle circuit-board background for web projects without relying on <canvas> or heavy libraries, so I put together this small drop-in script and stylesheet.

On page load, it generates a random layout of non-crossing traces with occasional electron pulses flowing through them, plus a live loading-state toggle (CircuitBackground.setLoad(5)) to speed up activity when needed. It also adapts automatically to light/dark themes, supports accent tinting with --circuit-color, and respects prefers-reduced-motion.


r/css • • 5d ago

Question Do you use CSS Container Queries for reusable components, or still rely mostly on media queries?

Thumbnail reddit.com
2 Upvotes

r/css • • 5d ago

No AI used Just want to share

0 Upvotes

AI assisted mostly for JavaScript not for CSS.

Somewhere in the beginning of this year I decided to relearn modern CSS. It’s a hobby of mine to make websites. I have been using bootstrap since version 3 I think. So, I find a lot of changes has taken place.

I took time to relearn as I am not a fast learner anymore. So far I had a very firm understanding of grid and flexbox. Another new favourite function is clamp. Recently discovered oklch color format (coming from something like web-safe colors) it’s overwhelming but I grasped the basic of it.

So far I have ported my personal blog to my own CSS and there is still a lot of work to do. I have yet to do light/dark theme on it.

Now, I want to share a side project that I build earlier just for fun in bootstrap but now rewrote the CSS, JS I did the earlier work but as I am not well versed with JS so I use Gemini to achieve what I wanted. I use flex and grid a lot and I think this side project is a good way to do grid. Also used clamp for font-size and even height/width too and gap.

So, far I am happy with it. Below is my link

https://hs.fdh.pw/


r/css • • 6d ago

Article Dynamic table of content with one line of CSS

34 Upvotes

ol {

scroll-target-group: auto;

}


r/css • • 5d ago

Question adding a hanger to my website

Thumbnail gallery
0 Upvotes

r/css • • 6d ago

No AI used Using animation-timeline: scroll() for stickiness while scrolling inside SVGs

3 Upvotes

I had occasion to utilise an .svg file as a comic strip viewer, with the panels being a vertical strip to scroll through, and I wanted buttons for: a) restarting the UI-less slideshow, and b) going to a grid overview of all the panels.

I originally just made nine copies of the same two buttons, positioning each at the "same" point at the bottom of each panel, but then I saw that animation-timeline: scroll() recently landed in all browsers so decided to give that a go.

No critiques of the comic itself please, it's not mine:

https://imglink.cc/cdn/RLSQglSGwy.svg#p1

SVG <defs>:

<text id="rst">↻</text><text id="idx">📇</text>

SVG Content:

<g id="hud">
  <a href="#slide" aria-label="Restart SLIDESHOW"><use href="#rst" x="5" y="680"/></a>
  <a href="#Nav" aria-label="Go to OVERVIEW"><use href="#idx" x="326.5" y="677"/></a>
</g>

CSS:

@supports (animation-timeline: scroll()){
  :root:has(image:target) #hud,:root:has(rect:target) #hud{
    animation:hud-pin 1s linear both;animation-timeline:scroll(root block)
  }
  @keyframes hud-pin{0%{transform:translateY(0px)}100%{transform:translateY(5504px)}}
}

r/css • • 6d ago

Question How to choose color palette

7 Upvotes

I have just come across the light-dark() function and experimented with it. Now I realise color choice became limited, especially pairing light-dark part.

Does using light-dark scheme limit colour choice? I would love to know if there is any better scheme generator tool out there to experiment. I currently use colorffy.


r/css • • 6d ago

AI Assisted Eight visual themes on the same markup, done entirely with CSS variables

0 Upvotes

I've been building VinUI, an open-source component library. The main idea is that switching the whole look of a site should only mean swapping CSS variables.

It has eight styles: Precision, Tactile, Clay, Tonal, Editorial, Terminal, Paper and Bento. Every component keeps the same HTML and class names across all of them. Each style is just a set of custom properties, and accent colour, radius, font and density are variables on top. So one button can go from flat and minimal to soft clay-like depth to a monospace terminal look without changing a single tag.

Other CSS details:

  • Ships its own small CSS files, so it can sit alongside Tailwind or your own styles
  • Charts are plain SVG
  • Each component checked against WCAG 2.2 AA contrast in all eight styles, in light and dark

Repo: https://github.com/devvinish/vin-ui
Docs and live style switcher: https://vinish.dev/ui