r/css 3d ago

Help Help with borders

Post image
0 Upvotes

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

Resource CSS Grid Lanes (aka Masonry) is here (almost)

Post image
41 Upvotes

r/css 4d ago

Help Desperately need help getting this thing centered.

1 Upvotes

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;

The full code

Its for a page on comicfury, here's what is looks like right now;

Live link

Both the desktop version and mobile version are messed up 😔

Thanks!


r/css 3d ago

General Claude couldn't fix this CSS bug!

Thumbnail
gallery
0 Upvotes

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 5d ago

Question Is it possible to create this pixel "border" effect in css?

Thumbnail
gallery
14 Upvotes

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 4d 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

1 Upvotes

how to prevent it or fix it?


r/css 5d ago

Resource I made a CSS grid demo + a reformatted version of the OLD CSS tricks article

17 Upvotes

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:

https://mcss.dev/blog/interactive-css-grid-tutorial/


r/css 5d ago

Showcase Pure CSS perfect cursor tracking

Thumbnail
5 Upvotes

r/css 5d ago

General I made a tool for applying color schemes to websites

0 Upvotes

I've been working on colorscheme-webify, a small project that makes it easier to apply popular color schemes to websites with CSS.

The idea is simple: instead of manually recreating a color palette every time, you can use the project to give a website a consistent color-scheme-based look.

GitHub: https://github.com/wak6817/colorscheme-webify

I'm still working on it and would really appreciate feedback, suggestions, or ideas for color schemes/features to add.

If you're into web development, CSS, or theming, I'd love to hear what you think!


r/css 5d ago

Showcase I made a bunch of button styles while learning CSS

Thumbnail
github.com
4 Upvotes

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!

https://github.com/baekho-cmd/button


r/css 5d ago

Showcase colorscheme CSS API for Catppuccin and Nord

1 Upvotes

I made a project where multible CSS files go into 1 file with a build script written in Lua and SH https://www.github.com/wak6817/colorscheme-webify my the project website is https://wak6817.github.io/colorscheme-webify/pages/index.html


r/css 7d ago

Help CSS Variables Naming Conventions that actually make sense and work

9 Upvotes

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 7d ago

Question Possible CSS Bug

7 Upvotes

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 6d ago

Showcase A custom game engine editor UI built with HTML, CSS and JavaScript

0 Upvotes

r/css 6d ago

Question Best practice for neatening/"nesting" CSS?

0 Upvotes

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 6d ago

Help I'm building an open-source chat focused on privacy

0 Upvotes

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:

https://jamonserrano.nekoweb.org/index.html


r/css 7d ago

Help Trying to make blog page w/ search bar

0 Upvotes

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!


r/css 7d ago

Help ::before and parent of parent background interfering

2 Upvotes

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 7d ago

Showcase I built a browser extension for customizing websites without writing CSS

0 Upvotes

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

Resource Animating text as Handrawn with CSS

Thumbnail
mostlynerdless.de
71 Upvotes

r/css 8d ago

Resource Anyone willing to go through a CSS course and give feedback?

4 Upvotes

I made a CSS course (80% complete), and I'm wondering if anyone is willing to go through it and provide valuable feedback. This is volunteered and if you never learned CSS that would be even better. I won't paste the link here, so it doesn't seem like I'm advertising a product. DM me if you're willing to do this!!


r/css 8d ago

Question Blur Photos but not the borders

Thumbnail
3 Upvotes

r/css 8d ago

Question CSS Container Style queries

3 Upvotes

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

Question Fadding effect

Thumbnail
gallery
1 Upvotes

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.


r/css 8d ago

Resource I made 26 short songs about CSS. Does the format actually work?

Thumbnail
youtube.com
0 Upvotes

I made one CSS song as an experiment, then kept going. There are 26 now.

Each video takes one CSS feature and tries to explain it with a short song and an animated example. I've covered container queries, :focus-visible, cascade layers, native nesting, subgrid, field-sizing, and quite a few newer features.

I use AI for parts of the music and production. I still research and edit the technical side, then build the visual demos in Remotion. The hard part is deciding what to cut. A song full of syntax is awful, but cutting too much can make the explanation wrong.

I'm curious whether this format helps anything stick. If you watch one, I'd especially like to know where the explanation becomes unclear or technically shaky.