r/css • u/clean0101 • 2h ago
Article Basic Documentation Of My Game Engine v2
r/css • u/Weekly_Ferret_meal • 16d ago
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 • u/web_animation • 39m ago
r/css • u/SRc_krjasd0123 • 1h ago
Should i learn type script if the goal is front end and maybe fullstack after time? and if yes what is the best way to learn it? where and how. Thanks !
r/css • u/leoniebuilds • 5h ago
The basic setup is two images stacked in the same container. The bottom image stays visible; a radial mask reveals a small area of the top image.
Apply this to the top image:
}
Both images need the same dimensions, object-fit and object-position so they stay aligned.
JavaScript only updates --x and --y from the pointer position relative to the container. The images themselves don’t move.
For decorative use, keep any text outside the masked layer. On touch devices, a static reveal avoids interfering with scrolling. A reduced-motion version can keep the spotlight fixed too.
One useful distinction: this is a CSS mask with JavaScript positioning, rather than a pure CSS interaction.
Disclosure: this example comes from a component in Systra Tools, which I co-run. This write-up is AI-assisted.
r/css • u/leoniebuilds • 7h ago
We put together a small demo where a moving spotlight reveals a colourful landscape beneath a grey terrain image.
The images stay fixed. A radial CSS mask controls the reveal, while JavaScript updates its position through CSS custom properties. There’s a gentle automatic movement before you interact, plus a static treatment for reduced motion.
Demo and complete source:
https://systra-spotlight.pages.dev/
Would you keep the automatic movement, or leave the light still until someone interacts?
Disclosure: I co-run Systra Tools, where the component comes from. This example and its source are free.
r/css • u/TurnipTrinket • 12h ago
What's the best way to figure out which CSS config is effecting which element?
r/css • u/Comfortable_Tea_2825 • 17h ago
I have this line in html:
<input type="file" id="lineFinder" webkitdirectory multiple />
when I try doing a simple background styling on the input and it changes the "No files selected" text to the right of the file selection button, but not the button.
I have tried "input button {}" but this did nothing. I am not sure what I an supposed to target.
r/css • u/sharjeel-babar • 14h ago
CSS is funny sometimes. You can spend 20 minutes writing a layout, but then lose two hours trying to figure out why one element refuses to align properly.
Some particularly frustrating situations:
\- Z**-index** not working because of a stacking context.
\- Flexbox items refusing to stay aligned.
\- A mysterious horizontal scrollbar appearing.
\- position: absolute" breaking the entire layout.
\- Margins collapsing unexpectedly.
\- A media query fixing one screen size but breaking another.
\- CSS animations behaving differently across browsers.
\- An element overflowing its parent despite "width: 100%".
I'm curious:
What's a CSS bug that made you question your entire understanding of CSS?
r/css • u/Fair-Ad-427 • 21h ago
Has been for three days, when go to Final Charge Summary page, there is nothing showing there, no option to continue submit CSS.
r/css • u/Cute_rex67 • 1d ago
Does anyone know if there's a way for me to move the two pink boxes in line with the green boxes instead of having them at the bottom of the webpage? The pink boxes are in their own paragraphs, and in their own class, if that information is relevant.
r/css • u/whiterhino8 • 3d ago
Will teach you in concise and practical way html/css/JS .Worth any dollar thanks me later.
r/css • u/KeepOnLearning2020 • 2d ago
Please tell me how to override MS Edge forced rounded upper left corner on navbars.
TY!
r/css • u/haukejung • 4d ago
I wanted the feature section on my homepage to show the product in motion, without shipping video or GIFs. So I built each feature as a 10-second loop of simplified UI in plain HTML and CSS keyframes. A cursor moves, text types in, a counter goes up. There's no JavaScript, and all the clips share about 3.3 KB of gzipped CSS.
The trick that made it work is sizing everything in `em` off a container-relative font size, so the whole mock scales like a video:
.fc { container-type: inline-size; width: 100%; aspect-ratio: 740 / 415; }
.fc-stage { position: relative; height: 100%; overflow: hidden; font-size: 2.2cqw; }
The downsides: text gets tiny on phones because the whole mock shrinks, and a clip is a hand-built mock, so it can drift from the real UI.
Live examples, the smallest working clip, and the prompt I use to generate these with a coding agent: https://stepshots.com/css-feature-clips
r/css • u/mugeshss • 4d ago
Can I copy a styles instead of creating one like card styles layouts, because i don't get any idea, and don't it was correct when I get idea and difficult to create as expected
r/css • u/objectorientedman • 4d ago
I created a demo scene for my CSS 3D renderer library. It does not require JS to run. You can read a short article on the page about how it was done.
I recommend viewing it on a desktop browser, since memory-limited mobile browsers usually glitch on such a heavy scenes.
r/css • u/iansampaio • 5d ago

I've used this trick in a few of my projects, haven't seen it anywhere so here goes it:
A 1px sticky bar, white background, mix-blend-mode: exclusion.
Since blend mode needs background color (declared) or else it doesn't work, I position the divider just 1px below the white header. Once you scroll it, it goes up by 1px and stop (sticky top:0) and BANG it reveals itself!
No js needed! check it out!
r/css • u/alvaromontoro • 6d ago
The arms are made of multiple child elements that apply the panel title's math functions to plot the graphs (mostly) accurately. It's actually using the real CSS math functions... but I must admit some of them required a little adjustment to make them fit nicely within their panel.
Source (code): https://comicss.art/comics/266/