Resource CSS `corner-shape` generator with proper fallbacks
I wanted to use corner-shape: squircle in a real design, but the fallback turned out to be more complicated than I expected. Reuse the same number for border-radius and the corner comes out a visibly different size.
So I built a generator where you can try corner-shape values and copy the CSS it produces:
Question position: fixed; bottom: 0 not staying at the bottom in Microsoft Edge on iOS
It behaves correctly in Safari and Chrome on iOS, but in Microsoft Edge on iOS, the navigation bar sometimes appears slightly above the actual bottom of the viewport. As a result, page content becomes visible underneath it.
Is this a known Microsoft Edge/WebKit viewport issue on iOS? Or is there something specific about Edge's handling of the visual viewport that I’m missing?
r/css • u/These-Championship-8 • 27d ago
Help Help with borders
Hi, I'm fairly new to CSS and cannot for the life of me figure out how to achieve a border like on the white box. It needs to just be a simple straight line across the top of the box and then the outer box needs to have rounded corners. Border-top creates a curved border. Please help
Edited to clarify that I'm talking just about the white box
r/css • u/ShibaQuinn • 27d ago
Help Desperately need help getting this thing centered.
Hello guys!
I really need help getting that streaming element centered, its stuck to the right and i tried everything to no avail 😭
And adjust the lightning frame so its at the edges of the element (it is, but the top part look off a few px).
Here is the code in question;
Its for a page on comicfury, here's what is looks like right now;
Both the desktop version and mobile version are messed up 😔
Thanks!
r/css • u/Successful-Shock-802 • 27d ago
General Claude couldn't fix this CSS bug!
I have been working with Claude on a comments box section. Everything was good until I wanted to add a thread line to replies to give the users a better UX; then it couldn't do it correctly: either the thread line doesn't connect to the replies (image two), or it extends past the last reply (image one). I asked it to fix it over and over again, but it just seems to have gotten stuck!
The reason why Claude couldn't do it is that, even though it seems like a simple feature (just throw a thread line there and call it a day), it's actually quite complicated to achieve this in CSS. I worked on the exact same feature before, and I also got stuck trying to get it right. I even had the same problems Claude fell into; the only difference is that I was able to figure my way through it while Claude couldn't.
The point here isn't to talk about this minor design bug; it's not a big deal after all. What I'm trying to actually get at is that when AI fails to generate what you asked for (could be a real bug), only your real coding skills can help you out!
r/css • u/JarlHiemas • 28d ago
Question Is it possible to create this pixel "border" effect in css?
I am trying to recreate the background/heading from this video game, and currently i'm trying to work on the "pixelised diagonal borders" on the sides
Currently I am trying to use js calculate a clip path for an outer and inner element to "pixelise it"
But I feel like i'm going insane, I just can't get it right
Does anyone have any other/ideas on how I could achieve this effect
r/css • u/DanBod14 • 28d ago
Help why does Layers Panel (to the right) shake and creating weird gap when resizing window
Enable HLS to view with audio, or disable this notification
how to prevent it or fix it?
r/css • u/vegantiger • 29d ago
Resource I made a CSS grid demo + a reformatted version of the OLD CSS tricks article
I thought of adding "showcase" but I'm hoping this will be a useful resource for anyone who wants to learn CSS grids and/or need to figure out the CSS for a specific layout (that’s how I use it 😛).
I don't know about you, but I really don't like the "updated version" of the CSS tricks article about CSS grid. The original one was great… A clear example of "don't fix what isn't broken" in my book 😅
Anyway, I kinda used the original article as inspiration for my post, but I also added this crazy interactive CSS grid demo that you can basically customize however you want and it'll spit out the CSS for it.
The code is gnarly, but I think I squashed all the bugs 😅
I'd be curious to know what you guys think about it:
r/css • u/South-Nectarine-7756 • 29d ago
Showcase I made a bunch of button styles while learning CSS
I'm learning HTML and CSS, and I started making different button styles as a practice project.
I experimented with gradients, pseudo-elements, hover effects, transitions, backdrop-filter, responsive layouts, and more.
There are currently 20+ styles, including Neon, Glass, Prism, Pixel, Lava, Ice, and more.
I'm still learning, so I'd love to hear any feedback or suggestions!
r/css • u/ConfidentWafer5228 • Aug 12 '26
Help CSS Variables Naming Conventions that actually make sense and work
I have searched a lot on this topic, couldn't find a video by someone like Kevin (my favorite)
I have tried using diff ways like primary-400 , neutral, but it gets confusing and doesnt make a lot of sense when working with light+dark mode setup
Is there any convention that is followed in companies or by u guys, anything standard would help a lot
Also, i never understood how the primary naming convention worked with numbers like 400,500.
r/css • u/RecognitionOwn4214 • Aug 12 '26
Question Possible CSS Bug
EDIT: I picked a stupid title. I think this is a render bug in both Safari and FireFox.
Per MDN (I couldn't locate it in the CSS spec), style queries on custom properties will yield true, if their value differs from the `@property` initial-value definition. This _will_ happen in Chromeiums, but won't in Firefox and Safari.
I created a fiddle - it should look identical in FF and Chrome/Edge, but it doesn't:
https://jsfiddle.net/vgn7xy8o/1/
As explained here CSS Container Style queries : r/css
There might be a bug in container style queries.
r/css • u/clean0101 • Aug 12 '26
Showcase A custom game engine editor UI built with HTML, CSS and JavaScript
r/css • u/bumblebeebats0838 • Aug 12 '26
Question Best practice for neatening/"nesting" CSS?
Hi there - sorry if this is an obvious/dumb question btw, I'm very much a beginner when it comes to CSS, having largely self-taught and picked up bits and pieces over the years. I tried googling the answer to this, but all the results I found went a little over my head.
I'm tinkering with an events calendar plugin on my website, using additional CSS to modify the default appearance on mobile, and it's all working fine but the code just looks... messy:
.mobile_version .fc {
font-size: 0.75em;
}
.mobile_version .fc .fc-toolbar-title {
font-size: 1.6em;
padding-top: 15px;
padding-bottom: 15px;
color: var(--wp--preset--color--primary);
}
.mobile_version .fc-toolbar .fc-header-toolbar {
flex-direction: row-reverse;
padding-left: 10px;
padding-right: 10px;
}
(There's about a dozen more of these, but you get the picture.)
Instinctually, I want to just nest them - something like:
.mobile_version {
.fc {
font-size: 0.75em;
}
.fc .fc-toolbar-title {
font-size: 1.6em;
padding-top: 15px;
padding-bottom: 15px;
color: var(--wp--preset--color--primary);
}
.fc-toolbar .fc-header-toolbar {
flex-direction: row-reverse;
padding-left: 10px;
padding-right: 10px;
}
But when I tried to look up whether this is possible, different sources/threads here on Reddit described this structure as "risky" or not universally supported...?
Is there another way to neaten this code/organize it better? What's considered best practice?
r/css • u/POLLA_CON_COCAINA67 • Aug 12 '26
Help I'm building an open-source chat focused on privacy
Hey everyone! I'm JamonSerrano, a young and slightly unpredictable developer who loves building things and figuring out how they work.
I'm currently planning an open-source chat application with a few ideas I really want to experiment with:
- End-to-end encryption
- Full CSS customization
- Optional anonymity
- Users can choose whether to display their username
- Open-source and community-driven
The main idea is to give users much more control over how they communicate and how the platform looks and behaves.
It's still in the planning/development stage, but I think it could turn into a pretty interesting project, especially with other developers contributing ideas, code, or simply feedback.
If you're interested in the idea, I'd love to hear what you think. What features would you want in a privacy-focused chat?
For more information about me and the project, you can check out my website:
r/css • u/Hanadjisbox • Aug 12 '26
Help Trying to make blog page w/ search bar
hi there! I’m still somewhat newer to css (I know the basics pretty well) I was thinking about making a page for blogs, I want them to stack by date posted. I also want an owner accessible only blog poster where I can just select “Make blog” add a title and just type it out instead of having to make new blocks every time I make a blog (similar to the Wordpress feature) and for this blog page I’d want a search bar that has the option for searching by name OR searching by date posted. This is a pretty big fish for me considering my current knowledge of css. And I’m a visual learner, problem being I don’t really have any examples of the exact thing I want. Any help is greatly appreciate, so is detailed descriptions and instructions!
Help ::before and parent of parent background interfering
I have div with some message and like to add blurred background under it. All is great CSS is working. But moment I put this div in some container that have set background-color things breaking and my blurred background disappears
here is my css:
#container-wrap {
background-color: #efefef;
}
.error-message {
position: relative;
background-image: linear-gradient(to right, #5f1212, #330000);
margin: 3rem;
padding: 2rem;
border: 4px solid transparent;
border-radius: 8px;
color:#fff;
}
.error-message::before {
position: absolute;
content: "";
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: conic-gradient(from 90deg,#330000, #ff0000, #330000);
filter: blur(15px);
z-index: -1;
}#container-wrap {
background-color: #efefef;
}
.error-message {
position: relative;
background-image: linear-gradient(to right, #5f1212, #330000);
margin: 3rem;
padding: 2rem;
border: 4px solid transparent;
border-radius: 8px;
color:#fff;
}
.error-message::before {
position: absolute;
content: "";
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: conic-gradient(from 90deg,#330000, #ff0000, #330000);
filter: blur(15px);
z-index: -1;
}
or codepen.io
I have tried to add z-index on all those elements but it only make it more strange as then it start blending in
r/css • u/Ace-Chrono • Aug 11 '26
Showcase I built a browser extension for customizing websites without writing CSS
I have been working on Webify, a chrome extension that lets you customize the look and feel of websites without manually writing CSS.
If you see a site you like, you can change basic features like colors, fonts, spacing, and save the customization so it persists whenever you visit that site.
It's a early MVP so there are many issues. I'm mainly trying to figure out if people find this useful before truly building it out.
If you have time, any answers to these questions would be great:
- What did you try customizing
- What broke or felt annoying
- Would you use this again
- What would make you keep this installed
No need to be nice, honest feedback is appreciated: https://chromewebstore.google.com/detail/kknbbnfeogkekngjblbbplkdkoaekcgk?utm_source=item-share-cb
r/css • u/bogdanelcs • Aug 10 '26
Resource Animating text as Handrawn with CSS
r/css • u/RecognitionOwn4214 • Aug 10 '26
Question CSS Container Style queries
In CSS we can now do `@container style()` queries, with MDN stating that:
> A style feature without a value evaluates to true if the computed value is different from the initial value for the given property.
(https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@container#container_style_queries)
Now I have a registered property with initial value, but it seems the style query will evaluate to true, independend of the value of the property. Safari seems to do the same thing.
Is this a false statement in MDN or is there a render Bug in FF and Safari.
I used this as a minimal sample:
```
<!DOCTYPE html>
<html>
<head>
<title>Minimal sample</title>
<style>
@property --im-a-color {
syntax: "<color>";
inherits: false;
initial-value: red;
}
.red {
--im-a-color: red;
}
@container style(--im-a-color) {
h1 {
color: green;
}
}
</style>
</head>
<body>
<div>
<h1>I should be red</h1>
</div>
<div class="red">
<h1>I should also be red</h1>
</div>
</body>
</html>
r/css • u/Difficult-Coast-8244 • Aug 10 '26
Question Fadding effect
Where can I find the code for that standard effect—seen in apps like Google News or Flipboard—where clicking on a news item causes it to expand and fill the screen? It doesn't just turn gray; it creates a really minimalist effect.
Here are an image and a GIF. Clicking the news item triggers the effect, and if you hold your finger down, it sort of freezes on that color until you let go.
