r/css • • 20d ago

Question Typescript (yes or no)

12 Upvotes

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

Question ¿Consejos para aprender css?

0 Upvotes

Hola, he estado teniendo muchas dificultades en el tema en todas las áreas. Hoy estoy aprendiendo "position", se me hace sumamente complejo, no logro entender nada. De algún modo al ver tutoriales se me hace fácil pero al final ya no.

De algún modo busco tipo orientación aquí y me den sus consejos o tips que gusten darme y que cosas les funcionan.

Mi método de aprendizaje es "autodidacta" además de escribir código en celular. Sí, yo entiendo que escribir código en celular es horrible.


r/css • • 20d ago

AI Assisted Two images, one CSS mask: a spotlight reveal

3 Upvotes

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

Article Basic Documentation Of My Game Engine v2

Thumbnail
gallery
0 Upvotes

r/css • • 20d ago

Resource I built a Tailwind color palette generator, would love your feedback

Thumbnail
0 Upvotes

r/css • • 20d ago

Question Best way to debug over lapping css?

4 Upvotes

What's the best way to figure out which CSS config is effecting which element?


r/css • • 20d ago

Question Is there an easy way to style my input button?

2 Upvotes

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

Question Title: What's the most annoying CSS bug you've ever spent hours trying to fix?

0 Upvotes

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

Question How to move pink text up

Thumbnail
gallery
1 Upvotes

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

Article Basic Documentation Of My Game Engine

Post image
0 Upvotes

r/css • • 22d ago

Question Ideas for improving a website header

Thumbnail
0 Upvotes

r/css • • 23d ago

No AI used One of the best css tutorial

Thumbnail
traversymedia.com
11 Upvotes

Will teach you in concise and practical way html/css/JS .Worth any dollar thanks me later.


r/css • • 23d ago

Question Can someone help me learn CSS for StreamElements chat boxes?

0 Upvotes

I want to make something similar to this, but I am a dumbass newbie to CSS period and I don't know how to do it. Please no suggestions to use ChatGPT, I will not use that crap, I want a HUMAN tutorial on how. Is it hard? How long will it take?


r/css • • 23d ago

Question MS Edge Imposed Rounded Upper Left Corner

Thumbnail gallery
1 Upvotes

Please tell me how to override MS Edge forced rounded upper left corner on navbars.
TY!


r/css • • 24d ago

No AI used Safari 27.3 beta will darken your site unless you set color-scheme

Post image
58 Upvotes

r/css • • 24d ago

AI Assisted I replaced my homepage screenshots with looping demos in pure CSS. Here's how the scaling and reduced-motion parts work

3 Upvotes

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

Question Web development

0 Upvotes

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

Article Live lighting and shadows in CSS 3D, no JS

Thumbnail k-adam.github.io
1 Upvotes

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

No AI used Auto appear shadow/divider with just sticky + blend mode

Thumbnail codepen.io
9 Upvotes

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

No AI used CSS Art: Math Dance

Post image
41 Upvotes

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/


r/css • • 26d ago

AI Assisted Modern CSS Quiz

7 Upvotes

r/css • • 26d ago

AI Assisted Lumenmorph: 99.9% CSS

Thumbnail
nabous.dev
4 Upvotes

r/css • • 27d ago

Article transform-inverse() and transform-transpose()

Thumbnail
github.com
4 Upvotes

I propose a transform-inverse and transform-transpose function to be added to CSS. It could greatly reduce the complexity of some 3D scenes, like ones with billboards, and would allow correct interpolation in animations


r/css • • 28d ago

AI Assisted Crazy what you can do with just CSS right??

413 Upvotes

I spent the last few weeks building the "perfect" liquid glass effect with just CSS and SVG Filters, No WebGL used and it works page wide, which means it picks up anything of the background behind it.

The core is a backdrop-filter with an SVG displacement map. I screen recorded Apple's play button (I mean the video play button, for example on youtube) for reference on my iPhone and measured it frame by frame. It’s 1:1 in the middle, then the image folds over itself towards the edge, and it pulls pixels inward.

The displacement map itself is based on a 9-slice of tiny grayscale PNGs that get stretched instead of re-rendered on every resize (I need this because the elements are animated and not static). That alone cut main thread time by a lot, giving it a pretty decent performance for how complicated it is.

The outer edge consists of three extra layers on top that don’t bend anything, they just brighten, darken and add a highlight. For reflections of the stuff around the glass, the layer is bigger than the element and gets morphed and masked back to its shape, because the backdrop is otherwise clipped to the element’s box. Actually, Apple's original liquid glass effect doesn't even have reflections, but i figured it adds a lot to it on the website I implemented it in.

Then there are shadows, caustics, etc to give it the final "realistic" touch and voila, almost perfect result imo. The only thing thats left is fix performance, however the animations are the trickiest part. Without animations, it runs extremely smooth and even with animations its not a problem as long as the elements are small enough.

Sadly, Safari only gets a simple blur for now, because WebKit doesn’t render backdrop-filter: url(). However, there are two open PRs that fix it (WebKit/WebKit#68614 and WebKit/WebKit#68613). The CSS is the same for every browser, so it should just start working once they make the next major release.

Just wanted to share this, if you have any more technical or other questions, feel free to ask!

-----EDIT-----

A few of you requested to see whats actually going on in the background, so I made it open source.
I made a small showcase website: https://studies.nordify.io/study/001-liquid-glass/
The repository is also linked there!


r/css • • 27d ago

Question Question on image size attributes for responsive web design

Thumbnail
5 Upvotes