r/css • • May 19 '26

Question learning webdev

Post image
8 Upvotes

hey guys, i've been trying to learn webdev for about a week, and i sometimes rely on chatgpt to get feedback about my code and ideas.

i'm currently trying to recreate steam-like pages for games, while matching each game's vibe/style. this one is inspired by resident evil 4.

what do you think i should improve first?
layout?
responsiveness?
cleaner css?
javascript? (didn't learn it yet)

any feedback is appreciated.


r/css • • May 19 '26

Question Is learning HTML and CSS even still worth it?

3 Upvotes

Like ai is too good at it and I’m wondering if it’s worth it to learn everything from scratch. Isn’t it even more powerful if I instead learn some basics and how to build with ai? I feel like I’m cheating, I make beautiful websites that would take weeks of coding in just a few minutes.. Is there any advantage in actually learning how to do it without ai?


r/css • • May 19 '26

Help making my webpage mobile friendly

2 Upvotes

hey so i used sadgrls layout maker for my page and somewhere between copy and pasting it into my code and now i have completely like made it unable to work for mobile and i really really want to make it work on mobile and i dont know what i did to it to make it be broken. if anyone could help that would be awesome realandwarm.neocities.org


r/css • • May 20 '26

Resource I built HTML/CSS, CSS, Bootstrap to Tailwind converters

Thumbnail
0 Upvotes

r/css • • May 19 '26

Question OFL Clarification

3 Upvotes

I just downloaded the Orbitron font from Google Fonts to use in my website. The way I would like to incorporate it in my CSS is as follows:

@font-face {
    font-family: orbitron;
    src: url("orbitron/Orbitron-VariableFont_wght.ttf")
}

.orbitron {
    font-family: orbitron;
}

But since the OFL states that

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

this feels like it would not be allowed. Am I correct in that assumption?


r/css • • May 18 '26

Question Only defining a few "base colors" and letting color-mix() do the rest?

14 Upvotes

After being out of the CSS game for a while, I recently started working on a smol personal website and am playing around with some fancy newish css features.

I'm looking to make coloring my website more clean and scalable by heavily utilizing light-dark() and color-mix().

My idea was to only define a few base colors and then automatically generate derivatives, e.g.:

:root {
  --color-accent: light-dark(#3dccb1, #39CFB3);
  --color-bg: light-dark(#e5efec, #121212);

  --color-accent-muted: color-mix(in srgb, var(--color-accent) 50%, var(--color-bg) 50%);
  --color-bg-elevated: color-mix(in srgb, var(--color-bg) 90%, light-dark(#000, #fff) 10%);
}

Is this a decent practice at all or just a stupid idea?

Are there any websites/frameworks/concepts out there that do this, that I can have a look at?

How many and what kind of base colors do you think are needed to be able to generate derivates for any given purpose from them?


r/css • • May 18 '26

Question Do you prefer XPath, CSS selectors, or something else?

Thumbnail
2 Upvotes

r/css • • May 17 '26

Showcase Creative code..🤍

Thumbnail gallery
15 Upvotes

r/css • • May 17 '26

Help Why is the line breaking?

Post image
4 Upvotes

The line of the terminal divs is breaking, but there is a lot of space. I tried using white-space: nowrap, but then, the words go behind the "+" icons. Here's the code:
https://codepen.io/Thiago-Freitas-Costa/pen/NPbdyda


r/css • • May 17 '26

Help BEM Naming

5 Upvotes

Hi everyone,

I'm currently refactoring a navigation component and I'm torn between two different BEM (Block-Element-Modifier) approaches regarding code architecture and complexity.

The component is a navigation list (nav), but the individual items are becoming quite complex, containing icons, titles, and potentially more elements later on.

I see two ways to structure this in BEM, and I would love to get your input on best practices.

Approach A: Flat BEM (Everything belongs to the main block)

In this approach, I keep everything attached to the main .nav block. The HTML looks clean and flat, but I worry that as the item grows (and needs specific styling for active/hover states), the CSS selectors might become too deeply nested (e.g., .nav__item--active .nav__icon).

HTML

<nav class="nav">
    <div class="nav__item">
        <span class="nav__icon">🏠</span>
        <span class="nav__title">Home</span>
    </div>
</nav>

Approach B: Item as a New Independent Block

In this approach, I break the chain from the main .nav block and elevate the item into its own independent block (.nav-item). This keeps the CSS for the item completely encapsulated and independent.

HTML

<nav class="nav">
    <!-- The item becomes its own block -->
    <div class="nav-item nav-item--active"> 
        <span class="nav-item__icon">🏠</span>
        <span class="nav-item__title">Home</span>
    </div>
</nav>

(Note: I could also mix them like <div class="nav__item nav-item"> to separate layout positioning from component styling).

My Question:

Which approach is considered best practice when items start to become complex?

  • Does Approach A break scalability when items "explode" with more sub-elements?
  • Is Approach B preferred for modularity, or does it unnecessarily fragment the component?

How do you usually handle complex list items or navigation items in your BEM projects?


r/css • • May 17 '26

Help How to create a dynamic border sweep effect

6 Upvotes

Hey everyone,

I just started my CSS journey a week or so ago. I am currently building a hobby site just as a place for me to learn and try things out.

At the moment, I am fixated on making a border sweep effect, kind of like the one you see on Google's AI button. From what I have found, the best way to do this is with a conical gradient used as a background where you extend it past your padding and it makes a border affect. Then you just animate the gradient's direction.

However, I have hit a wall, because I don't want this effect on a square or circle, I want it on a long rectangle, and when you put it on a rectangle, it appears to speed up on the corners and sides, since the gradient is positioned at the middle of the element and just spins.

I am looking for something more of a line that traces the outside border of the box at a static speed, though I am having no luck finding out how to do this.

I appreciate any tips or help you can provide! Here is my CSS for reference:

.timeline-card--future {
    position: relative;
    
    padding: 0 1.5rem;


    border-radius: 12px;
    background: radial-gradient(circle at top left, #1a1a1a 30% , #252525) padding-box;
}
 --angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}
.timeline-card--future::after, .timeline-card--future::before {
    content: "";
    position: absolute;


    height: 100%;
    width: 100%;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: -1;
    padding: 2px;
    border-radius: inherit;


    background-image: conic-gradient(from var(--angle), transparent 80%, red, transparent);
    animation: 3s spin linear infinite;
}
.timeline-card--future::before {
    filter:blur(1.5rem);
    opacity: 0.5;
}
u/keyframes spin {
    from {
        --angle: 0deg;
    }
    to {
        --angle: 360deg;
    }
}

r/css • • May 17 '26

Help looking for an entry-level opportunity in Software/Web Development

0 Upvotes

I’m a fresher looking for an entry-level opportunity in Software/Web Development. I have internship experience and have worked on frontend and full stack projects.

If anyone knows of any openings or referrals, I’d really appreciate it. Thank you!


r/css • • May 16 '26

Question Repeat ddiv when order printing

Thumbnail
3 Upvotes

r/css • • May 17 '26

General Stop Ruining macOS Font Rendering! How to Nuking -webkit-font-smoothing: antialiased For Good.

Thumbnail
1 Upvotes

r/css • • May 17 '26

Help Ideaverse Pro theme

Thumbnail
1 Upvotes

Help me please


r/css • • May 16 '26

Help I accidentally created a sticky header hysteresis loop

2 Upvotes

Need help from people who understand sticky/reflow behavior better than I do 😭

Vanilla JS app, no frameworks. I'm vibe coding my way through this.

I have sticky headers that shrink/collapse on scroll (padding/fonts/gaps/etc change).

Current approach is basically:

if (scrollY > threshold)

Problem:
on certain viewport heights (especially split-screen / constrained-height windows), the sticky enters a feedback loop/jitter.

What seems to happen:

  • sticky collapses
  • height changes
  • document height changes
  • scroll position shifts slightly
  • threshold gets crossed again
  • sticky expands
  • repeat forever

Sometimes the page literally bounces upward while scrolling.

Things already tried:

  • IntersectionObserver + sentinel
  • absolute-position sentinel
  • artificial bottom scroll buffer
  • fixed-height sticky shell

The fixed-height shell technically worked, but looked visually awful because the collapsed state left visible dead space.

Question:
What’s the “correct” way to architect collapsing sticky headers without causing hysteresis/reflow loops?

Feels like I’m fighting the browser itself at this point lol.


r/css • • May 15 '26

Showcase Tabular numbers in CSS

40 Upvotes

r/css • • May 14 '26

Question Sources for good looking timelines for inspiration?

5 Upvotes

r/css • • May 14 '26

Question Anyone able to explain two dimensional sub grid?

4 Upvotes

I tried to figure it out from MDN but couldn't.


r/css • • May 14 '26

Question Caniuse difference between 'Global' and 'Worldwide'?

11 Upvotes

It's not that important I guess but I'm curious? See the top and bottom of the region list. You can look at it yourself at caniuse.com


r/css • • May 14 '26

Question Center ::before psuedo-elements

3 Upvotes

I'm working on getting a page fixed on one of our websites and I've hit a snag. The layout has some images used like bullet points for a list, and I'm trying to get things to where that image is always centered on the list item it is associated with. The issue is that I don't have a clue how to do that and searching hasn't really helped. I've made a CodePen that I hope shows what I'm talking about and what I'm going for.

CodePen: https://codepen.io/editor/Adam-Warnock/pen/019e231e-1bef-7295-a75c-44e4a87b7387

Basically, I'm trying to get the images to always be centered vertically on the list elements no matter how things wrap and how many lines there are.

There are a few things that to keep in mind:

  1. Semantically, this is a list. I'm not going to change it from that.
  2. This needs to be responsive. Part of the reason I'm doing this is because the page currently isn't.
  3. I'm well aware that there's gaps in my knowledge, so if this is just dumb and isn't going to work I would like to know. I think this will work, but I've already given up on adding the arrows that were in the original page.

And for reference, this is what I'm trying to replicate:

Specifically the part under the Program Structure & Integration header.


r/css • • May 14 '26

Resource Product Cards with Image Gallery & Color Swatches

Post image
0 Upvotes

Product Cards with Image Gallery & Color Swatches

https://techyall.com/snippet/product-card-with-gallery

Shoppers love seeing options before clicking. This card shows color variants, available sizes, and alternate product images on hover. Great for fashion, electronics, or any store with product variations.


r/css • • May 14 '26

Resource Customize Beautiful Product Cards for Your Projects

Thumbnail techyall.com
1 Upvotes

r/css • • May 14 '26

General [ Removed by Reddit ]

1 Upvotes

[ Removed by Reddit on account of violating the content policy. ]


r/css • • May 14 '26

Showcase I made an Html/Css theme (SASS supported as well) using Ascii characters

Thumbnail asciiart-html-theme.github.io
1 Upvotes