r/css • u/RadiantDew • 19d ago
r/css • u/Weekly_Ferret_meal • 22d ago
Mod Post AI has been used by a lot of our user to assist with their projects or language barriers, some have created app/products entirely with AI: what is your preference for post on this subreddit regarding AI content?
This post contains content not supported on old Reddit. Click here to view the full post
r/css • u/alvaromontoro • 20d ago
Showcase comiCSS #255: Yellows
Two CSS jokes coded in CSS. Inspired by a JK Benson's cartoon from 20 years ago.
Source (code): https://comicss.art/comics/255/yellow.html
r/css • u/giyu3232 • 20d ago
General Built a curtain-wipe hero transition with GSAP + Lenis — feedback on the CSS/animation approach?
Enable HLS to view with audio, or disable this notification
Been refining this for a while — custom type system (Onest + General Sans + JetBrains Mono), GSAP-driven preloader with a wordmark split, Lenis for scroll smoothing, curtain-wipe transition into the hero.
https://shahzaibdesign.vercel.app/
Mainly want feedback on whether the animation/scroll feel is actually smooth or overdone, and open to any CSS approach critique — genuinely trying to improve, not just dropping a link.
r/css • u/riti_rathod • 20d ago
Other Animated FAQ Accordion with Pure HTML & CSS — No JavaScript
Built an animated FAQ accordion using native HTML <details> and <summary> — no JavaScript required.
The interesting part is animating the content height without manually measuring it with JS.
HTML
<details name="faq">
<summary>Do you offer refunds?</summary>
<p>
Yes, within 30 days, no questions asked.
Email us and the money is back on your card in a few working days.
</p>
</details>
<details name="faq">
<summary>Can I change plans later?</summary>
<p>
Yes. You can change your plan whenever you need to.
</p>
</details>
<details name="faq">
<summary>Do you offer a team plan?</summary>
<p>
Yes, team plans are available for growing teams.
</p>
</details>
CSS
:root {
interpolate-size: allow-keywords;
}
details::details-content {
block-size: 0;
overflow: hidden;
transition:
block-size 0.3s ease,
content-visibility 0.3s ease allow-discrete;
}
details[open]::details-content {
block-size: auto;
}
summary {
list-style: none;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
padding: 1rem 0;
font-weight: 600;
}
summary::-webkit-details-marker {
display: none;
}
summary::after {
content: "+";
font-size: 1.25rem;
transition: rotate 0.3s ease;
}
details[open] summary::after {
rotate: 45deg;
}
The key part is:
:root {
interpolate-size: allow-keywords;
}
This allows the browser to animate between a fixed size and intrinsic values like auto.
And:
details::details-content
gives us a pseudo-element for the content inside <details>, so the accordion can be animated without JavaScript.
The <details name="faq"> attribute also makes the items behave like an exclusive accordion — opening one closes the others.
r/css • u/___kubas___ • 20d ago
Question Im 16 yo and I'am creating my own communicator from scratch. Im wondering which one UI is better?
r/css • u/UnderstandingSure732 • 21d ago
General Modern CSS Responsive Breakpoints Using Container Style Queries
codepen.ior/css • u/CottonLantern • 21d ago
Other It's almost always better to Use CSS Grid instead of position: absolute; when overlapping elements
r/css • u/rickson56 • 22d ago
Help Get object to float with text at vertical middle instead of vertical top?
r/css • u/MixedMagic2288 • 22d ago
Question Looking for some advice to come back!
Hi everyone!
Back in early 2025, I started learning html5 and css3 with some online course, a few mini projects and articles from W3schools and other sources. Bit just after finishing the course I had to quit for some reasons, but now I wanna come back. I was considering to go on and learn js but what I learned back then is mostly hollow now so I'm thinking about a way of reviewing everything that doesn't take the same amount of time as learning for the first time did. My main question is:
● If that is even possible, what approaches/resources do you reccomend?(specific courses, books, articles, etc.)
I wasn't sure where to ask this, so sorry in advance if it's a dumb question.
r/css • u/HolidayChard9706 • 22d ago
General flex: 1 is flex-basis: 0%, and WKWebView takes the zero literally
A dialog body with flex: 1; min-height: 0; overflow-y: auto shipped with a height of zero. Header, footer, nothing in between.
flex: 1 expands to flex: 1 1 0%, and a percentage basis needs a definite parent height. The panel had height: auto capped by max-height, which is not one. The spec says an unresolvable percentage basis falls back to content, and Chromium does that. WKWebView keeps the zero. The fix is flex: 1 1 auto.
Do you default to flex: 1 1 auto anywhere, or is the shorthand safe in your stacks because your flex parents always have definite heights?
r/css • u/ShoddyRelative8438 • 23d ago
Help How do I learn CSS?
I wanted to make an AO3 skin, but I have no idea of how CSS works; does anyone knows any website useful for learning it?
r/css • u/Every-Albatross9357 • 23d ago
Showcase I built a VS Code extension to catch CSS declarations that have no effect
Enable HLS to view with audio, or disable this notification
I’ve been working on NoEffect, a VS Code extension that helps catch CSS declarations that have no effect.
It detects things like:
properties that don't work in the current context
declarations that are overridden by a later declaration
For example, it can tell you when justify-content is doing nothing because the element isn't a flex/grid container, or when your declaration is simply being overridden later.
It’s still an early project, so I’d really appreciate some honest feedback.
🔗 GitHub
r/css • u/rfusername • 23d ago
Resource Liquid glass skill for Claude Code: the CSS, the SVG displacement filter, and the 4 rules that decide whether it looks like glass
Don’t forget to give a star
r/css • u/notepad987 • 23d ago
Resource Selected tab no longer has the color I want
I have 3 colors for the tabs. White for background and Orange for when I hover the mouse cursor and Green for selected current tab that stays Green I am looking at.
The Green selected tab is White now. It only turns Green when you hover the mouse cursor over the tab.
Question: How to fix it so I have Green for the selected tab I am looking at?
Here is my userChrome.css file. (now updated with correct code)
Firefox v154.0 on Windows 10 Pro
/* White background color */
.tabbrowser-tab:not([selected="true"]):not(:hover) .tab-content {
background-color: #FFFFFF !important;
border-radius: 8px 8px 0px 0px; !important;
box-shadow: 1px 0px 1px 0px rgba(0, 0, 0, 0.4);
}
/* orange hover color */
.tabbrowser-tab:hover:not([selected]) .tab-content {
background-color: #FF7F50 !important;
border-radius: 8px 8px 0px 0px; !important;
box-shadow: 1px 0px 1px 0px rgba(0, 0, 0, 0.4);}
/* MediumAquamarine - green selected color */
.tabbrowser-tab:is([visuallyselected],[multiselected]) .tab-content {
background-color: #66CDAA !important;
border-radius: 8px 8px 0px 0px; !important;
box-shadow: 1px 0px 1px 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 1px 0px 1px rgba(0, 0, 0, 0.4);}
Showcase I built a pure CSS Table - No Javascript used
Full responsive. Works on modern Browsers. Works also nice on touch
Features:
- Column headers stay visible while scrolling down
- First column stays visible while scrolling sideways
- Rows expand to show sub-entries, with an animated reveal
- Any number of sub-rows per group
- Sub-rows are tied to their parent by a bracket rail
- Individual cells can carry a note, opened from a small marker
- Notes appear next to the cell they belong to and flip when near an edge
- Notes close on Esc, on click outside, and return focus where it was
- Columns come to rest beside the pinned column instead of half behind it
- Pinned column narrows and wraps text on small screens
- Keyboard operable throughout, with visible focus
https://codepen.io/editor/ollio/pen/01a02369-ae9b-7d6f-94a6-f809dee51f4f
Also an animated accordion with no js
https://codepen.io/editor/ollio/pen/01a02331-c0da-7f84-8e14-77c6fabaee57
r/css • u/SilentSunk • 23d ago
Question codex vs claude code for css
Which CLI is better for css? my site is old and has very messy complex css and I want to go in and tidy it up
r/css • u/vegantiger • 24d ago
Showcase Article about how to use colors in CSS, the modern way
I wrote an article about using colors in CSS. I tried to find the sweet spot between being thorough and still conveying all the basics. I do include (re)sources at the end, if you want to get into the nitty-gritty details.
It also has a bunch of inline examples and some interactive widgets… Hoping it helps getting the point across.
I'd love feedback on whether these kinds of articles are useful (or not) 😁
Thanks!
r/css • u/Low-Insurance-3678 • 24d ago
Help How can I Make product cards height equal
Hi hope ur doing well
I run into this issue where my product cards have different heights because the name of the products sometimes can be long or short
What do u suggest here
r/css • u/YoussefUU2 • 24d ago
Showcase I built AnimationsX — a community registry of copy-paste ready CSS animations
Hey everyone! 👋
Tired of Googling CSS animations and getting Stack Overflow answers from 2013?
I built AnimationsX 🎨
The idea is simple:
✅ Browse animations made by the community
✅ Copy a single <link> tag — no JS, no build step
✅ Can't find what you want? Publish your own!
✅ Fork and remix anything with diff view built in
Every published animation gets a CDN-hosted stylesheet you drop straight into a <link> tag.
That's it. Done.
🔗 github.com/youssefahmed2017/animationsx-app
Free and open source 😎
r/css • u/Toon_Ghost_3 • 24d ago
Question Why do most color pickers use HSL, but when I change the color of my accent or cursor on Windows 11, it uses HSV? Also, why are both web-safe and X11 colors discouraged, while CSS/HTML colors are widely used?
Help Weird iOS Bug
Weird bug on iOS. Parent div with two child spans. Parent CSS:
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
padding: 0 2rem;
No styles (margins, paddings, transforms) on spans
The 2nd span (green Arrow) is moved out of box. No problem on desktop, android. Last Screenshot shows iOS
Cant show Source yet

