r/css • • 1d ago Bravo

Question Logical properties got me about 90% of the way to RTL. These are the parts that still bit me

10 Upvotes

I spent a while making an existing LTR theme work in Arabic and wanted to write down where margin-inline and friends stopped being enough, because most guides stop at "use logical properties".

What worked fine: margin-inline, padding-inline, inset-inline-start, text-align: start, border-start-start-radius. Swapping those in cut the RTL overrides a lot.

What still needed manual work:

  1. Anything anchored with left/right in third-party CSS. Dropdowns and predictive search panels positioned with left: 0 end up hanging off the wrong side.
  2. Transforms. translateX(-100%) for an off-canvas drawer does not flip with direction. I ended up using a CSS variable (--dir: 1 or -1) and multiplying it in the transform.
  3. Icons with direction, like arrows and chevrons. They need transform: scaleX(-1) under [dir=rtl], but icons like play buttons or clocks should not flip. Easy to get wrong.
  4. letter-spacing. Positive letter-spacing breaks Arabic letter joining, so it has to be reset to 0 for Arabic text even if the design uses tracking on headings.
  5. Font metrics. Arabic fonts often look smaller at the same font-size and need a bit more line-height, so I scale both slightly for lang="ar".
  6. Mixed content. A number or a Latin brand name inside an Arabic sentence can reorder punctuation unless you wrap it in a span with dir="auto" or use the bdi element.

Curious what others hit. Is there a cleaner way to handle direction-aware transforms than the variable trick? And does anyone run RTL visual regression tests, or is it all manual checking?


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 • • 22h ago

Question Responsive design

1 Upvotes

How do I make my website work in devices larger than my screen,other than chrome dev tools I don't trust it very much


r/css • • 21h ago

Article I built a free minimalistic CSS framework

0 Upvotes

I built it some time ago but recently did some "remaster" with the help of AI :)

https://box2unlock.github.io/look/


r/css • • 1d ago

Help Beginner struggling with CSS responsiveness — ideal breakpoints, easier workflow, and essential units/properties?

3 Upvotes

Hi everyone,

I'm a beginner learning CSS and currently struggling with making layouts responsive across different screen sizes. I wanted to ask two main questions here:

  1. Media Queries & Breakpoints: To make a website look good on mobile, tablet, and desktop, how many media query breakpoints are typically recommended, and what widths are commonly used for them?
  2. Easier CSS Workflow & Core Units/Properties: What is the easiest, most practical approach to writing responsive CSS? Also, instead of everything, what are the most important relative units and CSS properties/layout techniques a beginner should focus on first?

Any practical tips or beginner-friendly guidance would really help. Thanks!


r/css • • 1d ago

Article I built a free browser-based CSS toolkit

Thumbnail
gallery
0 Upvotes

Hey folks — I made CSS Tool, a free set of visual CSS generators for front-end work.

https://www.css-tool.com

Everything runs locally in the browser: tweak parameters, see a live preview, then copy the CSS.

Highlights:

Multi-effect visual generator — glassmorphism, neumorphism, soft shadows; live preview + multi-format export.

Advanced gradient generator — linear / radial / conic, stop editing, presets.

CSS clamp() calculator — fluid sizes from viewport ranges with interactive preview.

Tailwind-friendly shadow builder — multi-layer shadows → CSS or Tailwind snippets.

WCAG contrast checker — AA/AAA checks + suggestions / color-blind simulation.

CSS Grid layout generator — visual grid → HTML + CSS.

There are 17 tools total (border-radius, transform, filters, easing curves, px↔rem, SVG wave dividers, etc.). 


r/css • • 3d ago

Article Patrick - The beauty of CSS mixins

Thumbnail
patrickbrosset.com
23 Upvotes

r/css • • 2d ago

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

Thumbnail codepen.io
2 Upvotes

r/css • • 3d ago

AI Assisted Aperiodic Hat Monotile CSS

Post image
11 Upvotes

r/css • • 2d ago

AI Assisted Interactive Flexbox Playground

4 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 • • 3d ago

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

Thumbnail
infoq.com
148 Upvotes

r/css • • 3d ago

AI Assisted Charts — @profullstack/css example

Thumbnail profullstack.com
1 Upvotes

r/css • • 3d ago

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

8 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 • • 3d ago

No AI used No AI, Recreating Discord's Login Page by Hand (38 Minutes)

5 Upvotes

No AI. Just CSS, coded by hand. RECREATING DISCORD'S LOGIN PAGE BY HAND

Another coding session at school! This time, I'm recreating Discord's login page, focusing on the CSS.

The HTML structure was already written before recording, so I started directly with the styling.

The original recording is 38 minutes long, but I've sped it up to 14 minutes.

Filmed in my school classroom, with classmates talking and the usual background noise. 😂

No AI-generated code, no fancy setup. Just a laptop, a code editor, and some CSS.

Tech: HTML & CSS
Project: Discord Login Page Recreation
Recording: 38 minutes → 14 minutes (sped up)

Feedback and suggestions are welcome!

#CSS #FrontendDevelopment #NoAI


r/css • • 3d 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 • • 4d ago

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

Post image
2 Upvotes

r/css • • 4d 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 • • 5d 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 • • 6d 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 • • 7d ago

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

12 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 • • 7d 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 • • 7d 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 • • 7d 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 • • 8d ago

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

Thumbnail reddit.com
2 Upvotes